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

# Search Multiple Watchlists

> Search a name across one or more watchlists, grouped by source.



## OpenAPI

````yaml /api-reference/openapi.json get /watchlists
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /watchlists:
    get:
      tags:
        - Watchlists
      summary: Search Multiple Watchlists
      description: Search a name across one or more watchlists, grouped by source.
      operationId: search_multiple_watchlists_watchlists_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: The name to search for across the watchlists.
            examples:
              - banco nacional de cuba
              - vladimir putin
            title: Q
          description: The name to search for across the watchlists.
        - name: watchlists
          in: query
          required: true
          schema:
            type: array
            items:
              $ref: '#/components/schemas/WatchlistSearchSource'
            minItems: 1
            description: >-
              Watchlists to search. Repeat the param to search several (e.g.
              ?watchlists=OFAC&watchlists=PEP). At least one required; one
              billable order is written per requested watchlist.
            title: Watchlists
          description: >-
            Watchlists to search. Repeat the param to search several (e.g.
            ?watchlists=OFAC&watchlists=PEP). At least one required; one
            billable order is written per requested watchlist.
        - name: similarity_threshold
          in: query
          required: false
          schema:
            type: number
            maximum: 1
            minimum: 0
            description: Minimum similarity for a match (0.0–1.0).
            default: 0.9
            title: Similarity Threshold
          description: Minimum similarity for a match (0.0–1.0).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            description: Maximum matches to return per watchlist.
            default: 5
            title: Limit
          description: Maximum matches to return per watchlist.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.WatchlistSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    WatchlistSearchSource:
      type: string
      enum:
        - OFAC
        - PEP
        - CSL
        - FBI
        - CNS
        - OIG
      title: WatchlistSearchSource
      description: Watchlists that can be searched by name via the GET /watchlists route.
    v1.WatchlistSearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/v1.WatchlistSourceResult'
          type: array
          title: Results
          description: Per-source results, one entry per requested watchlist.
        total_matches:
          type: integer
          title: Total Matches
          description: Total matches returned across all searched watchlists.
          examples:
            - 0
            - 5
      type: object
      required:
        - results
        - total_matches
      title: WatchlistSearchResponse (v1)
      description: |-
        Response for a multi-watchlist name search, grouped by source.

        Includes one ``WatchlistSourceResult`` per requested source — including
        sources with zero matches — so callers can confirm which lists were
        searched.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    v1.WatchlistSourceResult:
      properties:
        source:
          $ref: '#/components/schemas/WatchlistSearchSource'
          description: The watchlist these matches came from.
          examples:
            - OFAC
        matches:
          items:
            $ref: '#/components/schemas/v1.WatchlistSearchMatch'
          type: array
          title: Matches
          description: Matches found in this watchlist, highest similarity first.
        count:
          type: integer
          title: Count
          description: >-
            The number of matches returned for this watchlist (capped by the
            request's `limit`).
          examples:
            - 0
            - 3
      type: object
      required:
        - source
        - count
      title: WatchlistSourceResult (v1)
      description: Results for a single watchlist source.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    v1.WatchlistSearchMatch:
      properties:
        name:
          type: string
          title: Name
          description: The matched entity's primary name.
          examples:
            - banco nacional de cuba
        similarity_score:
          type: number
          title: Similarity Score
          description: Similarity of the match to the query name (0.0–1.0).
          examples:
            - 0.95
            - 1
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Provider-specific fields for the match. Shape varies by watchlist
            source.
      type: object
      required:
        - name
        - similarity_score
      title: WatchlistSearchMatch (v1)
      description: A single matched entity within one watchlist.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````