The API feature in TariffBase allows developers to retrieve tariff rate data through programmatic access. This tool is designed for easy integration with external systems, providing accurate and up-to-date tariff information.
To access the API:
Note: API access is available exclusively with the Professional Plan.

All API requests require authentication using your API token. Include the token in the request header:
Authorization: Token your-api-token-here
Retrieve tariff rates for a specific product code between trading partners.
Endpoint:
GET https://www.tariffbase.io/api/v1/tariff-rate/
| Parameter | Type | Required | Description |
|---|---|---|---|
code |
string | Yes | The HS code or national tariff code (e.g., 8703, 02013006) |
country |
string | Yes | The importing country code (CN, EU, US) |
partner |
string | Yes | The exporting/origin country code (e.g., CN, US, DE) |
Using cURL:
curl -X GET "https://www.tariffbase.io/api/v1/tariff-rate/?code=8703&partner=CN&country=US" \
-H "Authorization: Token your-api-token-here"
Using Python:
import requests
url = "https://www.tariffbase.io/api/v1/tariff-rate/"
headers = {"Authorization": "Token your-api-token-here"}
params = {
"code": "8703",
"partner": "CN",
"country": "US"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)
{
"code": "8703",
"description": "Motor cars and other motor vehicles",
"country": "US",
"partner": "CN",
"rates": [
{
"regime": "MFN",
"rate": "2.5%",
"notes": "Most Favored Nation rate"
},
{
"regime": "Additional-CHN-2024",
"rate": "+100%",
"notes": "Section 301 additional tariff"
}
],
"last_updated": "2025-01-15"
}
To ensure system stability and fair usage, the API enforces the following rate limits:
| Plan | Rate Limit |
|---|---|
| Professional | 10 requests per minute |
If you exceed the rate limit, the API will return a 429 Too Many Requests response. Wait before making additional requests.
| Status Code | Description |
|---|---|
200 |
Success - Request completed successfully |
400 |
Bad Request - Missing or invalid parameters |
401 |
Unauthorized - Invalid or missing API token |
403 |
Forbidden - API access not enabled for your plan |
404 |
Not Found - No tariff data found for the specified parameters |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error - Contact support if this persists |
{
"error": "Invalid country code",
"message": "The country parameter must be one of: CN, EU, US",
"status": 400
}
If you encounter issues or have questions about the API:
By following these guidelines, you can efficiently integrate TariffBase's API into your workflow for automated tariff data retrieval.