Docs / Network and contact checks

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.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

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 here is never written to the log, and the answer is not cached.

ParameterDescription
codepath, requiredAn STD code or a landline number, with or without 0 or +91.

curl

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

JavaScript

const response = await fetch("https://api.dharun.dev/v1/std-codes/0422?utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/std-codes/0422?utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response, with lists and long text shortened

{
  "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.

ParameterDescription
qquery3 to 60 letters of a town's name.
circlequeryA circle code such as TN, KT, MH, UPE, NE.

curl

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

JavaScript

const response = await fetch("https://api.dharun.dev/v1/std-codes?q=pollachi&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/std-codes?q=pollachi&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response, with lists and long text shortened

{
  "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, 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.

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.