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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Entities search

> Find registrants by name, NAICS or state; use entities_get when you already have a UEI or CAGE.

## Request contract

* **Method and path:** POST /apis/v1/sam-gov/opportunities/entities-search
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/sam-gov/opportunities/entities-search`

[Complete OpenAPI definition](https://aisa.one/docs/openapi/sam-gov.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "sam-gov.opportunities.entities-search",
  "method": "POST",
  "path": "/apis/v1/sam-gov/opportunities/entities-search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "provider": {
            "summary": "Official provider example; checked against AIsa request constraints",
            "value": {
              "legal_business_name": "moserworks"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "cage_code": {
              "description": "Five-character CAGE code. Pattern: ^[A-Za-z0-9]{5}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "city": {
              "description": "Physical-address city.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "legal_business_name": {
              "description": "Legal business name (SAM.gov matches on the name text).",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "naics_code": {
              "description": "Any NAICS code on the registration. Pattern: ^[0-9]{6}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "page": {
              "description": "0-based page (default 0); page * size may not exceed 10,000.\n\nProvider reference: minimum 0; maximum 9999.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 9999,
                "min": 0
              }
            },
            "primary_naics": {
              "description": "Six-digit primary NAICS code. Pattern: ^[0-9]{6}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "registration_status": {
              "description": "A (active, default) or E (expired).\n\nProvider reference: allowed values [\"A\", \"E\", \"a\", \"e\"].",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "A",
                  "E",
                  "a",
                  "e"
                ]
              }
            },
            "size": {
              "description": "Records per page, 1 to 10 (SAM.gov's hard limit; default 10).\n\nProvider reference: minimum 1; maximum 10.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 10,
                "min": 1
              }
            },
            "state": {
              "description": "Physical-address state or province code (VA, CA ...). Pattern: ^[A-Za-z]{2}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "uei_sam": {
              "description": "Twelve-character Unique Entity ID. Pattern: ^[A-Za-z0-9]{12}$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            }
          },
          "type": "object"
        }
      }
    },
    "required": false
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Usage-based pricing. Default request estimate: \$0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/sam-gov.json POST /apis/v1/sam-gov/opportunities/entities-search
openapi: 3.1.0
info:
  description: ''
  title: SAM.gov
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    sam-gov:
      description: ''
      title: SAM.gov
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 6afb59b1b1976ca6604a41edfa9dc1c17c5fb2d43858ea29b9cb2e476266ac32
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
        seed_month: 2026-10
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/sam-gov/opportunities/detail
    - /apis/v1/sam-gov/opportunities/entities-changes
    - /apis/v1/sam-gov/opportunities/entities-get
    - /apis/v1/sam-gov/opportunities/entities-search
    - /apis/v1/sam-gov/opportunities/entities-status
    - /apis/v1/sam-gov/opportunities/exclusions-get
    - /apis/v1/sam-gov/opportunities/exclusions-list
    - /apis/v1/sam-gov/opportunities/exclusions-status
    - /apis/v1/sam-gov/opportunities/search
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:c982950758c4269bbfbb3dc50d6e8c810f57a755b580abc02a3eb0f8d5f0fc2c
    facts_hash: 6afb59b1b1976ca6604a41edfa9dc1c17c5fb2d43858ea29b9cb2e476266ac32
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    seed_month: 2026-10
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: sam-gov
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/sam-gov/opportunities/entities-search:
    post:
      tags:
        - SAM.gov
      summary: Entities search
      description: >-
        Find registrants by name, NAICS or state; use entities_get when you
        already have a UEI or CAGE.
      operationId: sam-gov.opportunities.entities-search
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  legal_business_name: moserworks
            schema:
              additionalProperties: true
              properties:
                cage_code:
                  description: 'Five-character CAGE code. Pattern: ^[A-Za-z0-9]{5}$.'
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                city:
                  description: Physical-address city.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                legal_business_name:
                  description: Legal business name (SAM.gov matches on the name text).
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                naics_code:
                  description: 'Any NAICS code on the registration. Pattern: ^[0-9]{6}$.'
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                page:
                  description: |-
                    0-based page (default 0); page * size may not exceed 10,000.

                    Provider reference: minimum 0; maximum 9999.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 9999
                    min: 0
                primary_naics:
                  description: 'Six-digit primary NAICS code. Pattern: ^[0-9]{6}$.'
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                registration_status:
                  description: |-
                    A (active, default) or E (expired).

                    Provider reference: allowed values ["A", "E", "a", "e"].
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - A
                      - E
                      - a
                      - e
                size:
                  description: >-
                    Records per page, 1 to 10 (SAM.gov's hard limit; default
                    10).


                    Provider reference: minimum 1; maximum 10.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 10
                    min: 1
                state:
                  description: >-
                    Physical-address state or province code (VA, CA ...).
                    Pattern: ^[A-Za-z]{2}$.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                uei_sam:
                  description: >-
                    Twelve-character Unique Entity ID. Pattern:
                    ^[A-Za-z0-9]{12}$.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-10-18.
                  summary: Official provider example
                  value:
                    count: 1
                    has_more: false
                    next_page: null
                    page: 0
                    publication_id: entity-information/v4:2026-10-18
                    query:
                      cage_code: null
                      city: null
                      legal_business_name: moserworks
                      naics_code: null
                      primary_naics: null
                      registration_status: A
                      state: null
                      uei_sam: null
                    records:
                      - activation_date: '2026-01-09'
                        business_types:
                          - code: '27'
                            description: Self Certified Small Disadvantaged Business
                          - code: 2X
                            description: For Profit Organization
                          - code: 8W
                            description: Women-Owned Small Business
                          - code: A2
                            description: Women-Owned Business
                          - code: F
                            description: Business or Organization
                        cage_code: 115S3
                        congressional_district: '07'
                        country_of_incorporation_code: USA
                        dba_name: null
                        electronic_business_poc:
                          address_line1: 10921 36TH AVE NE
                          address_line2: null
                          city: SEATTLE
                          country_code: USA
                          first_name: Mary
                          last_name: Moser
                          middle_initial: null
                          state_or_province_code: WA
                          title: null
                          zip_code: '98125'
                          zip_code_plus4: null
                        entity_division_name: null
                        entity_start_date: '2021-04-01'
                        entity_structure_code: 2J
                        entity_structure_desc: Sole Proprietorship
                        entity_type_desc: Business or Organization
                        entity_url: null
                        exclusion_status_flag: 'N'
                        exclusion_url: null
                        fiscal_year_end_close_date: 12/31
                        government_business_poc:
                          address_line1: 10921 36TH AVE NE
                          address_line2: null
                          city: SEATTLE
                          country_code: USA
                          first_name: Mary
                          last_name: Moser
                          middle_initial: null
                          state_or_province_code: WA
                          title: null
                          zip_code: '98125'
                          zip_code_plus4: null
                        last_update_date: '2026-01-09'
                        legal_business_name: MOSERWORKS LLC
                        mailing_address:
                          address_line1: 10921 36TH AVE NE
                          address_line2: null
                          city: SEATTLE
                          country_code: USA
                          state_or_province_code: WA
                          zip_code: '98125'
                          zip_code_plus4: '7905'
                        naics_list:
                          - code: '541990'
                            description: >-
                              All Other Professional, Scientific, and Technical
                              Services
                            naics_exception: null
                            sba_small_business: 'Y'
                        organization_structure_desc: null
                        physical_address:
                          address_line1: 10921 36TH AVE NE
                          address_line2: null
                          city: SEATTLE
                          country_code: USA
                          state_or_province_code: WA
                          zip_code: '98125'
                          zip_code_plus4: '7905'
                        primary_naics: '541990'
                        profit_structure_desc: For Profit Organization
                        psc_list: []
                        publication_id: entity-information/v4:2026-10-18
                        purpose_of_registration_code: Z2
                        purpose_of_registration_desc: All Awards
                        registration_date: '2025-01-20'
                        registration_expiration_date: '2027-01-07'
                        registration_status: Active
                        retrieved_at: '2026-10-18T22:34:54Z'
                        sba_business_types: []
                        sections_present:
                          assertions: true
                          core_data: true
                          points_of_contact: true
                        source_record_id: WM1KQNQGV7M9
                        source_url: >-
                          https://sam.gov/api/prod/entity-information/v4/entities?ueiSAM=WM1KQNQGV7M9
                        state_of_incorporation_code: WA
                        submission_date: '2026-01-07'
                        uei_sam: WM1KQNQGV7M9
                        uei_status: Active
                    result_cap: 10000
                    retrieved_at: '2026-10-18T22:34:54Z'
                    size: 10
                    source_url: >-
                      https://sam.gov/api/prod/entity-information/v4/entities?legalBusinessName=moserworks&registrationStatus=A&includeSections=entityRegistration,coreData,assertions,pointsOfContact&page=0&size=10
                    total_records: 1
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            Search SAM.gov entity registrations (the public Entity Management
            API served keyless from sam.gov) by legal business name, primary or
            any NAICS code, physical-address state or city, CAGE or UEI, for
            active (default) or expired registrations. Each record carries UEI,
            CAGE, legal and DBA name, registration status and dates, exclusion
            flag, physical and mailing address, entity structure, state of
            incorporation, business types, primary NAICS and NAICS list, and the
            government and electronic business points of contact (name, title,
            address; the public tier has no email or phone). Pages of at most
            10; SAM.gov serves at most 10,000 records per query.


            The response contains the tool result directly.


            The provider identifies `records` as the primary payload key.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `activation_date` | string |  |

            | `business_types` | object[] |  |

            | `cage_code` | string |  |

            | `congressional_district` | string |  |

            | `country_of_incorporation_code` | string |  |

            | `dba_name` | string |  |

            | `electronic_business_poc` | object | Public tier: name, title and
            address only; SAM.gov publishes no POC email or phone. |

            | `entity_division_name` | string |  |

            | `entity_start_date` | string |  |

            | `entity_structure_code` | string |  |

            | `entity_structure_desc` | string |  |

            | `entity_type_desc` | string |  |

            | `entity_url` | string |  |

            | `exclusion_status_flag` | string | Y when an active exclusion
            exists, else N. |

            | `exclusion_url` | string |  |

            | `fiscal_year_end_close_date` | string |  |

            | `government_business_poc` | object | Public tier: name, title and
            address only; SAM.gov publishes no POC email or phone. |

            | `last_update_date` | string |  |

            | `legal_business_name` | string |  |

            | `mailing_address` | object | Null when the coreData section is not
            public for this registration. |

            | `naics_list` | object[] |  |

            | `organization_structure_desc` | string |  |

            | `physical_address` | object | Null when the coreData section is
            not public for this registration. |

            | `primary_naics` | string |  |

            | `profit_structure_desc` | string |  |

            | `psc_list` | object[] |  |

            | `publication_id` | string | `entity-information/v4:<retrieval
            date>`: the live API has no publication version. |

            | `purpose_of_registration_code` | string |  |

            | `purpose_of_registration_desc` | string |  |

            | `registration_date` | string | YYYY-MM-DD as SAM.gov states it. |

            | `registration_expiration_date` | string |  |

            | `registration_status` | string | Active or Expired, as SAM.gov
            states it. |

            | `retrieved_at` | string |  |

            | `sba_business_types` | object[] |  |

            | `sections_present` | object |  |

            | `source_record_id` | string | The UEI. |

            | `source_url` | string |  |

            | `state_of_incorporation_code` | string |  |

            | `submission_date` | string |  |

            | `uei_sam` | string |  |

            | `uei_status` | string |  |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.