GST Taxpayer Search — API Docs

Base URL:
Saari requests JSON hain (Content-Type: application/json). Koi API key nahi chahiye. CORS sab origins ke liye khula hai.

Flow

1. POST /lookup→success: true ✓ data mil gaya
need_captcha: true→2. POST /captcha→user captcha bhare→3. POST /search

Zyada tar requests step 1 mein hi ho jaati hain (0.2–1.5s). Backend andar hi saari websites rotate karta hai; ek site down ho to agli try hoti hai. Error sirf tab aata hai jab sab fail ho jaayein.

1. Fast lookup (bina captcha)

POST/lookup

Request

{ "gstin": "09ALIPB1014E2ZS" }

Response — success

{
  "success": true,
  "source": "busy",                 // kis website se data aaya
  "taxpayer": {
    "gstin": "09ALIPB1014E2ZS",
    "lgnm": "NAVEEN KUMAR BAJAJ",
    "tradeNam": "SHIV AGARBATTI BHANDAR",
    "sts": "Active",
    "rgdt": "28 Feb 2025",
    "ctb": "Proprietorship",
    "dty": "Regular",
    "pradr": { "addr": { "bno": "0309Q", "st": "KHUNIPUR", "loc": "Gorakhpur", "dst": "Gorakhpur", "stcd": "Uttar Pradesh", "pncd": "273001" } },
    "nba": ["Retail Business", "Wholesale Business"],
    "ctj": "State - CBIC,Zone - LUCKNOW,...",
    "stj": "State - Uttar Pradesh,Zone - Gorakhpur,...",
    "pan": "ALIPB1014E",              // full-info fields (admin me "Full info" ON ho to)
    "members": ["NAVEEN KUMAR BAJAJ"],
    "turnover": "Slab: Rs.25 Cr. to 100 Cr.",
    "hsn": [{ "code": "8013", "type": "HSN", "desc": "Cashew nuts" }],
    "returns": [{ "type": "GSTR1", "period": "082026", "filed_on": "2026-09-11", "status": "FILED", "delay_days": 0, "arn": "AA090826900113C" }]
  },
  "goods_service": null
}

Response — data nahi mila

{
  "success": false,
  "need_captcha": true,             // true → /captcha flow chalao
  "error": "Ye GSTIN kisi bhi record mein nahi mila. Number dobara check karo.",
  "tried": ["busy", "mastersindia", "cashfree", "tally", "pice", "khatabuddy"],
  "errors": { "busy": "...", "pice": "not found: GST not found" }
}

2. Captcha lena (fallback)

POST/captcha

Official GST portal ka session kholta hai. Sirf tab use karo jab /lookup ne need_captcha: true diya ho.

Request

{ "gstin": "27AAPFU0939F1ZV" }

Response

{
  "session_id": "a1b2c3d4e5f6",
  "captcha_image": "iVBORw0KGgo...",   // base64 PNG → <img src="data:image/png;base64,...">
  "gstin": "27AAPFU0939F1ZV"
}

Admin ne captcha band kiya ho to 403. GST portal down ho to 502.

POST/search

Request

{ "session_id": "a1b2c3d4e5f6", "captcha": "AB12CD" }

Response — success

{ "success": true, "taxpayer": { ...same fields as /lookup... }, "goods_service": { ... } }

Response — captcha galat

{
  "success": false,
  "error": "Enter valid letters shown in the image below",
  "session_id": "a1b2c3d4e5f6",        // same session, dobara /search karo
  "captcha_image": "iVBORw0KGgo..."     // naya captcha
}

Naya captcha (same session)

POST/refresh
// request
{ "session_id": "a1b2c3d4e5f6" }
// response
{ "session_id": "a1b2c3d4e5f6", "captcha_image": "iVBORw0KGgo..." }

Health check

GET/health
{ "status": "ok", "active_sessions": 0 }

Taxpayer fields

FieldMatlabHamesha?
gstinGSTIN number✓
lgnmLegal name✓
tradeNamTrade name✓
stsStatus (Active / Cancelled / Suspended)✓
rgdtRegistration date✓
ctbConstitution (Proprietorship, Pvt Ltd...)✓
dtyTaxpayer type (Regular / Composition)✓
pradrPrincipal address — {addr:{bno,st,loc,dst,stcd,pncd}} ya {adr:"full text"}✓
nbaNature of business (list)mostly
ctj / stjCentre / State jurisdictionmostly
cxdtCancellation dateagar cancelled
einvoiceStatusE-invoice enabledkuch sources
adadr / additional_placesAdditional places of businesskuch sources
panPANFull info
membersOwners / partners / directorsFull info
turnover, turnover_fyAnnual turnover slabFull info
hsnHSN/SAC codes [{code,type,desc}]Full info
returnsReturn filing history [{type,period(MMYYYY),fy,filed_on,due,status,delay_days,mode,arn}], newest firstFull info

Field kisi source se na mile to wo response mein hoga hi nahi — code mein hamesha check karke use karo.

Errors

HTTPKabBody
200 + success:falseKoi source se data nahi mila / captcha galat{"success":false,"error":"..."}
400GSTIN format galat, session expire, captcha khali{"detail":"Invalid GSTIN..."}
403Captcha method admin ne band kiya{"detail":"..."}
502GST portal down / load fail{"detail":"GST portal load failed: ..."}

GSTIN format: 15 characters, e.g. 27AAPFU0939F1ZV (2 digit state + 10 PAN + entity + Z + check).

Full example

curl -X POST BASE/lookup \
  -H "Content-Type: application/json" \
  -d '{"gstin":"09ALIPB1014E2ZS"}'

Try it live

Response yahan aayega…

Admin endpoints (/admin/api/*) ke liye X-Admin-Key header chahiye — details Swagger mein.