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

# Search importing or exporting companies

> Global Trade & Customs API (trade.companies.search)

## 请求规范

* **方法与路径:** POST /apis/v1/trade/companies/search
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/trade/companies/search`

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/trade.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "trade.companies.search",
  "method": "POST",
  "path": "/apis/v1/trade/companies/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "default": {
            "value": {
              "hs_code": "847130",
              "importer_country": "US",
              "limit": 1,
              "role": "importer"
            }
          },
          "minimal": {
            "value": {
              "hs_code": "847130",
              "importer_country": "US",
              "limit": 1,
              "role": "importer"
            }
          }
        },
        "schema": {
          "additionalProperties": false,
          "allOf": [
            {
              "anyOf": [
                {
                  "properties": {
                    "hs_code": {}
                  },
                  "required": [
                    "hs_code"
                  ]
                },
                {
                  "properties": {
                    "product": {}
                  },
                  "required": [
                    "product"
                  ]
                },
                {
                  "properties": {
                    "trading_with": {}
                  },
                  "required": [
                    "trading_with"
                  ]
                }
              ]
            }
          ],
          "properties": {
            "cursor": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "exclude_forwarders": {
              "default": true,
              "type": "boolean"
            },
            "exporter_country": {
              "maxLength": 80,
              "minLength": 2,
              "type": "string"
            },
            "hs_code": {
              "maxLength": 10,
              "minLength": 6,
              "pattern": "^[0-9]{6,10}$",
              "type": "string"
            },
            "importer_country": {
              "maxLength": 80,
              "minLength": 2,
              "type": "string"
            },
            "limit": {
              "default": 10,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            },
            "product": {
              "maxLength": 100,
              "minLength": 2,
              "type": "string"
            },
            "role": {
              "enum": [
                "exporter",
                "importer"
              ],
              "type": "string"
            },
            "since": {
              "maxLength": 10,
              "minLength": 10,
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
              "type": "string"
            },
            "sort": {
              "default": "shipments",
              "enum": [
                "recorded_value",
                "shipments"
              ],
              "type": "string"
            },
            "trading_with": {
              "maxLength": 200,
              "minLength": 2,
              "type": "string"
            },
            "until": {
              "maxLength": 10,
              "minLength": 10,
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
              "type": "string"
            }
          },
          "required": [
            "role"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按实际用量收费。 公开参考价格：每计费单位 \$0.01 USD。 默认请求预估费用：\$0.01 USD。 最终费用以实际用量为准。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi/zh/trade.json POST /apis/v1/trade/companies/search
openapi: 3.1.0
info:
  description: ''
  title: Global Trade & Customs
  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:
    trade:
      description: ''
      title: Global Trade & Customs
      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: 04609443cc30a0604ea1e6aabafe6ce20e6610145902fdad90731566707b2b23
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/trade/companies/lookup
    - /apis/v1/trade/companies/search
    - /apis/v1/trade/companies/{id}
    - /apis/v1/trade/companies/{id}/contacts
    - /apis/v1/trade/companies/{id}/partners
    - /apis/v1/trade/companies/{id}/shipments
    - /apis/v1/trade/coverage
    - /apis/v1/trade/hs-codes
    - /apis/v1/trade/leads/find
    - /apis/v1/trade/markets/brief
    - /apis/v1/trade/shipments/search
    - /apis/v1/trade/stats/query
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:2701c7a014a31cae225348fbb39fce0f5996d7cf9e0f2480b35662ee4f9b1b6a
    facts_hash: 04609443cc30a0604ea1e6aabafe6ce20e6610145902fdad90731566707b2b23
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: trade
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/trade/companies/search:
    post:
      tags:
        - Global Trade & Customs
      summary: Search importing or exporting companies
      description: Global Trade & Customs API (trade.companies.search)
      operationId: trade.companies.search
      requestBody:
        content:
          application/json:
            examples:
              default:
                value:
                  hs_code: '847130'
                  importer_country: US
                  limit: 1
                  role: importer
              minimal:
                value:
                  hs_code: '847130'
                  importer_country: US
                  limit: 1
                  role: importer
            schema:
              additionalProperties: false
              allOf:
                - anyOf:
                    - properties:
                        hs_code: {}
                      required:
                        - hs_code
                    - properties:
                        product: {}
                      required:
                        - product
                    - properties:
                        trading_with: {}
                      required:
                        - trading_with
              properties:
                cursor:
                  maxLength: 200
                  minLength: 1
                  type: string
                exclude_forwarders:
                  default: true
                  type: boolean
                exporter_country:
                  maxLength: 80
                  minLength: 2
                  type: string
                hs_code:
                  maxLength: 10
                  minLength: 6
                  pattern: ^[0-9]{6,10}$
                  type: string
                importer_country:
                  maxLength: 80
                  minLength: 2
                  type: string
                limit:
                  default: 10
                  maximum: 100
                  minimum: 1
                  type: integer
                product:
                  maxLength: 100
                  minLength: 2
                  type: string
                role:
                  enum:
                    - exporter
                    - importer
                  type: string
                since:
                  maxLength: 10
                  minLength: 10
                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                  type: string
                sort:
                  default: shipments
                  enum:
                    - recorded_value
                    - shipments
                  type: string
                trading_with:
                  maxLength: 200
                  minLength: 2
                  type: string
                until:
                  maxLength: 10
                  minLength: 10
                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                  type: string
              required:
                - role
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: The results of this page.
                    items:
                      additionalProperties: false
                      properties:
                        country:
                          anyOf:
                            - description: ISO 3166-1 alpha-2 country code, such as `US`.
                              type: string
                            - type: 'null'
                          description: >-
                            Country the company imports into or exports from in
                            these records.
                        id:
                          description: Company ID, such as `co_8f3k2m9x4p1q`.
                          type: string
                        name:
                          description: Name as written on shipping documents.
                          type: string
                        recorded_value_usd:
                          description: >-
                            Sum of the declared values of the records that have
                            one, in US dollars. A lower bound: US bills of
                            lading carry no value.
                          type:
                            - number
                            - 'null'
                        role:
                          description: The side it is on in these records.
                          enum:
                            - importer
                            - exporter
                          type: string
                        sample_product:
                          description: A goods description from one of its records.
                          type:
                            - string
                            - 'null'
                        shipments:
                          description: >-
                            Number of shipment records. A count of records, not
                            a market share: countries that publish every
                            declaration are over-represented.
                          type: integer
                        website:
                          description: Bare domain, such as `example.com`. Often null.
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - name
                        - role
                        - country
                        - shipments
                        - recorded_value_usd
                        - website
                        - sample_product
                      type: object
                    type: array
                  has_more:
                    description: Whether more results follow this page.
                    type: boolean
                  next_cursor:
                    description: >-
                      Pass it as `cursor` to get the next page. Null on the last
                      page.
                    type:
                      - string
                      - 'null'
                  notice:
                    description: >-
                      A plain sentence when there is something to know about
                      this result: why a part is missing, or what to try next.
                      Null otherwise.
                    type:
                      - string
                      - 'null'
                  query:
                    additionalProperties: {}
                    description: >-
                      The request as it was understood: country names as codes,
                      the default dates filled in. `data_through` says how
                      recent the records behind the answer are.
                    properties:
                      data_through:
                        description: >-
                          Date of the latest record this query can see,
                          `YYYY-MM-DD`. Records arrive weeks after a shipment,
                          so recent months are incomplete.
                        type:
                          - string
                          - 'null'
                    required:
                      - data_through
                    type: object
                  total:
                    description: >-
                      How many results match in all. Use it to decide between
                      paging on and narrowing the query.
                    type: integer
                required:
                  - data
                  - total
                  - has_more
                  - next_cursor
                  - query
                  - notice
                type: object
          description: Normalized successful response
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
      x-codeSamples:
        - label: Reference example
          lang: text
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request POST \
              --url https://api.aisa.one/apis/v1/trade/companies/search \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "hs_code": "847130",
              "importer_country": "US",
              "limit": 1,
              "role": "importer"
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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