Docs / Money and business

Format checks API

Check the format of a GSTIN, PAN or IFSC.

Structural checks only: character pattern, state code and, for GSTIN, the check character. Nothing is looked up with a government system, and these values are never written to the request log.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Check an identifier's format

GET/v1/validate/{kind}/{value}

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

ParameterDescription
kindpath, requiredWhich identifier. One of: gstin, pan, ifsc.
valuepath, requiredThe identifier to check.

curl

curl "https://api.dharun.dev/v1/validate/gstin/27AAPFU0939F1ZV?utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/validate/gstin/27AAPFU0939F1ZV?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/validate/gstin/27AAPFU0939F1ZV?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

{
  "data": {
    "kind": "gstin",
    "normalized": "27AAPFU0939F1ZV",
    "valid": true,
    "parts": {
      "entityNumber": "1",
      "holderType": "Firm or Limited Liability Partnership",
      "pan": "AAPFU0939F",
      "state": "Maharashtra",
      "stateCode": "27"
    }
  },
  "meta": {
    "note": "This checks the format only. It does not confirm that the identifier was ever issued."
  }
}

Guides

Make a GST tax invoice PDF from JSON

Check a GSTIN or PAN before you save it

Show the bank and branch for an IFSC code

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.