Developers

A customs engine your apps and AI agents can call

Classify products, look up real US duty rates and compute landed cost over a public JSON API and an MCP server. CORS-enabled, cited data, honest about what isn't verified.

base url
https://portrobin.com/api

REST API

POST/api/classify

Classify a product description to ranked HTS candidates with reasoning. Degrades to keyword matching with no AI provider (needsProvider:true).

shell
curl -X POST https://portrobin.com/api/classify \
  -H "Content-Type: application/json" \
  -d '{"description":"women'\''s knit cotton t-shirt","origin":"CN"}'
GET/api/search?q=

Search the HTS catalog by keyword or code. Optional &limit= (1–50).

shell
curl "https://portrobin.com/api/search?q=cotton%20t-shirt&limit=5"
GET/api/hs-code/{code}

One HTS line: description, general (Column 1) rate and the additional measures that apply — all cited.

shell
curl "https://portrobin.com/api/hs-code/6109.10"
GET/api/duty?hs=&origin=

Effective duty for a code + origin: base rate plus stacking Section 301/232/IEEPA measures and the effective rate.

shell
curl "https://portrobin.com/api/duty?hs=6109.10&origin=CN"
POST/api/landed-cost

Full landed cost. Resolves the duty rate from the dataset when hs+origin are given, else uses your dutyRate/additionalRates.

shell
curl -X POST https://portrobin.com/api/landed-cost \
  -H "Content-Type: application/json" \
  -d '{"customsValue":5000,"hs":"6109.10","origin":"CN","freight":600,"insurance":120,"mode":"ocean"}'

Every response includes a source, a disclaimer, and verifiedOn where relevant. Duty rates come from the dataset, never a model.

MCP server

PortRobin runs an MCP-over-HTTP endpoint (Streamable HTTP transport, JSON-RPC 2.0) at https://portrobin.com/api/mcp so AI agents can use it as a native tool — call initialize, then tools/list and tools/call.

Client config

mcp.json
{
  "mcpServers": {
    "portrobin": {
      "url": "https://portrobin.com/api/mcp"
    }
  }
}

Initialize (raw JSON-RPC)

shell
curl -X POST https://portrobin.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize",
       "params":{"protocolVersion":"2024-11-05"}}'

Tools

classify_product

Describe a product → ranked HS/HTS codes with reasoning.

lookup_duty

HTS code + origin → base rate + Section 301/232/IEEPA measures.

compute_landed_cost

Value + code/origin → full landed cost (duty, MPF, HMF, freight).

get_hts_code

Fetch one HTS line with its rate and measures, cited.

search_hts

Search the HTS catalog by keyword or code.

llms.txt for agents

A plaintext map of the API, MCP tools and free tools, so an AI agent reading https://portrobin.com/llms.txt knows it can call PortRobin directly.

Honesty contract

Duty figures are sourced with a verification date; unverified rates are flagged, never guessed. Nothing is a customs ruling. See the disclaimer.

Build with the classifier and dataset behind PortRobin

Sign in for higher API rate limits, saved products and tariff-change alerts on top of the same public endpoints.