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.
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.
| Parameter | Description |
|---|---|
kindpath, required | Which identifier. One of: gstin, pan, ifsc. |
valuepath, required | The identifier to check. |
curl
curl "https://api.dharun.dev/v1/validate/gstin/27AAPFU0939F1ZV"JavaScript
const response = await fetch("https://api.dharun.dev/v1/validate/gstin/27AAPFU0939F1ZV");
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", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])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
Using an AI assistant? Connect the MCP server and it can call this API by itself.