API Documentation
With the MCP API, you can query classification examples, tariff codes, unified search results, and code details. A quick start guide and endpoint-level documentation are provided below.
Standard MCP Endpoint (Recommended)
- Endpoint:
POST https://www.hsciq.com/mcp/rpc, following the standard Model Context Protocol (Streamable HTTP, Stateless, JSON-RPC 2.0). - Authentication is the same as the REST endpoint: the
X-API-Keyrequest header, orAuthorization: Bearer <key>. - Provides 12 tools in total: 9 tools (search_instance / search_code / search_unified / get_code_detail / create_guilei_form / get_guilei_form / list_my_guilei_forms / add_guilei_dialog_message / list_guilei_categories) are identical to the REST endpoint in parameters and response structures; 3 additional customs announcement tools (search_gonggao / get_gonggao_detail / get_gonggao_by_code) are available only on the standard MCP endpoint.
- Error semantics differ: the REST endpoint returns HTTP 429/400 when a quota is exceeded or a call fails; the standard MCP endpoint returns HTTP 200 per the protocol, with
isError=truein the result and error text prefixed with an error code (e.g.daily_quota_exceeded: 每日调用次数已达上限(150次)). - The REST endpoints below remain available; new integrations are recommended to use the standard MCP endpoint.
Client Configuration Example (mcp.json for Claude Code / Cursor, etc.)
{
"mcpServers": {
"hsciq": {
"type": "http",
"url": "https://www.hsciq.com/mcp/rpc",
"headers": { "X-API-Key": "your_api_key" }
}
}
}
curl Examples (Stateless mode requires no handshake; send each request as an independent POST)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}"
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"search_code\",\"arguments\":{\"keywords\":\"自行车\",\"country\":\"CN\"}}}"
Integration Guide
- This site offers two integration methods: the standard MCP endpoint
POST /mcp/rpc(recommended), and the legacy REST endpoint (deprecated, kept only for compatibility with existing callers; see the bottom of this page). - The base address is built from the site domain; all requests use HTTPS.
- Address example:
https://www.hsciq.com/mcp/rpc(correct); do not write it ashttps://www.hsciq.com/MCP/mcp/rpc. - The standard MCP endpoint provides 12 tools in total; 9 are identical to the REST endpoint (see "Tools" below), and the 3 customs announcement tools are available only on the standard MCP endpoint.
- Paged tools uniformly return
pageIndex/pageSize/totalPageCount/totalItemCount/isPreviousPage/isNextPage/items.
Authentication
X-API-Key: your_api_key
ClawHub Skill Installation
- Skill page:
https://clawhub.ai/toucao/skills/hsciq-mcp
Method 1: Command-Line Installation
openclaw skills install @toucao/hsciq-mcp
Method 2: Web Installation
Visit the skill page and click Install.
Local CLI (stdio) Installation
- Use case: when an AI client only supports stdio local-process integration, use this CLI as a local bridge (internally it still calls the
/mcp/rpcendpoint above, with identical authentication and quotas). If the client supports direct HTTP connections, using the standard endpoint directly is recommended. - Download links, configuration examples, and installation instructions have been moved to a dedicated page: CLI Download.
search_instance Parameters and Return Values
keywords is the product name keyword — use specific product names such as "自行车" (bicycle), "塑料软管" (plastic hose), "手机壳" (phone case); do not use long descriptive sentences or phrases.items type:
MCPInstanceItem[] (lightweight model; internal fields such as search tokens and ranking scores are not exposed)| Field | Type | Description |
|---|---|---|
pageIndex | int | Current page |
pageSize | int | Items per page |
totalPageCount | int | Total pages |
totalItemCount | int | Total items |
isPreviousPage | bool | Whether a previous page exists |
isNextPage | bool | Whether a next page exists |
items[].instanceName | string | Instance name (plain text) |
items[].instanceEnName | string? | Instance English name |
items[].count | int | Associated code count |
items[].codes | array | Associated HS codes (flattened from category tree, deduplicated, max 10) |
items[].codes[].code | string | HS code |
items[].codes[].name | string | Code name |
search_code Response Fields
items type:
MCPCodeSearchItem[] (lightweight model, unified for CN/JP/US; use get_code_detail for the full tariff table and agreement rates)Pagination Outer Fields
| Field | Type | Description |
|---|---|---|
pageIndex | int | Current page |
pageSize | int | Items per page |
totalPageCount | int | Total pages |
totalItemCount | int | Total items |
isPreviousPage | bool | Whether a previous page exists |
isNextPage | bool | Whether a next page exists |
items | array | Result list; the item type depends on country |
items Fields (CN/JP/US)
| Field | Type | Description |
|---|---|---|
code | string | HS code |
name | string | Product name |
unit1 | string? | Legal primary unit of measure |
unit2 | string? | Legal secondary unit of measure |
categoryName | string? | Section (category) name |
twoCode | string? | Chapter (2-digit code) |
twoCodeName | string? | Chapter name |
fourCode | string? | Heading (4-digit code) |
fourCodeName | string? | Heading name |
sixCode | string? | Subheading (6-digit code) |
sixCodeName | string? | Subheading name |
taxes | object? | Key duty rates (keys vary by country, see below; empty keys are omitted) |
status | int | Status: 1=active 2=removed 3=paused |
createTime | datetime | Code creation time |
updateTime | datetime | Code last update time |
taxes Keys (by country)
| country | Key | Description |
|---|---|---|
| CN | preferentialImport | MFN (preferential) import rate |
vat | VAT rate | |
exportTaxRebates | Export tax rebate rate | |
consumption | Consumption tax rate | |
| US | generalRateOfDuty | General rate of duty |
specialRateOfDuty | Special rate of duty | |
column2RateOfDuty | Column 2 rate of duty | |
| JP | general | General (base) rate |
temporary | Temporary rate | |
wto | WTO agreement rate | |
gsp | GSP preferential rate |
search_unified Response Fields
items type:
MCPCiqItem[] / MCPHazardousItem[] / MCPPortItem[] (lightweight models; internal fields such as search tokens are not exposed)Pagination Outer Fields
| Field | Type | Description |
|---|---|---|
pageIndex | int | Current page |
pageSize | int | Items per page |
totalPageCount | int | Total pages |
totalItemCount | int | Total items |
isPreviousPage | bool | Whether a previous page exists |
isNextPage | bool | Whether a next page exists |
items | array | Result list; the item type depends on unifiedType |
When unifiedType=ciq (MCPCiqItem)
| Field | Type | Description |
|---|---|---|
code | string | CIQ code |
name | string | CIQ name |
number | string? | Regulatory condition number |
When unifiedType=hazardous (MCPHazardousItem)
| Field | Type | Description |
|---|---|---|
name | string | Hazardous chemical name |
alias | string? | Alias |
cas | string? | CAS number |
hsCode | string? | Associated HS code |
remarks | string? | Remarks |
When unifiedType=port (MCPPortItem)
| Field | Type | Description |
|---|---|---|
code | string | Port code (plain text) |
cName | string? | Port Chinese name (plain text) |
eName | string? | Port English name (plain text) |
countryName | string? | Country name |
shippingLineName | string? | Shipping line name |
get_code_detail Request & Response Fields
Request parameters
| Parameter | Type | Description |
|---|---|---|
code | string | HS code; must be a complete declaration code (digits only): CN 10 digits, US 10-digit HTS, JP 9 digits. Dot separators are allowed (e.g. 8471.30.0000) and are stripped automatically. Incomplete or over-length codes return an error with guidance in the message; if unsure of the full code, search by product name with search_code first |
country | string | Country code: CN / US / JP (default CN) |
Return object type:
MCPCodeDetailResult (non-paged)Top-Level Fields
| Field | Type | Description |
|---|---|---|
Country | string | Country: CN / JP / US |
Code | string | HS code |
Name | string | Code name |
Status | int | Status value |
UpdateTime | datetime? | Last update time |
Unit1 | string? | Legal primary unit of measure |
Unit2 | string? | Legal secondary unit of measure |
UnitOfMeasure | string? | Unit of measure description |
Remark | string? | Remarks |
Taxes | Dictionary<string,string> | Tax rate key-value map |
Extensions | object | Per-country extension object |
Common Taxes Keys
| Country | Example Keys | Description |
|---|---|---|
| CN | mfnImportRate, generalImportRate, vatRate, exportTaxRebateRate, specialGoodsMark | China rate keys |
| JP | general, temporary, wto, rcepChina | Japan rate keys |
| US | generalRateOfDuty, specialRateOfDuty, column2RateOfDuty | US rate keys |
Extensions.Cn
| Field | Type | Description |
|---|---|---|
Reporting | array | Declaration elements list (MCPCodeItem) |
Regulatory | Dictionary<string,string> | Regulatory conditions map |
Inspect | Dictionary<string,string> | Inspection and quarantine map |
RegulatoryCodes | array | Prohibition/restriction control code list (MCPRegulatoryCodeItem) |
Ciqs | array | CIQ list (MCPCodeItem) |
HSMap | array | HS code annotation map (MCPCodeItem) |
ExportRebateCodes | array | Export rebate code list (MCPExportRebateCodeItem) |
Ct | Dictionary<string,string> | Agreement rate map |
Rcep | Dictionary<string,string> | RCEP rate map |
Extensions.Jp
| Field | Type | Description |
|---|---|---|
AgreementRates | Dictionary<string,string> | Japan agreement rate map |
Extensions.Us
| Field | Type | Description |
|---|---|---|
QuotaQuantity | string? | Quota quantity |
AdditionalDuties | string? | Additional duties description |
Detail Objects
| Object | Field | Description |
|---|---|---|
MCPCodeItem | Key | Key value (code/serial number) |
MCPCodeItem | Value | Display text |
MCPCodeItem | IsRequired | Whether required |
MCPRegulatoryCodeItem | Code | Prohibition/restriction control code |
MCPRegulatoryCodeItem | Name | Control name |
MCPRegulatoryCodeItem | Mofcomcode | MOFCOM code |
MCPRegulatoryCodeItem | Iemark | Import/export flag |
MCPRegulatoryCodeItem | Reportingcategorycode | Declaration category code |
MCPRegulatoryCodeItem | ReportingElements | Declaration elements list (MCPReportingElementItem) |
MCPReportingElementItem | Elementname | Element name |
MCPReportingElementItem | Elementorder | Sort order |
MCPExportRebateCodeItem | Id | Rebate extension code |
MCPExportRebateCodeItem | Name | Rebate name |
MCPExportRebateCodeItem | Rate | Rebate rate |
create_guilei_form Parameters and Return Values
Creates an HS classification inquiry form; AI can directly submit product information and images (base64-encoded). Each user has an independent daily quota.
Request Example (Standard MCP Endpoint)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""create_guilei_form"",
""arguments"": {
""productNameCn"": ""智能手机壳"",
""productNameEn"": ""Smartphone Case"",
""uses"": ""手机保护套"",
""ingredients"": ""硅胶"",
""brand"": ""某品牌"",
""model"": ""X1"",
""images"": [
{
""fileName"": ""front.jpg"",
""data"": ""base64_encoded_image_data""
}
]
}
}
}"
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
productNameCn | string | Yes | Product Chinese name |
productNameEn | string? | No | Product English name |
categoryId | int? | No | Industry category ID; get the available list via list_guilei_categories |
uses | string? | No | Product use |
ingredients | string? | No | Product ingredients/material |
cas | string? | No | CAS number |
brand | string? | No | Brand |
model | string? | No | Model |
otherProductInfo | string? | No | Other product information |
qq | string? | No | QQ contact |
weixin | string? | No | WeChat contact |
processingMethod | string? | No | Processing method |
dimensions | string? | No | Dimensions |
applicableGender | string? | No | Applicable gender |
workingPrinciple | string? | No | Working principle |
function | string? | No | Function |
weavingProcess | string? | No | Weaving process |
material | string? | No | Material |
gramWeight | string? | No | Gram weight |
width | string? | No | Width |
endTime | string? | No | Deadline (ISO 8601 format) |
isPaid | bool? | No | Whether this is a paid inquiry |
images | array? | Yes | Image list (at least 1); each item contains fileName (file name) and data (base64 data) |
Image limits: at least 1, at most 3, each ≤ 1MB; JPG / PNG / GIF / WebP formats supported (validated via file-header magic numbers, not file extensions).
Success Response Example
The following is the data portion returned by the tool: located at
result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.{
"formId": "a1b2c3d4-...",
"url": "https://www.hsciq.com/GuiLei/a1b2c3d4-...",
"status": "已创建",
"imageCount": 1,
"imageUrls": [ "https://www.hsciq.com/uploads/guilei/..." ]
}
Response Fields
| Field | Type | Description |
|---|---|---|
formId | string | GUID of the created classification inquiry form |
url | string | Full access URL of the inquiry form |
status | string | Creation status: 已创建 (Created) |
imageCount | int | Number of successfully uploaded images |
imageUrls | string[] | Public access URL list of the images |
get_guilei_form Parameters and Return Values
Gets the details of a classification inquiry form, including discussion dialogs for all fields, the classification conclusion, and more. AI can use this to learn on which fields experts have raised questions.
Request Example (Standard MCP Endpoint)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""get_guilei_form"",
""arguments"": {
""formId"": ""a1b2c3d4-...""
}
}
}"
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
formId | string | Yes | Classification inquiry form GUID |
Return Value
Returns a
GuiLeiFormDetail object with the following top-level fields:| Field | Type | Description |
|---|---|---|
form | object | Basic information of the classification form; core fields are listed in the table below |
acl | array | Access control list |
dialogs | array | Per-field discussion dialog list; each item contains fieldKey (field name) and messages (message list) |
shares | array | Share link list |
finalization | object? | Classification conclusion (contains confirmedCode and classificationReason) |
finalizationHistory | array | Classification conclusion revision history |
Dialogs Message Structure
| Field | Type | Description |
|---|---|---|
id | string | Dialog ID |
fieldKey | string | Associated field name (e.g. ProductNameCn, Ingredients) |
messages[].senderId | string | Message sender ID |
messages[].content | string | Message content |
messages[].createTime | datetime | Message time |
messages[].messageType | int? | Message type |
form Core Fields
| Field | Type | Description |
|---|---|---|
id | string | Form GUID |
status | int | Status: 0=Closed, 1=In progress |
productNameCn | string? | Product Chinese name |
productNameEn | string? | Product English name |
categoryId | int? | Industry category ID |
categoryName | string? | Industry category name |
uses | string? | Use |
ingredients | string? | Ingredients/material |
cas | string? | CAS number |
brand | string? | Brand |
model | string? | Model |
isPaid | bool | Whether this is a paid inquiry |
isFinalized | bool | Whether a classification conclusion has been issued |
confirmedCode | string? | Final confirmed HS code |
isUnclassifiable | bool | Whether unclassifiable |
source | string? | Source (mcp means created via API) |
createTime | datetime | Creation time |
updateTime | datetime | Last update time |
list_my_guilei_forms Parameters and Return Values
Paged listing of all classification inquiry forms owned by the user associated with the current API key.
Request Example (Standard MCP Endpoint)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""list_my_guilei_forms"",
""arguments"": {
""pageIndex"": 1,
""pageSize"": 10
}
}
}"
Input Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
pageIndex | int? | No | 1 | Page number |
pageSize | int? | No | 10 | Items per page, max 100 |
Success Response Example
The following is the data portion returned by the tool: located at
result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.{
"items": [
{
"id": "a1b2c3d4-...",
"productNameCn": "智能手机壳",
"status": 1,
"isFinalized": false,
"createTime": "2026-05-08T10:30:00"
}
],
"pageIndex": 1,
"pageSize": 10,
"totalItemCount": 3,
"totalPageCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
items | array | Form list; each item is a GuiLeiForm object |
pageIndex | int | Current page |
pageSize | int | Items per page |
totalItemCount | int | Total items |
totalPageCount | int | Total pages |
For the fields of each object in items, see the "form Core Fields" table under get_guilei_form above.
add_guilei_dialog_message Parameters and Return Values
Creates a new dialog on a field of a classification inquiry form, or replies to an existing dialog. AI can use this tool to answer experts' questions on behalf of the user.
Request Example (Create New Dialog, Standard MCP Endpoint)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""add_guilei_dialog_message"",
""arguments"": {
""formId"": ""a1b2c3d4-..."",
""fieldKey"": ""Ingredients"",
""content"": ""主要成分是聚乙烯,不含阻燃剂""
}
}
}"
Request Example (Reply to Existing Dialog, arguments Part Only)
"arguments": {
"formId": "a1b2c3d4-...",
"fieldKey": "Ingredients",
"content": "已确认,确实不含阻燃剂",
"dialogId": "d5e6f7a8-..."
}
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
formId | string | Yes | Classification inquiry form GUID |
fieldKey | string | Yes | Field name (e.g. ProductNameCn, Uses, Ingredients, Cas, Brand, Model, OtherProductInfo, etc.) |
content | string | Yes | Message content |
dialogId | string? | No | If provided, replies to the existing dialog; otherwise creates a new dialog |
messageType | int? | No | Message type, passed through to the backend |
Success Response Example
The following is the data portion returned by the tool: located at
result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.{
"dialogId": "d5e6f7a8-...",
"messageId": "b9c0d1e2-...",
"action": "reply"
}
Response Fields
| Field | Type | Description |
|---|---|---|
dialogId | string | Dialog ID |
messageId | string | Message ID |
action | string | Action type: created (new dialog created) or reply (reply to an existing dialog) |
list_guilei_categories Parameters and Return Values
Gets the available industry category list, used to select
categoryId when creating a classification inquiry form.Request Example (Standard MCP Endpoint)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""list_guilei_categories"",
""arguments"": {}
}
}"
No input parameters required.
Success Response Example
The following is the data portion returned by the tool: located at
result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.[
{ "id": 1, "name": "活动物;动物产品" },
{ "id": 2, "name": "植物产品" },
{ "id": 3, "name": "动、植物油脂" }
]
Response Fields
| Field | Type | Description |
|---|---|---|
id | int | Industry category ID, used as the categoryId parameter of create_guilei_form |
name | string | Industry category name |
search_gonggao Parameters and Return Values Standard MCP Endpoint Only
Searches customs announcements (fuzzy match on title / document number / content). When
keywords is empty, returns the latest announcements ordered by publish time descending. Filterable by publish date range. Customs announcements are public data.Request Parameters
| Parameter | Type | Description |
|---|---|---|
country | string | Required. Country code: CN / US / JP (customs announcements currently have data for CN only; US/JP return country_not_supported) |
keywords | string? | Search keyword matching title / document number / content; leave empty to get the latest announcements |
pageIndex | int | Page number, starting from 1 (default 1) |
pageSize | int | Items per page (default 10, max 50) |
publishFrom | string? | Publish date from (yyyy-MM-dd, inclusive) |
publishTo | string? | Publish date to (yyyy-MM-dd, inclusive) |
Paging Envelope Fields
| Field | Type | Description |
|---|---|---|
pageIndex | int | Current page |
pageSize | int | Items per page |
totalPageCount | int | Total pages |
totalItemCount | int | Total items |
items | array | Announcement list (note: the announcement tools do not return isPreviousPage/isNextPage) |
items Fields (announcement object; the gonggao field in get_gonggao_detail / get_gonggao_by_code has the same structure)
| Field | Type | Description |
|---|---|---|
id | int | Announcement ID (used as the gonggaoId parameter of get_gonggao_detail) |
title | string | Announcement title |
content | string | Announcement body (HTML; may be a content snippet when matched by search) |
from | string | Source |
documentNumber | string? | Document number |
regulationsType | string? | Regulation type |
publishTime | datetime? | Publish time |
effectiveTime | datetime? | Effective time |
potence | string? | Legal effect status |
documentIssuingAgency | string? | Issuing agency |
sourceUrl | string? | Original URL (China Customs regulation library) |
createTime | datetime | Record creation time |
updateTime | datetime | Record update time |
get_gonggao_detail Parameters and Return Values Standard MCP Endpoint Only
Gets a customs announcement by ID, including the body and 3 groups of related HS codes (created / updated / deleted).
Request Parameters
| Parameter | Type | Description |
|---|---|---|
gonggaoId | int | Required. Announcement ID (the id returned by search_gonggao) |
country | string | Required. Country code: CN / US / JP (currently CN only) |
Returns a single object (not paged). Returns
not_found if the announcement does not exist or is offline.Top-Level Fields
| Field | Type | Description |
|---|---|---|
gonggao | object | Announcement object (same fields as search_gonggao items) |
codeGroups | object | Related HS codes in 3 groups (see table below) |
codeGroups Fields
| Field | Type | Description |
|---|---|---|
created | string[] | Newly created codes (ascending) |
updated | string[] | Modified codes |
deleted | string[] | Deleted codes |
totalCount | int | Total across the 3 groups |
get_gonggao_by_code Parameters and Return Values Standard MCP Endpoint Only
Reverse lookup by HS code: returns announcements related to the given code; each item includes
changeType (the code's change type in that announcement).Request Parameters
| Parameter | Type | Description |
|---|---|---|
code | string | Required. CN 10-digit HS code (digits only; dot separators such as 8471.30.0000 are stripped automatically) |
country | string | Required. Country code: CN / US / JP (currently CN only) |
pageIndex | int | Page number, starting from 1 (default 1) |
pageSize | int | Items per page (default 10, max 50) |
Paging Envelope Fields
| Field | Type | Description |
|---|---|---|
pageIndex | int | Current page |
pageSize | int | Items per page |
totalPageCount | int | Total pages |
totalItemCount | int | Total items |
items | array | Result list (see table below) |
items Fields
| Field | Type | Description |
|---|---|---|
gonggao | object | Announcement object (same fields as search_gonggao items) |
changeType | string | The code's change type in that announcement: create / update / delete |
Error Codes
401-type errors are identical on both endpoints (HTTP 401). 400/429/500-type errors are returned with the HTTP status codes in the table below on the legacy REST endpoint; on the standard MCP endpoint they return HTTP 200 per the protocol, with
isError=true in the result and error text prefixed with an error code (e.g. daily_quota_exceeded: 每日调用次数已达上限(150次)).| HTTP | error | Meaning |
|---|---|---|
| 401 | missing_api_key | API key not provided |
| 401 | invalid_api_key | Invalid API key |
| 401 | api_key_expired | API key expired |
| 401 | api_key_revoked | API key revoked |
| 400 | invalid_params | Invalid parameters (e.g. productNameCn is empty, unsupported image format, etc.) |
| 400 | forbidden_keyword | Keyword triggered blocking |
| 400 | unknown_tool | Unsupported tool name |
| 404 | not_found | Resource does not exist or is offline (e.g. unknown announcement ID) |
| 400 | country_not_supported | This country has not been onboarded for the data (customs announcements currently CN only) |
| 429 | daily_quota_exceeded | Daily total call limit reached |
| 429 | daily_guilei_quota_exceeded | Daily classification inquiry creation limit reached (default: 5) |
| 500 | internal_error | Internal server error |
The following REST endpoints are deprecated. They are kept only for compatibility with existing callers and are no longer updated; new integrations should use the standard MCP endpoint
POST /mcp/rpc (see "Standard MCP Endpoint (Recommended)" at the top).
GET /mcp Deprecated
Returns service metadata and tool entry points. The REST API uniformly returns JSON; the success structure is
{ "ok": true, "toolName": "...", "data": ... }.{
"name": "HSCIQ2 MCP",
"version": "1.0",
"standardMCPEndpoint": "/mcp/rpc",
"toolsEndpoint": "/mcp/tools/list",
"callEndpoint": "/mcp/tools/call"
}
POST /mcp/tools/list Deprecated
Returns the available tools and input parameter definitions.
curl -X POST "https://www.hsciq.com/mcp/tools/list" ^
-H "Content-Type: application/json" ^
-H "X-API-Key: your_api_key"
{
"version": "1.0",
"tools": [
{ "name": "search_instance" },
{ "name": "search_code" },
{ "name": "search_unified" },
{ "name": "get_code_detail" },
{ "name": "create_guilei_form" },
{ "name": "get_guilei_form" },
{ "name": "list_my_guilei_forms" },
{ "name": "add_guilei_dialog_message" },
{ "name": "list_guilei_categories" }
]
}
POST /mcp/tools/call (search_instance / search_code / search_unified) Deprecated
The first three tools are all invoked through this endpoint and return a unified paged structure.
curl -X POST "https://www.hsciq.com/mcp/tools/call" ^
-H "Content-Type: application/json" ^
-H "X-API-Key: your_api_key" ^
-d "{
""toolName"": ""search_code"",
""arguments"": {
""keywords"": ""塑料软管"",
""country"": ""CN"",
""pageIndex"": 1,
""pageSize"": 10,
""filterFailureCode"": true
}
}"
- Pagination outer fields:
pageIndex,pageSize,totalPageCount,totalItemCount,isPreviousPage,isNextPage,items. itemstypes:search_instance → MCPInstanceItem[],search_code → MCPCodeSearchItem[],search_unified → MCPCiqItem[]/MCPHazardousItem[]/MCPPortItem[].
POST /mcp/tools/call (get_code_detail) Deprecated
Returns a non-paged detail object by country + code.
{
"toolName": "get_code_detail",
"arguments": {
"country": "CN",
"code": "3926909090"
}
}
For detailed response fields, see the
get_code_detail tool section above.