📚 API Documentation

GSTIN Check API - Complete Integration Guide

🚀 Getting Started

The GSTIN Check API allows you to verify GST Information Number (GSTIN) details programmatically. This API is RESTful and returns JSON responses.

⚠️ Authentication Required
All API requests require a valid API key to be included in the request headers.

Base URL

Loading...

Authentication

Include your API key as a query parameter:

?api=your_api_key&gstin=YOUR_GSTIN

📧 Need Help or Want GST Validator?

Contact us at: [email protected]

📡 API Endpoints

GET /check-gstin

Retrieve detailed information about a GSTIN number.

Parameters

Parameter Type Location Required Description
api string Query Yes Your API key
gstin string Query Yes GSTIN number (15 chars after removing spaces - auto-converted to uppercase)

Response

Success (200 OK)
{
  "flag": true,
  "message": "GSTIN found.",
  "data": {
    "gstin": "22AAJCN8836H1Z8",
    "lgnm": "NARA VIRTUAL PRIVATE LIMITED",
    "tradeNam": "NARA VIRTUAL PRIVATE LIMITED",
    "sts": "Active",
    "rgdt": "24/02/2025",
    "ctb": "Private Limited Company",
    "pradr": {
      "adr": "HOUSE NO.40, ATAL AWAS COLONY...",
      "addr": {
        "stcd": "Chhattisgarh",
        "dst": "Raipur",
        "city": "",
        "pncd": "493661"
      }
    },
    "nba": ["Supplier of Services"]
  }
}
Error (401 Unauthorized)
{
  "detail": "Invalid API key"
}

💻 Code Examples

Python

import requests

# API Configuration
BASE_URL = ""
API_URL = f"{BASE_URL}/check-gstin"
API_KEY = "your_api_key"

GSTIN = "22AAJCN8836H1Z8"

# Make request
params = {
    "api": API_KEY,
    "gstin": GSTIN
}

response = requests.get(API_URL, params=params)

# Handle response
if response.status_code == 200:
    data = response.json()
    print("GSTIN Data:", data)
    
    if data.get("flag"):
        gstin_info = data.get("data", {})
        print(f"Company: {gstin_info.get('lgnm')}")
        print(f"Status: {gstin_info.get('sts')}")
        print(f"Registration Date: {gstin_info.get('rgdt')}")
else:
    print(f"Error: {response.status_code}")
    print(response.json())

cURL

curl -X GET "/check-gstin?api=your_api_key&gstin=22AAJCN8836H1Z8"

Pretty Print JSON Response

curl -X GET "/check-gstin?api=your_api_key&gstin=22AAJCN8836H1Z8" | jq '.'

JavaScript (Fetch API)

// API Configuration
const BASE_URL = '';
const API_URL = `${BASE_URL}/check-gstin`;
const API_KEY = 'your_api_key';
const GSTIN = '22AAJCN8836H1Z8';


// Make request
fetch(`${API_URL}?api=${API_KEY}&gstin=${GSTIN}`, {
    method: 'GET',
    headers: {
        'Accept': 'application/json'
    }
})
.then(response => {
    if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
})
.then(data => {
    console.log('GSTIN Data:', data);
    
    if (data.flag) {
        const gstinInfo = data.data;
        console.log(`Company: ${gstinInfo.lgnm}`);
        console.log(`Status: ${gstinInfo.sts}`);
        console.log(`Registration Date: ${gstinInfo.rgdt}`);
    }
})
.catch(error => {
    console.error('Error:', error);
});

TypeScript

// API Configuration
const BASE_URL: string = '';


// Define types
interface GSTINResponse {
    flag: boolean;
    message: string;
    data: {
        gstin: string;
        lgnm: string;
        tradeNam: string;
        sts: string;
        rgdt: string;
        ctb: string;
        pradr: {
            adr: string;
            addr: {
                stcd: string;
                dst: string;
                city: string;
                pncd: string;
            };
        };
        nba: string[];
    };
}

const API_URL: string = `${BASE_URL}/check-gstin`;
const API_KEY: string = 'your_api_key';
const GSTIN: string = '22AAJCN8836H1Z8';

// Make request
async function checkGSTIN(gstin: string): Promise {
    const response = await fetch(`${API_URL}?api=${API_KEY}&gstin=${gstin}`, {
        method: 'GET',
        headers: {
            'Accept': 'application/json'
        }
    });
    
    if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`);
    }
    
    return await response.json() as GSTINResponse;
}

// Usage
checkGSTIN(GSTIN)
    .then(data => {
        console.log('GSTIN Data:', data);
        
        if (data.flag) {
            console.log(`Company: ${data.data.lgnm}`);
            console.log(`Status: ${data.data.sts}`);
            console.log(`Registration Date: ${data.data.rgdt}`);
        }
    })
    .catch(error => {
        console.error('Error:', error);
    });

Node.js (with axios)

const axios = require('axios');

// API Configuration
const BASE_URL = '';
const API_URL = `${BASE_URL}/check-gstin`;
const API_KEY = 'your_api_key';
const GSTIN = '22AAJCN8836H1Z8';


// Make request
async function checkGSTIN(gstin) {
    try {
        const response = await axios.get(API_URL, {
            params: {
                api: API_KEY,
                gstin: gstin
            }
        });
        
        const data = response.data;
        console.log('GSTIN Data:', data);
        
        if (data.flag) {
            const gstinInfo = data.data;
            console.log(`Company: ${gstinInfo.lgnm}`);
            console.log(`Status: ${gstinInfo.sts}`);
            console.log(`Registration Date: ${gstinInfo.rgdt}`);
        }
        
        return data;
    } catch (error) {
        if (error.response) {
            console.error(`Error: ${error.response.status}`);
            console.error(error.response.data);
        } else {
            console.error('Error:', error.message);
        }
        throw error;
    }
}

// Usage
checkGSTIN(GSTIN);

// Installation: npm install axios

⚠️ Error Codes

Status Code Description Solution
200 Success Request completed successfully
401 Unauthorized Invalid or missing API key
422 Validation Error Invalid GSTIN format (must be 15 characters)
500 Internal Server Error Server error or external service unavailable

⏱️ Rate Limits & Best Practices