# STD codes API

> The landline STD code of every town and area in India, and which area a landline number belongs to.

All 2,645 Short Distance Charging Areas of the Department of Telecommunications' National Numbering Plan, each with its STD (trunk) code, the long distance area and the telecom circle. Look a code or a landline number up, or find a town's code. Circles are the 2003 service areas, which are not always states.

Base URL `https://api.dharun.dev`. No API key needed for most endpoints; a free key (https://api.dharun.dev/keys) raises the limits, and the model endpoints marked below will need one. Answers are JSON, `{ "data": ..., "meta": { ... } }`, and errors are `{ "error": { "code", "message" } }` with a matching HTTP status. Rate limit: 600 units a minute per address without a key, 3000 per key; the `RateLimit-*` headers say what is left.

## The area of an STD code or a landline number

`GET /v1/std-codes/{code}`

A code (44, 0422) must match whole; a landline number (0422 2345678, +91 44 2345 6789) is matched by its longest code. A whole number is kept out of the log.

What you send is never written to the log, and the answer is not cached.

Parameters:

- `code` (path, required): An STD code or a landline number, with or without 0 or +91.

Example: https://api.dharun.dev/v1/std-codes/0422?utm_medium=docs-md

Response, with lists and long text shortened:

```json
{
  "data": {
    "code": "422",
    "dial": "0422",
    "area": "Coimbatore",
    "long_distance_area": "Coimbatore",
    "circle": "TN",
    "circle_name": "Tamil Nadu"
  },
  "meta": {
    "source": {
      "name": "National Numbering Plan (2003), Annex II: list of SDCA codes",
      "url": "https://dot.gov.in/sites/default/files/nnp2003_0_0.pdf",
      "licence": "Government of India publication, published openly; credited",
      "version": "2003",
      "retrieved": "2026-11-12T15:40:00Z",
      "attribution": "STD codes from the National Numbering Plan (2003), Department of Telecommunications."
    },
    "note": "Landline STD codes from the Department of Telecommunications' National Numbering Plan (2003). Area is the Short Distance Charging Area; circle is the telecom se…"
  }
}
```

## Find the STD code of a town

`GET /v1/std-codes`

Areas whose names (or long distance area) contain the words, or every area of a circle; shortest codes first.

Parameters:

- `q` (query): 3 to 60 letters of a town's name.
- `circle` (query): A circle code such as TN, KT, MH, UPE, NE.

Example: https://api.dharun.dev/v1/std-codes?q=pollachi&utm_medium=docs-md

Response, with lists and long text shortened:

```json
{
  "data": [
    {
      "code": "4259",
      "dial": "04259",
      "area": "Pollachi",
      "long_distance_area": "Coimbatore",
      "circle": "TN",
      "circle_name": "Tamil Nadu"
    }
  ],
  "meta": {
    "total": 1,
    "source": {
      "name": "National Numbering Plan (2003), Annex II: list of SDCA codes",
      "url": "https://dot.gov.in/sites/default/files/nnp2003_0_0.pdf",
      "licence": "Government of India publication, published openly; credited",
      "version": "2003",
      "retrieved": "2026-11-12T15:40:00Z",
      "attribution": "STD codes from the National Numbering Plan (2003), Department of Telecommunications."
    },
    "note": "Landline STD codes from the Department of Telecommunications' National Numbering Plan (2003). Area is the Short Distance Charging Area; circle is the telecom se…"
  }
}
```

## Data source

- [National Numbering Plan (2003), Annex II: list of SDCA codes](https://dot.gov.in/sites/default/files/nnp2003_0_0.pdf), 2003, retrieved 2026-11-12T15:40:00Z. Licence: Government of India publication, published openly; credited. STD codes from the National Numbering Plan (2003), Department of Telecommunications.
