🚀 TweekersNut GST API

Centralized routing-based GST API for lookup, verification, risk analysis, PAN summary, and bulk operations.

📌 Overview

All endpoints are managed through a centralized routing system in public/index.php. Direct .php files are no longer used.

🌐 Base URL

https://api.tweekersnut.com/

All routes work with or without /public/ prefix for backward compatibility.

🧩 Available Routes

1️⃣ Health Check

GET
/health
/public/health
{
  "status": "healthy",
  "service": "GST API",
  "version": "1.0.0",
  "timestamp": "2026-01-20T12:30:00Z"
}

2️⃣ GST Details (Scraping)

GET /gst/details
POST /gst/details
/public/gst/details
    

Fetch complete GST details. Scrapes data if not cached.

gstin (optional)
pan (optional)
business_name (optional)
    
{
  "success": true,
  "query": {"gstin": "03FKXPS8899K1ZM"},
  "data": {...},
  "meta": {...},
  "disclaimer": "Data is fetched from public sources..."
}

3️⃣ GST Verification (Cache Only)

GET /api/gst/verify
GET /gst/verify
    
{
  "success": true,
  "data": {
    "valid": true,
    "gstin": "03FKXPS8899K1ZM",
    "status": "ACTIVE",
    "cached": true
  }
}

4️⃣ Risk Score

GET /api/gst/risk-score
GET /gst/risk-score
    
{
  "success": true,
  "data": {
    "risk_score": 85,
    "risk_level": "LOW"
  }
}

5️⃣ PAN Summary

GET /api/pan/summary
GET /pan/summary
    
{
  "success": true,
  "data": {
    "pan": "FKXPS8899K",
    "total_gstins": 3,
    "states": ["Punjab", "Delhi"]
  }
}

6️⃣ Bulk Verification

POST /api/gst/bulk-verify?action=create
GET  /api/gst/bulk-verify?action=status
GET  /api/gst/bulk-verify?action=process
    
{
  "success": true,
  "data": {
    "job_id": "job_xxx",
    "status": "completed"
  }
}

🔐 Authentication

X-API-Key: your_api_key

RapidAPI headers are also supported.

⏱ Rate Limiting

X-RateLimit-Limit-Minute
X-RateLimit-Remaining-Minute
    

⚠️ Error Format

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable message"
  }
}

🧪 Testing

curl https://api.tweekersnut.com/gst/details?gstin=03FKXPS8899K1ZM \
-H "X-API-Key: your_key"