{"openapi":"3.1.0","jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base","info":{"title":"hts.usitc.gov API — compiled by Unbrowse","version":"2026.09.28","summary":"Call hts.usitc.gov's own capabilities over HTTP, without a browser.","description":"The first-party capabilities of hts.usitc.gov, compiled from the site's own requests. Each tool is one POST with its inputs as a JSON body; the answer is the run, with the site's result when it is verified. Only verified results bill. The same tools are an MCP server at https://unbrowse.ai/api/v1/sites/hts.usitc.gov/mcp. Unofficial: not made or endorsed by hts.usitc.gov.","contact":{"name":"Unbrowse","url":"https://unbrowse.ai"}},"externalDocs":{"description":"Calling an indexed website","url":"https://unbrowse.ai/docs/site-apis"},"servers":[{"url":"https://unbrowse.ai","description":"Unbrowse"}],"security":[{"bearer":[]}],"tags":[{"name":"hts.usitc.gov","description":"Tools compiled from hts.usitc.gov"}],"paths":{"/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_get_rates":{"post":{"operationId":"hts_usitc_gov__get_reststop_get_rates","summary":"Read reststop get rates on hts.usitc.gov — Harmonized Tariff Schedule","description":"Read reststop get rates on hts.usitc.gov — Harmonized Tariff Schedule. Compiled from hts.usitc.gov's own requests and shared by an Unbrowse user. Inputs: search. Mid-run it asks you to pick selected_item from the options it found (status input_required). Returns data. A large answer comes back as its records at data (as results); pass select for other parts. Read-only on hts.usitc.gov.","tags":["hts.usitc.gov"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Deadline"},{"$ref":"#/components/parameters/EndUser"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"type":"string","description":"search (typed during “fill Search”)"},"select":{"type":"array","items":{"type":"string"},"description":"Keep only these parts of the result: dots walk keys, [] maps over a list, a final {a,b} keeps several keys (e.g. \"results[].{title,url}\"). Unmatched paths come back in selectMissing. Left out on a large answer, its records at data come back as results (the rest is named in projection).","examples":[["data[]"]]},"deadlineMs":{"type":"integer","minimum":5000,"maximum":300000,"default":60000,"description":"Answer within this many ms (5,000–300,000). Past it: 504 run_timeout with a runId to poll; the run keeps going. The x-unbrowse-deadline-ms header wins."}},"required":["search"],"additionalProperties":false}}}},"responses":{"200":{"description":"The run finished: `status` succeeded carries the site's verified `result`; failed carries `error` (never billed).","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","description":"The run, for unbrowse_inspect / resume / cancel"},"status":{"type":"string","enum":["succeeded","input_required","failed","outcome_unknown","cancelled","working","accepted","expired"],"description":"succeeded carries the site's result; input_required lists what to answer (unbrowse_resume)"},"capabilityId":{"type":["string","null"]},"result":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"additionalDuties":{"type":"null"},"description":{"type":"string"},"effectivePeriod":{"type":"null"},"footnotes":{"type":"array"},"general":{"type":["null","string"]},"hasHighlight":{"type":"null"},"highlightHtsNo":{"type":"null"},"highlightStatSuffix":{"type":"null"},"htmlStatNote":{"type":"null"},"htscode":{"type":"null"},"htsno":{"type":"string"},"indent":{"type":"string"},"other":{"type":["null","string"]},"quotaQuantity":{"type":"null"},"selector":{"type":"string"},"special":{"type":["null","string"]},"statisticalSuffix":{"type":"string"},"status":{"type":["string","null"]},"tariff":{"type":"null"},"type":{"type":"null"},"unique":{"type":"string"},"units":{"type":["null","array"]}},"required":["additionalDuties","description","effectivePeriod","footnotes","general","hasHighlight","highlightHtsNo","highlightStatSuffix","htmlStatNote","htscode","htsno","indent","other","quotaQuantity","selector","special","statisticalSuffix","status","tariff","type","unique","units"]}}},"required":["data"]},"error":{"type":["object","null"]},"requirements":{"type":"array"},"via":{"type":["string","null"],"enum":["http","rendered",null]}},"required":["runId","status"],"additionalProperties":true}}}},"202":{"description":"The run needs input (`status` input_required): answer `requirements` with POST /api/v1/runs/{runId}/responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"description":"The body is not JSON, or a value is malformed (invalid_input, bad_request).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or an invalid one: send Authorization: Bearer <key>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of verified calls this month (quota_exceeded) or out of paid credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such tool on this site (not_found).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The tool is quarantined (tool_quarantined): it failed its checks and is rechecked automatically; the message says what to use now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An input the tool does not take (unknown_argument): the message lists the ones it does.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (by the site or by Unbrowse): retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"run_timeout: the run did not finish within its deadline. It keeps going: poll the given runId. A verified success is billed once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTimeout"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s 'https://unbrowse.ai/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_get_rates' \\\n  -H \"authorization: Bearer $UNBROWSE_API_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\"search\":\"<search>\"}'"},{"lang":"TypeScript","label":"TypeScript","source":"import { Unbrowse } from \"@unbrowse/sdk\";\n\nconst ub = new Unbrowse(); // reads UNBROWSE_API_KEY\nconst run = await ub.callTool(\"hts.usitc.gov\", \"hts_usitc_gov__get_reststop_get_rates\", {\n  search: \"<search>\",\n});\nif (run.status === \"succeeded\") console.log(run.result);"},{"lang":"Python","label":"Python","source":"import os, requests\n\nr = requests.post(\n    \"https://unbrowse.ai/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_get_rates\",\n    headers={\"Authorization\": f\"Bearer {os.environ['UNBROWSE_API_KEY']}\"},\n    json={\n        \"search\": \"<search>\",\n    },\n    timeout=120,\n)\nr.raise_for_status()\nrun = r.json()\nif run[\"status\"] == \"succeeded\":\n    print(run[\"result\"])"}],"x-unbrowse-capability":"public.hts_usitc_gov.get_reststop_get_rates","x-unbrowse-read-only":true,"x-unbrowse-version":"2026.09.28"}},"/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_search":{"post":{"operationId":"hts_usitc_gov__get_reststop_search","summary":"Search HTS codes by keyword","description":"Search HTS codes by keyword. Compiled from hts.usitc.gov's own requests and shared by an Unbrowse user. Inputs: query. Returns data. A large answer comes back as its records at data (as results); pass select for other parts. Read-only on hts.usitc.gov.","tags":["hts.usitc.gov"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/Deadline"},{"$ref":"#/components/parameters/EndUser"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"query (typed during “fill Search”)"},"select":{"type":"array","items":{"type":"string"},"description":"Keep only these parts of the result: dots walk keys, [] maps over a list, a final {a,b} keeps several keys (e.g. \"results[].{title,url}\"). Unmatched paths come back in selectMissing. Left out on a large answer, its records at data come back as results (the rest is named in projection).","examples":[["data[]"]]},"deadlineMs":{"type":"integer","minimum":5000,"maximum":300000,"default":60000,"description":"Answer within this many ms (5,000–300,000). Past it: 504 run_timeout with a runId to poll; the run keeps going. The x-unbrowse-deadline-ms header wins."}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The run finished: `status` succeeded carries the site's verified `result`; failed carries `error` (never billed).","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","description":"The run, for unbrowse_inspect / resume / cancel"},"status":{"type":"string","enum":["succeeded","input_required","failed","outcome_unknown","cancelled","working","accepted","expired"],"description":"succeeded carries the site's result; input_required lists what to answer (unbrowse_resume)"},"capabilityId":{"type":["string","null"]},"result":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"htsno":{"type":"string"},"statisticalSuffix":{"type":"string"},"description":{"type":"string"},"htscode":{"type":"null"},"indent":{"type":"string"},"footnotes":{"type":"array"},"units":{"type":["array","null"]},"tariff":{"type":"null"},"unique":{"type":"null"},"hasHighlight":{"type":"null"},"highlightHtsNo":{"type":"null"},"highlightStatSuffix":{"type":"null"},"type":{"type":"null"},"effectivePeriod":{"type":"null"},"quotaQuantity":{"type":"null"},"additionalDuties":{"type":"null"},"general":{"type":["string","null"]},"other":{"type":["string","null"]},"special":{"type":["string","null"]},"status":{"type":"null"},"htmlStatNote":{"type":"null"},"selector":{"type":"string"}},"required":["htsno","statisticalSuffix","description","htscode","indent","footnotes","units","tariff","unique","hasHighlight","highlightHtsNo","highlightStatSuffix","type","effectivePeriod","quotaQuantity","additionalDuties","general","other","special","status","htmlStatNote","selector"]}}},"required":["data"]},"error":{"type":["object","null"]},"requirements":{"type":"array"},"via":{"type":["string","null"],"enum":["http","rendered",null]}},"required":["runId","status"],"additionalProperties":true}}}},"202":{"description":"The run needs input (`status` input_required): answer `requirements` with POST /api/v1/runs/{runId}/responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"400":{"description":"The body is not JSON, or a value is malformed (invalid_input, bad_request).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or an invalid one: send Authorization: Bearer <key>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of verified calls this month (quota_exceeded) or out of paid credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such tool on this site (not_found).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The tool is quarantined (tool_quarantined): it failed its checks and is rechecked automatically; the message says what to use now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An input the tool does not take (unknown_argument): the message lists the ones it does.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (by the site or by Unbrowse): retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"run_timeout: the run did not finish within its deadline. It keeps going: poll the given runId. A verified success is billed once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTimeout"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s 'https://unbrowse.ai/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_search' \\\n  -H \"authorization: Bearer $UNBROWSE_API_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\"query\":\"<query>\"}'"},{"lang":"TypeScript","label":"TypeScript","source":"import { Unbrowse } from \"@unbrowse/sdk\";\n\nconst ub = new Unbrowse(); // reads UNBROWSE_API_KEY\nconst run = await ub.callTool(\"hts.usitc.gov\", \"hts_usitc_gov__get_reststop_search\", {\n  query: \"<query>\",\n});\nif (run.status === \"succeeded\") console.log(run.result);"},{"lang":"Python","label":"Python","source":"import os, requests\n\nr = requests.post(\n    \"https://unbrowse.ai/api/v1/sites/hts.usitc.gov/call/hts_usitc_gov__get_reststop_search\",\n    headers={\"Authorization\": f\"Bearer {os.environ['UNBROWSE_API_KEY']}\"},\n    json={\n        \"query\": \"<query>\",\n    },\n    timeout=120,\n)\nr.raise_for_status()\nrun = r.json()\nif run[\"status\"] == \"succeeded\":\n    print(run[\"result\"])"}],"x-unbrowse-capability":"public.hts_usitc_gov.get_reststop_search","x-unbrowse-read-only":true,"x-unbrowse-version":"2026.09.28"}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An Unbrowse API key (ub_live_…, from https://unbrowse.ai/app/keys) or an OAuth access token."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Makes a retry safe: a repeat with the same key returns the same run instead of starting another."},"Deadline":{"name":"x-unbrowse-deadline-ms","in":"header","required":false,"schema":{"type":"integer","minimum":5000,"maximum":300000,"default":60000},"description":"Answer within this many ms; past it 504 run_timeout (the run keeps going). Same as deadlineMs in the body."},"EndUser":{"name":"X-Unbrowse-End-User","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"With an org key: run as this end user, in their own workspace with their own logins."}},"schemas":{"Run":{"type":"object","properties":{"runId":{"type":"string","description":"The run, for unbrowse_inspect / resume / cancel"},"status":{"type":"string","enum":["succeeded","input_required","failed","outcome_unknown","cancelled","working","accepted","expired"],"description":"succeeded carries the site's result; input_required lists what to answer (unbrowse_resume)"},"capabilityId":{"type":["string","null"]},"result":{},"error":{"type":["object","null"]},"requirements":{"type":"array"},"via":{"type":["string","null"],"enum":["http","rendered",null]}},"required":["runId","status"],"additionalProperties":true},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable, e.g. not_found, unknown_argument, quota_exceeded, run_timeout"},"message":{"type":"string","description":"What happened and what to do, in plain words"}},"additionalProperties":true}},"additionalProperties":true},"RunTimeout":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","runId","poll"],"properties":{"code":{"type":"string","const":"run_timeout"},"message":{"type":"string"},"runId":{"type":"string"},"deadlineMs":{"type":"integer"},"poll":{"type":"string","description":"GET this to read the run's answer when it lands"}},"additionalProperties":true}},"additionalProperties":true}}}}