# HSN and SAC codes API

> GST classification codes for goods and services.

Every HSN code for goods (from the Customs Tariff Act) and SAC code for services (from the GST services classification) with its description, the codes above it and the codes below it. GST rates are not included.

Base URL `https://api.dharun.dev`. No API key. Answers are JSON, `{ "data": ..., "meta": { ... } }`, and errors are `{ "error": { "code", "message" } }` with a matching HTTP status. Rate limit: 600 requests a minute per client.

## A code, its parents and children

`GET /v1/hsn/{code}`

Parameters:

- `code` (path, required): 2 to 8 digits; spaces and dots are ignored. SAC codes start with 99.

Example: https://api.dharun.dev/v1/hsn/0902

Response, with lists and long text shortened:

```json
{
  "data": {
    "code": "0902",
    "kind": "hsn",
    "level": "heading",
    "description": "TEA, WHETHER OR NOT FLAVOURED",
    "parents": [
      {
        "code": "09",
        "kind": "hsn",
        "level": "chapter",
        "description": "Coffee, tea, mate and spices"
      }
    ],
    "children": [
      {
        "code": "090210",
        "kind": "hsn",
        "level": "subheading",
        "description": "GREEN TEA (NOT FERMENTED) IN IMMEDIATE PACKINGS OF A CONTENT NOT EXCEEDING 2"
      },
      {
        "code": "090220",
        "kind": "hsn",
        "level": "subheading",
        "description": "OTHER GREEN TEA (NOT FERMENTED):"
      },
      {
        "code": "090230",
        "kind": "hsn",
        "level": "subheading",
        "description": "BLACK TEA (FERMENTED) AND PARTLY FERMENTED TEA, IN IMMEDIATE PACKINGS OF A CONTENT NOT EXCEEDING 3 KG. :"
      }
    ]
  },
  "meta": {
    "source": {
      "name": "HSN and SAC codes",
      "url": "https://tutorial.gst.gov.in/downloads/HSN_SAC.xlsx",
      "licence": "Statute and gazette notification; reproduction permitted by section 52(1)(q) of the Copyright Act, 1957",
      "version": "051108e31063",
      "retrieved": "2026-10-13",
      "attribution": "HSN codes from the First Schedule to the Customs Tariff Act, 1975, and SAC codes from the annexure to notification 11/2017-Central Tax (Rate), in the copy publi…"
    },
    "note": "Codes and descriptions only; GST rates are not included. Descriptions are as published, including their capitals."
  }
}
```

## Search codes

`GET /v1/hsn`

Every word of q must appear in the description; digits search by code prefix. Broader codes come first.

Parameters:

- `q` (query, required): Words of the description, or the start of a code.
- `kind` (query): hsn for goods, sac for services. One of: hsn, sac.
- `limit` (query): Results per page, 1 to 100.
- `offset` (query): Results to skip.

Example: https://api.dharun.dev/v1/hsn?q=green%20tea

Response, with lists and long text shortened:

```json
{
  "data": [
    {
      "code": "090210",
      "kind": "hsn",
      "level": "subheading",
      "description": "GREEN TEA (NOT FERMENTED) IN IMMEDIATE PACKINGS OF A CONTENT NOT EXCEEDING 2"
    },
    {
      "code": "090220",
      "kind": "hsn",
      "level": "subheading",
      "description": "OTHER GREEN TEA (NOT FERMENTED):"
    },
    {
      "code": "09022010",
      "kind": "hsn",
      "level": "tariff_item",
      "description": "GREEN TEA IN PACKETS WITH CONTENTS EXCEEDING KG. 3 KG. BUT NOT EXCEEDING 20 KG."
    }
  ],
  "meta": {
    "total": 6,
    "limit": 20,
    "offset": 0,
    "source": {
      "name": "HSN and SAC codes",
      "url": "https://tutorial.gst.gov.in/downloads/HSN_SAC.xlsx",
      "licence": "Statute and gazette notification; reproduction permitted by section 52(1)(q) of the Copyright Act, 1957",
      "version": "051108e31063",
      "retrieved": "2026-10-13",
      "attribution": "HSN codes from the First Schedule to the Customs Tariff Act, 1975, and SAC codes from the annexure to notification 11/2017-Central Tax (Rate), in the copy publi…"
    },
    "note": "Codes and descriptions only; GST rates are not included. Descriptions are as published, including their capitals."
  }
}
```

## Data source

- [HSN and SAC codes](https://tutorial.gst.gov.in/downloads/HSN_SAC.xlsx), 051108e31063, retrieved 2026-10-13. Licence: Statute and gazette notification; reproduction permitted by section 52(1)(q) of the Copyright Act, 1957. HSN codes from the First Schedule to the Customs Tariff Act, 1975, and SAC codes from the annexure to notification 11/2017-Central Tax (Rate), in the copy published on the GST portal.
