> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcurrent.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# List searches

> List past searches for your organization with pagination.

Plural-form alias of `GET /search/history`, matching the naming used in
the Current app. The singular `/search/history` path remains supported.




## OpenAPI

````yaml /openapi.yaml get /searches
openapi: 3.1.0
info:
  title: Current Business Verification API
  version: 1.0.0
  description: >
    The Current API provides programmatic access to Canadian business
    verification services.


    ## Authentication

    All API requests require authentication via API key. Include your key using
    one of these methods:

    - `Authorization: Bearer cur_live_xxxxx` (recommended)

    - `X-API-Key: cur_live_xxxxx`


    ## Rate Limits

    All endpoints are rate limited to **60 requests per minute** per API key.


    Rate limit headers are included in all responses:

    - `X-RateLimit-Limit`: Maximum requests allowed in current window

    - `X-RateLimit-Remaining`: Remaining requests in current window

    - `X-RateLimit-Reset`: Unix timestamp when the rate limit resets


    ## Request IDs

    All responses include an `X-Request-Id` header for traceability.

    You can provide your own via the `X-Request-Id` request header; otherwise
    one is generated automatically.

    Include this ID when contacting support about a specific request.
  contact:
    name: Current Support
    url: https://getcurrent.ca
  license:
    name: Proprietary
servers:
  - url: https://api.getcurrent.ca/v1
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Search
    description: Business verification search operations
  - name: Pre-fill
    description: Fast typeahead lookup of canonical business candidates
  - name: Generate PDF
    description: PDF report generation
  - name: Business Reports
    description: Business report operations
  - name: Sanctions
    description: Standalone sanctions screening operations
  - name: Verification
    description: Business verification operations
  - name: Businesses
    description: >-
      Business record sync (list/read as a change feed, upsert to keep records
      current)
paths:
  /searches:
    get:
      tags:
        - Search
      summary: List searches
      description: |
        List past searches for your organization with pagination.

        Plural-form alias of `GET /search/history`, matching the naming used in
        the Current app. The singular `/search/history` path remains supported.
      operationId: listSearches
      parameters:
        - name: limit
          in: query
          description: Maximum number of results (1-100)
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          description: Pagination offset
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: query
          in: query
          description: Filter by search query
          schema:
            type: string
        - name: archived
          in: query
          description: Filter by archived status
          schema:
            type: boolean
      responses:
        '200':
          description: Search history list
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchHistoryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearerAuth: []
        - apiKeyHeader: []
components:
  headers:
    X-Request-Id:
      description: >-
        Unique request identifier for traceability. Echoes client-provided value
        or auto-generated UUID.
      schema:
        type: string
        format: uuid
        example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
    X-RateLimit-Limit:
      description: Maximum requests per minute
      schema:
        type: integer
        example: 60
    X-RateLimit-Remaining:
      description: Remaining requests in current window
      schema:
        type: integer
        example: 58
    X-RateLimit-Reset:
      description: Unix timestamp when rate limit resets
      schema:
        type: integer
        example: 1702915200
  schemas:
    SearchHistoryResponse:
      type: object
      properties:
        searches:
          type: array
          items:
            $ref: '#/components/schemas/SearchListItem'
        pagination:
          type: object
          properties:
            total:
              type: integer
            limit:
              type: integer
            offset:
              type: integer
            hasMore:
              type: boolean
    SearchListItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        query:
          type: string
        website:
          type: string
          nullable: true
        timestamp:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - completed
            - loading
            - error
            - completed-with-errors
        archived:
          type: boolean
        errors:
          allOf:
            - $ref: '#/components/schemas/SearchErrors'
          nullable: true
          description: >-
            Grouped, sanitized per-source errors for this search (same shape as
            the `errors` object on the search response). Null when no source
            failed.
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >
            Machine-readable error code. Present on every error response.
            Distinct from the per-source `APIError.code` values that appear
            inside a successful response's `meta.errors` object.
          enum:
            - MISSING_API_KEY
            - INVALID_API_KEY
            - REVOKED_API_KEY
            - EXPIRED_API_KEY
            - RATE_LIMITED
            - VALIDATION_ERROR
            - INVALID_JSON
            - NOT_FOUND
            - STALE_WRITE
            - CONFLICT
            - METHOD_NOT_ALLOWED
            - UNAUTHORIZED
            - SERVER_ERROR
            - INTERNAL_ERROR
          example: VALIDATION_ERROR
    SearchErrors:
      type: object
      description: >-
        Per-source errors — only present when one or more sources failed.
        Presence does not mean the search failed overall.
      properties:
        businessRegistry:
          $ref: '#/components/schemas/APIError'
        regulatoryRegistry:
          $ref: '#/components/schemas/APIError'
        sanctionsScreening:
          $ref: '#/components/schemas/APIError'
        websiteAnalysis:
          $ref: '#/components/schemas/APIError'
        general:
          allOf:
            - $ref: '#/components/schemas/APIError'
          description: >-
            Search-wide failure not tied to a single source (e.g. the search
            timed out or hit an unexpected error). When present, `meta.status`
            is `completed-with-errors` and there may be no per-source results.
    APIError:
      type: object
      properties:
        code:
          type: string
          enum:
            - TIMEOUT
            - RATE_LIMITED
            - NOT_FOUND
            - INVALID_INPUT
            - UPSTREAM_ERROR
            - PARSE_ERROR
            - AUTH_ERROR
            - UNAVAILABLE
            - UNKNOWN
          description: Error classification code
        message:
          type: string
          description: Human-readable error message
        retryable:
          type: boolean
          description: Whether the request can be retried
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              value:
                error: >-
                  Missing API key. Provide via Authorization: Bearer <key> or
                  X-API-Key header.
                code: MISSING_API_KEY
            invalid:
              value:
                error: Invalid API key
                code: INVALID_API_KEY
            revoked:
              value:
                error: API key has been revoked
                code: REVOKED_API_KEY
            expired:
              value:
                error: API key has expired
                code: EXPIRED_API_KEY
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          description: Seconds until rate limit resets
          schema:
            type: integer
            example: 60
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded. Try again in 60 seconds.
            code: RATE_LIMITED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key as Bearer token: `Authorization: Bearer cur_live_xxxxx`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key in header: `X-API-Key: cur_live_xxxxx`'

````