> ## 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 customs shipment declarations and bills of lading

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

## Request contract

* **Method and path:** POST /apis/v1/trade/shipments/search
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/trade/shipments/search`

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

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "trade.shipments.search",
  "method": "POST",
  "path": "/apis/v1/trade/shipments/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
            }
          },
          "minimal": {
            "value": {
              "hs_code": "847130",
              "importer_country": "US",
              "limit": 1
            }
          }
        },
        "schema": {
          "additionalProperties": false,
          "allOf": [
            {
              "anyOf": [
                {
                  "properties": {
                    "exporter": {}
                  },
                  "required": [
                    "exporter"
                  ]
                },
                {
                  "properties": {
                    "hs_code": {}
                  },
                  "required": [
                    "hs_code"
                  ]
                },
                {
                  "properties": {
                    "importer": {}
                  },
                  "required": [
                    "importer"
                  ]
                },
                {
                  "properties": {
                    "product": {}
                  },
                  "required": [
                    "product"
                  ]
                }
              ]
            }
          ],
          "properties": {
            "cursor": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "exporter": {
              "maxLength": 200,
              "minLength": 2,
              "type": "string"
            },
            "exporter_country": {
              "maxLength": 80,
              "minLength": 2,
              "type": "string"
            },
            "fields": {
              "items": {
                "type": "string"
              },
              "maxItems": 40,
              "minItems": 1,
              "type": "array"
            },
            "hs_code": {
              "maxLength": 10,
              "minLength": 6,
              "pattern": "^[0-9]{6,10}$",
              "type": "string"
            },
            "importer": {
              "maxLength": 200,
              "minLength": 2,
              "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"
            },
            "since": {
              "maxLength": 10,
              "minLength": 10,
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
              "type": "string"
            },
            "sort": {
              "default": "date_desc",
              "enum": [
                "date_asc",
                "date_desc"
              ],
              "type": "string"
            },
            "until": {
              "maxLength": 10,
              "minLength": 10,
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
              "type": "string"
            }
          },
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

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


## OpenAPI

````yaml openapi/trade.json POST /apis/v1/trade/shipments/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/shipments/search:
    post:
      tags:
        - Global Trade & Customs
      summary: Search customs shipment declarations and bills of lading
      description: Global Trade & Customs API (trade.shipments.search)
      operationId: trade.shipments.search
      requestBody:
        content:
          application/json:
            examples:
              default:
                value:
                  hs_code: '847130'
                  importer_country: US
                  limit: 1
              minimal:
                value:
                  hs_code: '847130'
                  importer_country: US
                  limit: 1
            schema:
              additionalProperties: false
              allOf:
                - anyOf:
                    - properties:
                        exporter: {}
                      required:
                        - exporter
                    - properties:
                        hs_code: {}
                      required:
                        - hs_code
                    - properties:
                        importer: {}
                      required:
                        - importer
                    - properties:
                        product: {}
                      required:
                        - product
              properties:
                cursor:
                  maxLength: 200
                  minLength: 1
                  type: string
                exporter:
                  maxLength: 200
                  minLength: 2
                  type: string
                exporter_country:
                  maxLength: 80
                  minLength: 2
                  type: string
                fields:
                  items:
                    type: string
                  maxItems: 40
                  minItems: 1
                  type: array
                hs_code:
                  maxLength: 10
                  minLength: 6
                  pattern: ^[0-9]{6,10}$
                  type: string
                importer:
                  maxLength: 200
                  minLength: 2
                  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
                since:
                  maxLength: 10
                  minLength: 10
                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                  type: string
                sort:
                  default: date_desc
                  enum:
                    - date_asc
                    - date_desc
                  type: string
                until:
                  maxLength: 10
                  minLength: 10
                  pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: The results of this page.
                    items:
                      additionalProperties: false
                      properties:
                        bill_of_lading:
                          description: >-
                            Bill of lading or declaration number, as on the
                            customs record.
                          type:
                            - string
                            - 'null'
                        brand:
                          description: Brand named on the record.
                          type:
                            - string
                            - 'null'
                        date:
                          description: Date of the record, `YYYY-MM-DD`.
                          type:
                            - string
                            - 'null'
                        description:
                          description: Goods description, at most 200 characters.
                          type:
                            - string
                            - 'null'
                        description_full:
                          description: The whole goods description, however long.
                          type:
                            - string
                            - 'null'
                        description_truncated:
                          description: >-
                            Present and true when `description` was cut. Ask for
                            `description_full`.
                          type: boolean
                        exporter:
                          additionalProperties: false
                          description: The seller on the record.
                          properties:
                            country:
                              anyOf:
                                - description: >-
                                    ISO 3166-1 alpha-2 country code, such as
                                    `US`.
                                  type: string
                                - type: 'null'
                            id:
                              anyOf:
                                - description: Company ID, such as `co_8f3k2m9x4p1q`.
                                  type: string
                                - type: 'null'
                              description: >-
                                Company ID. Pass it to the company endpoints.
                                Null when the party is not named.
                            name:
                              description: Name as written on the record.
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - name
                            - country
                          type: object
                        hs_code:
                          description: HS code as declared, digits only.
                          type:
                            - string
                            - 'null'
                        id:
                          description: Shipment ID, such as `shp_5k2m8x1q9d3f`.
                          type: string
                        importer:
                          additionalProperties: false
                          description: The buyer on the record.
                          properties:
                            country:
                              anyOf:
                                - description: >-
                                    ISO 3166-1 alpha-2 country code, such as
                                    `US`.
                                  type: string
                                - type: 'null'
                            id:
                              anyOf:
                                - description: Company ID, such as `co_8f3k2m9x4p1q`.
                                  type: string
                                - type: 'null'
                              description: >-
                                Company ID. Pass it to the company endpoints.
                                Null when the party is not named.
                            name:
                              description: Name as written on the record.
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - name
                            - country
                          type: object
                        incoterm:
                          description: Trade term, such as `FOB` or `CIF`.
                          type:
                            - string
                            - 'null'
                        loading_port:
                          description: Port where the goods were loaded.
                          type:
                            - string
                            - 'null'
                        origin_country:
                          anyOf:
                            - description: ISO 3166-1 alpha-2 country code, such as `US`.
                              type: string
                            - type: 'null'
                          description: Country of origin of the goods.
                        quantity:
                          description: Quantity as declared, in `quantity_unit`.
                          type:
                            - number
                            - 'null'
                        quantity_unit:
                          description: Unit of `quantity` as declared.
                          type:
                            - string
                            - 'null'
                        reported_by:
                          anyOf:
                            - additionalProperties: false
                              description: >-
                                Whose customs declaration this record is. A US
                                import can be recorded by a US bill of lading
                                (`US`, `import`) and again by the exporter's
                                declaration (`VN`, `export`).
                              properties:
                                country:
                                  description: >-
                                    ISO 3166-1 alpha-2 country code, such as
                                    `US`.
                                  type: string
                                flow:
                                  description: >-
                                    Whether that country recorded it as an
                                    import or as an export.
                                  enum:
                                    - import
                                    - export
                                  type: string
                              required:
                                - country
                                - flow
                              type: object
                            - type: 'null'
                        transport:
                          anyOf:
                            - enum:
                                - sea
                                - air
                                - road
                                - rail
                                - other
                              type: string
                            - type: 'null'
                          description: Mode of transport.
                        unit_price_usd:
                          description: >-
                            Declared value for one unit of `quantity`, in US
                            dollars.
                          type:
                            - number
                            - 'null'
                        unloading_port:
                          description: Port where the goods were unloaded.
                          type:
                            - string
                            - 'null'
                        value_usd:
                          description: >-
                            Declared value. Null when the record has none, as on
                            US bills of lading.
                          type:
                            - number
                            - 'null'
                        weight_kg:
                          description: Weight in kilograms.
                          type:
                            - number
                            - 'null'
                      required:
                        - id
                      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/shipments/search \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "hs_code": "847130",
              "importer_country": "US",
              "limit": 1
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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