> ## 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 Ofac

> Search for OFAC matches by name.



## OpenAPI

````yaml /api-reference/openapi.json post /ofac/searches
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /ofac/searches:
    post:
      tags:
        - OFAC
      summary: Search Ofac
      description: Search for OFAC matches by name.
      operationId: search_ofac_ofac_searches_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1.OFACSearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.OFACSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.OFACSearchRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: The name to search for in the OFAC database
        similarity_threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Threshold
          description: Similarity threshold for the search (0.0 to 1.0).  Defaults to 0.9.
          default: 0.9
        limit:
          type: integer
          maximum: 50
          minimum: 1
          title: Limit
          description: The number of results to return. Max 50. Defaults to 1.
          default: 1
      additionalProperties: false
      type: object
      required:
        - name
      title: OFACSearchRequest (v1)
    v1.OFACSearchResponse:
      properties:
        matches:
          items:
            $ref: '#/components/schemas/v1.OFACMatch'
          type: array
          title: Matches
          description: The list of OFAC matches.
        total_matches:
          type: integer
          title: Total Matches
          description: The total number of matches found.
          examples:
            - 1
            - 2
            - 3
      type: object
      required:
        - matches
        - total_matches
      title: OFACSearchResponse (v1)
      description: |-
        Response model for OFAC search results.

        This model defines the structure for OFAC search API responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    v1.OFACMatch:
      properties:
        name:
          type: string
          title: Name
          description: The name of the OFAC entity.
          examples:
            - al zawahiri dr ayman
            - banco nacional de cuba
        alternative_names:
          items:
            type: string
          type: array
          title: Alternative Names
          description: The alternative names of the OFAC entity.
          default: []
          examples:
            - - al zawahiri dr ayman
        addresses:
          items:
            type: string
          type: array
          title: Addresses
          description: The addresses associated with the OFAC entity.
          default: []
          examples:
            - - 123 Main St, Anytown, USA
              - 456 Elm St, Anytown, USA
        similarity_score:
          type: number
          title: Similarity Score
          description: The similarity score of the OFAC entity.
          examples:
            - 0.9
            - 0.95
            - 0.99
        program:
          anyOf:
            - type: string
            - type: 'null'
          title: Program
          description: The program of the OFAC entity.
          examples:
            - sdgt
            - cuba
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the OFAC entity.
          examples:
            - operational and military leader of jihad group
        remarks:
          anyOf:
            - type: string
            - type: 'null'
          title: Remarks
          description: Additional remarks about the OFAC entity.
          examples:
            - Designated under Executive Order 13224
      type: object
      required:
        - name
        - similarity_score
      title: OFACMatch (v1)
      description: |-
        Model for individual OFAC match results.

        This model defines the structure for individual OFAC match data.
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````