HS Code
POST /api/v1/reportHscode
Request parameters
sort
string
Field to sort by date or weight.
- Example:
'count','weight','amount'
order
string
Asc for ascending, desc for descending.
- Example:
desc
hs_code_digit
string
hs_code_6 – Aggregate by HS 6-digit; hs_code_8 – Aggregate by HS 8-digit.
- Example:
hs_code_6
page
int
Page number (min: 1, max: 1000)
- Example:
10
page_size
int
Page size (default: 10, max: 50)
- Example:
10
{
"data_coverage": 1,
"date_range": [20220101, 20220130],
"product_keyword": ["led"],
"hs_code_digit": "hs_code_6",
"sort": "count",
"order": "desc",
"page_size": 10,
"page": 1
}
curl https://api.tradedata.io/api/v1/reportHscode \
-H "Authorization: Bearer yourTokenHere" \
-H "Content-Type: application/json" \
-d '{"data_coverage": 1, "date_range": [20220101, 20220130], "product_keyword": ["led"], "hs_code_digit": "hs_code_6", "sort": "count", "order": "desc", "page_size": 10, "page": 1}'
import requests
response = requests.post(
"https://api.tradedata.io/api/v1/reportHscode",
headers={
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
json={
"data_coverage": 1,
"date_range": [
20220101,
20220130,
],
"product_keyword": [
"led",
],
"hs_code_digit": "hs_code_6",
"sort": "count",
"order": "desc",
"page_size": 10,
"page": 1,
},
)
print(response.json())
const response = await fetch("https://api.tradedata.io/api/v1/reportHscode", {
method: "POST",
headers: {
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
body: JSON.stringify({
"data_coverage": 1,
"date_range": [
20220101,
20220130
],
"product_keyword": [
"led"
],
"hs_code_digit": "hs_code_6",
"sort": "count",
"order": "desc",
"page_size": 10,
"page": 1
}),
});
const data = await response.json();
<?php
$ch = curl_init("https://api.tradedata.io/api/v1/reportHscode");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer yourTokenHere",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"data_coverage" => 1,
"date_range" => [
20220101,
20220130
],
"product_keyword" => [
"led"
],
"hs_code_digit" => "hs_code_6",
"sort" => "count",
"order" => "desc",
"page_size" => 10,
"page" => 1
]),
]);
echo curl_exec($ch);
Response parameters
statusCode
int
Status code
- Example:
200
data
array
Result container
entityObject
Json
Each field in the entityObject contains:
hsCode
string
HS code
- Example:
85101000
totalQuantity
float
Total quantity of goods (aggregated)
- Example:
212.89
totalWeight
float
Total shipment weight (aggregated, kg)
- Example:
342.72
totalAmount
float
Total trade amount (aggregated,USD)
- Example:
523.72
transactionCount
int
Total number of trade records or shipments
- Example:
352
total
int
Total number of grouped records returned in this result set
- Example:
2006
{
"code": 200,
"success": true,
"data": [
{
"hsCode": "8532300000",
"totalQuantity": 100256577.71,
"totalWeight": 8484872.5,
"totalAmount": 92048671.28,
"transactionCount": 19380
}
],
"msg": "success",
"total": 2006,
"pageSize": 10,
"current": 1,
"sumResult": {
"totalAmount": 1592884532.19,
"totalQuantity": 294588523.02,
"totalWeight": 799452292.17,
"transactionCount": 78060
}
}
Importer
Analyze import activities by company. Identify top importers, aggregated shipment frequency, value, weight, and quantity. Useful for supplier sourcing and trade route intelligence.
Country of Origin
View exports originating from selected countries. Understand source-country trends, export partners, and top commodities being shipped out.