About
GOV.UK Trade Tariff API
The GOV.UK Trade Tariff APIs make it easy to access the UK Trade Tariff Service data (opens in new tab). The data includes commodity codes, duties and VAT rates.
The APIs are useful for any business and individuals wanting to access up-to-date tariff data through a predictable and stable interface.
What can you do with the APIs?
Using the Trade Tariff APIs, you can search for commodities by:
- name
- code
- date or data range, including historical data
This allows you to fill in declarations and other paperwork and determine:
- if duty or VAT applies
- if duty relief and preferential rates are available
- if import or export licenses are required
You will also be able to:
- search the tariff by date or date range, including historical data
- query quota measures by commodity, year, geographic area and more.
Using the APIs
There are multiple APIs available through the UK Trade Tariff Service covering different user needs and search criteria. Some of the core APIs are:
- The Trade Tariff API provides detailed UK Trade Tariff data for imports and exports. It is ideal if you want to access structured trade tariff data across jurisdictions and time.
- The Categorisation API relates to bringing goods in and out of Northern Ireland and determines whether goods qualify for the simplified procedures under the Windsor Framework.
- The Fast Parcel Operator (FPO) Commodity Code Identification Tool API is for express operators handling time-dependent deliveries.
Additional APIs are available to support specific trade tariff and classification needs.
Useful links
- JSON:API Specification (opens in new tab)
- OpenAPI Specification (opens in new tab)
- Curl (opens in new tab)
- Postman (opens in new tab)
- Ruby on Rails (opens in new tab)
- HTTPie (opens in new tab)
- jq (opens in new tab)
Authentication
The GOV.UK Trade Tariff APIs can be used without authentication for basic access.
When you use managed developer credentials (Trade Tariff API keys), authenticate with an OAuth 2.0 client_credentials access token. Send the same Accept header as for other requests in this documentation (application/vnd.hmrc.2.0+json) so responses are correctly formatted, together with Authorization: Bearer <access_token>.
For token endpoints per environment, example requests, token expiry and retry behaviour, and sample code in several languages, see Authenticating with managed credentials in Using the Trade Tariff API.
Developer Portal
The HMRC Trade Tariff Developer Portal allows you to:
- access official trade tariff information
- create and manage your API keys
- explore, test and integrate tariff data directly from HMRC
- manage organisational details
- invite new members and remove existing members
Sign up to the Trade Tariff API Developer Portal (opens in new tab).
More detail is on the Developer Portal page.
Caching
The GOV.UK Trade Tariff is updated daily. To reduce the number of API calls, cache requests for 24 hours.
Security and compliance
Reporting vulnerabilities
If you believe there is a security issue with GOV.UK Trade Tariff APIs, email hmrc-trade-tariff-support-g@digital.hmrc.gov.uk immediately.
Please don’t disclose the suspected breach publicly until it has been fixed.
Security
GOV.UK Trade Tariff APIs follow government HTTPS security guidelines. The Hypertext Transfer Protocol Secure (HTTPS), which involves the Transport Layer Security (TLS) protocol, is used by the platform to provide secure connections.
Security patches
We upgrade the framework and library code in GOV.UK Trade Tariff APIs to the latest versions for security and feature enhancements.
Support
If you experience any issues or have questions regarding GOV.UK Trade Tariff APIs, please contact hmrc-trade-tariff-support-g@digital.hmrc.gov.uk.
Terms and Conditions
By using the FPO APIs, you agree to the terms and conditions.
When using the rest of our APIs, you agree to the following terms (opens in new tab).
Enquiries and feedback
If you have any suggestions, queries or feedback about this service, please use the Trade Tariff enquiry form (opens in new tab).