GST Verification API

Verify Indian GST numbers and retrieve complete business registration details directly from the official government portal.

Version 1.0.0
Base URL: https://gst.india-location-hub.in

Overview

The GST Verification API provides a simple, secure, and reliable way to verify GSTINs. It acts as a bridge to the official GST portal, handling session management and captcha requirements.

  • Real-time verification from official GST portal
  • No data storage - privacy compliant
  • CORS enabled for web applications
  • JSON response format

Authentication

This API is currently public and does not require an API key. However, it uses a session-based mechanism for captcha verification.

Each session is valid for 5 minutes. You must complete the verification flow within this timeframe.

Endpoints

GET

/api/v1/getCaptcha

Initiates a verification session and returns a captcha image.

Response Example
{
  "success": true,
  "sessionId": "550e8400-e29b-41d4-a716-446655440000",
  "image": "data:image/png;base64,iVBORw0KGgo...",
  "expiresIn": 300
}
POST

/api/v1/getGSTDetails

Verifies the GSTIN using the session ID and captcha solution.

Request Body

{
  "sessionId": "550e8400-e29b-41d4-a716-446655440000",
  "GSTIN": "27AABCU9603R1ZM",
  "captcha": "abc123"
}

Success Response

{
  "success": true,
  "gstin": "27AABCU9603R1ZM",
  "lgnm": "COMPANY LEGAL NAME",
  "tradeNam": "TRADE NAME",
  "sts": "Active",
  "rgdt": "01/07/2017",
  "ctb": "Private Limited Company"
  // ... additional fields
}

Error Codes

Error Code HTTP Status Description
SESSION_EXPIRED 401 The session ID is invalid or has expired.
INVALID_GSTIN 400 The provided GSTIN format is incorrect.
CAPTCHA_ERROR 503 Failed to load captcha from upstream.

Integration Guide

Here's a complete example using JavaScript (Fetch API) to integrate the verification flow.

integration.js
// 1. Get Captcha
const captchaRes = await fetch('/api/v1/getCaptcha');
const { sessionId, image } = await captchaRes.json();

// Display image to user...
document.getElementById('captcha-img').src = image;

// 2. Verify (after user input)
const verifyRes = await fetch('/api/v1/getGSTDetails', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        sessionId,
        GSTIN: '27AABCU9603R1ZM',
        captcha: userCaptchaInput
    })
});

const data = await verifyRes.json();
if (data.success) {
    console.log('Business Name:', data.lgnm);
}