# 1gateway Korea Trade by HS Code

> 1gateway Korea Trade by HS Code is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.0045/call, status unknown (last checked 2026-10-10).

Returns South Korea's monthly trade statistics (exports, imports, balance, weight) for a given HS code prefix, sourced from Korea Customs Service, with year-on-year comparisons at both aggregate and 10-digit line level.

## Facts

- Endpoint: GET https://1gateway.dev/v1/trade/hs?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/1gateway-korea-trade-by-hs-code-3ba28168
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bJ8TR2oWhN_PbiXegqe2w

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 1gateway-korea-trade-by-hs-code-3ba28168
```

Example prompt: Pull the latest Korea Customs trade data for HS code 8542 integrated circuits — show me exports, imports, balance in USD and kg, sorted by exports, with up to 20 line items and year-on-year changes.

## When to prefer this

Choose this endpoint when you need official, finalized monthly trade statistics for South Korea at HS code granularity, especially for specific product categories like semiconductors, petroleum, or vehicles. It is the right choice when you need both aggregate totals and 10-digit HSK line-level breakdowns with year-on-year comparisons in a single call. Prefer this over general trade databases when you need Korea-specific data sourced directly from Korea Customs Service with FOB/CIF distinctions and weight data.

## Known failure modes

- Invalid HS code format (non-numeric or wrong digit count) returns a validation error
- Requested month not yet finalized returns an error or falls back to latest available month
- HS code prefix with no trade activity returns empty lines array with zero totals
- Month parameter outside valid range returns a pattern validation error
- limit out of range (below 1 or above 100) returns a parameter error
- Network or upstream Korea Customs Service outage may return a 5xx error

## How this service works

Use when you need South Korea's monthly trade for a product by HS code (e.g. 8542 chips, 870323 cars, 2710 petroleum). Data: Korea Customs Service, finalized monthly. Input: hs (2-10 digit prefix), optional month (YYYYMM, default latest), limit (1-100), sort (exports, imports, balance, total). Output: JSON totals (exports FOB, imports CIF, balance in USD, kg) with YoY % and 10-digit HSK lines with English HS descriptions and YoY. Example: ?hs=8542&month=202608

## Output

A JSON object containing aggregate trade totals (exports FOB in USD, imports CIF in USD, trade balance in USD, weights in kg) for the queried HS prefix and month, along with year-on-year percentage changes at the aggregate level. Also includes an array of up to 100 matching 10-digit HSK subheading lines, each with English HS descriptions, individual export/import/balance values in USD and kg, and their own YoY percentages. Metadata includes the queried month, comparison month, data attribution to Korea Customs Service, and any relevant notes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hs"
     ],
     "properties": {
      "hs": {
       "type": "string",
       "pattern": "^\\d{2,10}$",
       "examples": [
        "8542"
       ],
       "description": "HS code prefix, 2-10 digits (e.g. 8542 integrated circuits, 870323 passenger cars)"
      },
      "sort": {
       "enum": [
        "exports",
        "imports",
        "balance",
        "total"
       ],
       "type": "string",
       "default": "exports",
       "examples": [
        "exports"
       ],
       "description": "Line order (default exports)"
      },
      "limit": {
       "type": "integer",
       "default": 20,
       "maximum": 100,
       "minimum": 1,
       "examples": [
        20
       ],
       "description": "Max 10-digit lines returned (1-100, default 20)"
      },
      "month": {
       "type": "string",
       "pattern": "^(19|20)\\d{2}(0[1-9]|1[0-2])$",
       "examples": [
        "202608"
       ],
       "description": "Month YYYYMM (default: latest finalized month)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "hs",
      "descriptionEn",
      "descriptionLevel",
      "month",
      "compareMonth",
      "unit",
      "total",
      "lineCount",
      "sort",
      "lines",
      "notes",
      "attribution"
     ],
     "properties": {
      "hs": {
       "type": "string"
      },
      "sort": {
       "type": "string"
      },
      "unit": {
       "type": "string"
      },
      "lines": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "hs6": {
          "type": "string"
         },
         "hsCode": {
          "type": "string"
         },
         "nameKo": {
          "type": "string"
         },
         "exportsKg": {
          "type": "integer"
         },
         "importsKg": {
          "type
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/1gateway-korea-trade-by-hs-code-3ba28168/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
