GSTIN Check API - Complete Integration Guide
The GSTIN Check API allows you to verify GST Information Number (GSTIN) details programmatically. This API is RESTful and returns JSON responses.
Loading...
Include your API key as a query parameter:
?api=your_api_key&gstin=YOUR_GSTIN
Contact us at: [email protected]
Retrieve detailed information about a GSTIN number.
| 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) |
{
"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"]
}
}
{
"detail": "Invalid API key"
}
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 -X GET "/check-gstin?api=your_api_key&gstin=22AAJCN8836H1Z8"
curl -X GET "/check-gstin?api=your_api_key&gstin=22AAJCN8836H1Z8" | jq '.'
// 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);
});
// 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);
});
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
| 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 |