Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/trade/stats/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"basis": [
"records",
"official"
],
"hs_code": "847130",
"importer_country": "US",
"top": 10
}'curl --request POST \
--url https://api.aisa.one/apis/v1/trade/stats/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hs_code": "847130"
}
'import requests
url = "https://api.aisa.one/apis/v1/trade/stats/query"
payload = { "hs_code": "847130" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hs_code: '847130'})
};
fetch('https://api.aisa.one/apis/v1/trade/stats/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trade/stats/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hs_code' => '847130'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trade/stats/query"
payload := strings.NewReader("{\n \"hs_code\": \"847130\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/trade/stats/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hs_code\": \"847130\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trade/stats/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hs_code\": \"847130\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"coverage": {
"recorded_value_share": 123
},
"official": {
"by_month": [
{
"month": "<string>",
"value_usd": 123,
"partial": true
}
],
"by_partner_country": [
{
"country": "<string>",
"share": 123,
"value_usd": 123
}
],
"flow": "import",
"period": {
"since": "<string>",
"until": "<string>"
},
"reporter": "<string>",
"source": "official_statistics",
"value_basis": "customs",
"value_usd": 123,
"cif_value_usd": 123,
"mirror": true,
"missing_months": [
"<string>"
],
"quantity": 123,
"quantity_unit": "<string>",
"stopped_reporting": [
{
"country": "<string>",
"last_month": "<string>",
"share": 123
}
],
"unit_value_usd": 123
},
"records": {
"by_exporter_country": [
{
"country": "<string>",
"shipments": 123
}
],
"by_importer_country": [
{
"country": "<string>",
"shipments": 123
}
],
"by_month": [
{
"month": "<string>",
"partial": true,
"recorded_value_usd": 123,
"shipments": 123
}
],
"recorded_value_usd": 123,
"shipments": 123,
"company_match": "id"
}
},
"notice": "<string>",
"query": {
"data_through": "<string>"
}
}Global Trade & Customs
Query trade market statistics and monthly trends
Global Trade & Customs API (trade.stats.query)
POST
https://api.aisa.one
/
apis
/
v1
/
trade
/
stats
/
query
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/trade/stats/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"basis": [
"records",
"official"
],
"hs_code": "847130",
"importer_country": "US",
"top": 10
}'curl --request POST \
--url https://api.aisa.one/apis/v1/trade/stats/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hs_code": "847130"
}
'import requests
url = "https://api.aisa.one/apis/v1/trade/stats/query"
payload = { "hs_code": "847130" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hs_code: '847130'})
};
fetch('https://api.aisa.one/apis/v1/trade/stats/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trade/stats/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hs_code' => '847130'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trade/stats/query"
payload := strings.NewReader("{\n \"hs_code\": \"847130\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/trade/stats/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hs_code\": \"847130\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trade/stats/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hs_code\": \"847130\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"coverage": {
"recorded_value_share": 123
},
"official": {
"by_month": [
{
"month": "<string>",
"value_usd": 123,
"partial": true
}
],
"by_partner_country": [
{
"country": "<string>",
"share": 123,
"value_usd": 123
}
],
"flow": "import",
"period": {
"since": "<string>",
"until": "<string>"
},
"reporter": "<string>",
"source": "official_statistics",
"value_basis": "customs",
"value_usd": 123,
"cif_value_usd": 123,
"mirror": true,
"missing_months": [
"<string>"
],
"quantity": 123,
"quantity_unit": "<string>",
"stopped_reporting": [
{
"country": "<string>",
"last_month": "<string>",
"share": 123
}
],
"unit_value_usd": 123
},
"records": {
"by_exporter_country": [
{
"country": "<string>",
"shipments": 123
}
],
"by_importer_country": [
{
"country": "<string>",
"shipments": 123
}
],
"by_month": [
{
"month": "<string>",
"partial": true,
"recorded_value_usd": 123,
"shipments": 123
}
],
"recorded_value_usd": 123,
"shipments": 123,
"company_match": "id"
}
},
"notice": "<string>",
"query": {
"data_through": "<string>"
}
}请求规范
- 方法与路径: POST /apis/v1/trade/stats/query
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/trade/stats/query
{
"operationId": "trade.stats.query",
"method": "POST",
"path": "/apis/v1/trade/stats/query",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"basis": [
"records",
"official"
],
"hs_code": "847130",
"importer_country": "US",
"top": 10
}
},
"minimal": {
"value": {
"basis": [
"records",
"official"
],
"hs_code": "847130",
"importer_country": "US",
"top": 10
}
}
},
"schema": {
"additionalProperties": false,
"allOf": [
{
"anyOf": [
{
"properties": {
"company": {}
},
"required": [
"company"
]
},
{
"properties": {
"hs_code": {}
},
"required": [
"hs_code"
]
},
{
"properties": {
"product": {}
},
"required": [
"product"
]
}
]
}
],
"properties": {
"basis": {
"default": [
"records",
"official"
],
"items": {
"enum": [
"official",
"records"
],
"type": "string"
},
"maxItems": 2,
"minItems": 1,
"type": "array"
},
"company": {
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"exporter_country": {
"maxLength": 80,
"minLength": 2,
"type": "string"
},
"hs_code": {
"maxLength": 10,
"minLength": 2,
"pattern": "^[0-9]{2,10}$",
"type": "string"
},
"importer_country": {
"maxLength": 80,
"minLength": 2,
"type": "string"
},
"product": {
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"role": {
"enum": [
"exporter",
"importer"
],
"type": "string"
},
"since": {
"maxLength": 10,
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"type": "string"
},
"top": {
"default": 20,
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"until": {
"maxLength": 10,
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.1 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
application/json
- Option 1
- Option 2
- Option 3
响应
Normalized successful response