Two endpoints
| Endpoint | What it does |
|---|---|
| GET /v1/hsn/{code} | Description of one 2 to 8 digit HSN or SAC code, plus the broader codes above it |
| GET /v1/hsn/search?q=cotton | Codes whose description matches a word or phrase |
Search takes q (at least 2 characters), an optional kind of hsn or sac to narrow to goods or services, and an optional limit. Exact code matches rank first, then descriptions that start with the term, then descriptions that contain it.
A request
curl https://www.gstinapi.in/v1/hsn/5208 \
-H "x-api-key: gak_your_api_key"The response carries code, kind, description, digits, hierarchy and a source block.
Where the data comes from
The codes are loaded from the HSN/SAC master that the GST portal publishes, and answered from our own copy of it. That makes a lookup fast, and it keeps working when the GST network is slow.
Every response includes a source block with the date the master was last refreshed and the number of codes in it, so you can see how current the data is before you quote a description.
Sources: GST portal: HSN/SAC master download
It does not return GST rates
This is deliberate. A GST rate does not depend on the HSN code alone. The same code can attract different rates depending on conditions such as whether the goods are branded, their price, or their end use, and those conditions are set out in rate notifications. The government’s master has no rate column either.
A rate guessed from a code would be wrong often enough to cause a wrong invoice. For rates, read the CBIC rate notifications.
What it costs
- 1 credit per code lookup that finds the code.
- 1 credit per search, whether or not it finds matches.
- A code that is not in the master, and a malformed request, cost nothing.
- Credits are ₹0.80 down to ₹0.40 each depending on the pack, before 18% GST. The free lookups every account starts with work here too.
- 60 requests a minute per key.
Frequently asked questions
Is there an API to look up HSN codes?
Yes. GET /v1/hsn/{code} returns the official description of any 2 to 8 digit HSN or SAC code along with the chapter, heading and subheading above it. GET /v1/hsn/search finds codes from a description.
Does the HSN API return the GST rate?
No. A rate depends on conditions beyond the code, such as branding, price and end use, and the government’s HSN master publishes no rate. Take rates from the CBIC rate notifications.
What is the difference between HSN and SAC?
HSN codes classify goods and SAC codes classify services. Both are in the same master, and the kind field in the response says which one a code is.
How many codes does it cover?
About 22,600, which is the full HSN/SAC master published on the GST portal. The exact count and the refresh date are in every response.
What does an HSN lookup cost?
One credit, the same credit a GSTIN lookup uses. A code that is not found is free. Every account starts with up to 100 free lookups.
Start with up to 100 free lookups
25 on signup and 25 for each of three setup steps. No card, and they never expire.
Create a free account