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

# Find Harmonized System (HS) product codes

> Global Trade & Customs API (trade.hs-codes)

## Request contract

* **Method and path:** GET /apis/v1/trade/hs-codes
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/trade/hs-codes`
* **fields:** query; optional
* **limit:** query; optional
* **q:** query; required

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

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "trade.hs-codes",
  "method": "GET",
  "path": "/apis/v1/trade/hs-codes",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "in": "query",
      "name": "fields",
      "required": false,
      "schema": {
        "type": "string",
        "x-aisa-delimiter": ",",
        "x-aisa-item-pattern": "^[a-z][a-z0-9_]{0,39}$",
        "x-aisa-maxItems": 5,
        "x-aisa-minItems": 1
      }
    },
    {
      "examples": {
        "default": {
          "value": 5
        },
        "minimal": {
          "value": 5
        }
      },
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 10,
        "maximum": 50,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "examples": {
        "default": {
          "value": "laptop"
        },
        "minimal": {
          "value": "laptop"
        }
      },
      "in": "query",
      "name": "q",
      "required": true,
      "schema": {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.001 USD per successful request. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/trade.json GET /apis/v1/trade/hs-codes
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/hs-codes:
    get:
      tags:
        - Global Trade & Customs
      summary: Find Harmonized System (HS) product codes
      description: Global Trade & Customs API (trade.hs-codes)
      operationId: trade.hs-codes
      parameters:
        - in: query
          name: fields
          required: false
          schema:
            type: string
            x-aisa-delimiter: ','
            x-aisa-item-pattern: ^[a-z][a-z0-9_]{0,39}$
            x-aisa-maxItems: 5
            x-aisa-minItems: 1
        - examples:
            default:
              value: 5
            minimal:
              value: 5
          in: query
          name: limit
          required: false
          schema:
            default: 10
            maximum: 50
            minimum: 1
            type: integer
        - examples:
            default:
              value: laptop
            minimal:
              value: laptop
          in: query
          name: q
          required: true
          schema:
            maxLength: 100
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: The best matches first.
                    items:
                      additionalProperties: false
                      properties:
                        code:
                          description: 'HS code, digits only: 2, 4 or 6 digits.'
                          type: string
                        description:
                          description: Official description of the code.
                          type: string
                        parent:
                          description: The code one level up. Null for a chapter.
                          type:
                            - string
                            - 'null'
                        us_duty:
                          description: >-
                            US general duty rates of the tariff lines under this
                            code.
                          items:
                            additionalProperties: false
                            properties:
                              code:
                                description: Eight-digit US tariff line.
                                type: string
                              description:
                                description: Text of the tariff line.
                                type: string
                              general:
                                description: >-
                                  General (most-favored-nation) rate of duty, as
                                  published.
                                type: string
                            required:
                              - code
                              - description
                              - general
                            type: object
                          type: array
                      required:
                        - code
                        - description
                        - parent
                      type: object
                    type: array
                  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.
                    propertyNames:
                      type: string
                    type: object
                required:
                  - data
                  - 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 GET \
              --url 'https://api.aisa.one/apis/v1/trade/hs-codes?limit=5&q=laptop' \
              --header 'Authorization: Bearer <token>'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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