API Documentation

Welcome to the apibharat.com API. All endpoints are public, read-only, return JSON, and require no authentication. Every response follows the same shape so they are easy to consume.

Base URL & response format

https://apibharat.com/api/v1

Successful responses:

{
  "success": true,
  "data": { ... },
  "message": "Data found"
}

Error responses:

{
  "success": false,
  "data": null,
  "message": "Invalid request or data not found"
}

Rate limits

Each IP address may make up to 1000 requests per minute. Responses include X-RateLimit-Limit and X-RateLimit-Remaining headers. Exceeding the limit returns HTTP 429 with a Retry-After header.

Status codes

CodeMeaning
200Success
404Resource not found / unknown route
422Invalid input format
429Rate limit exceeded
500Server error

๐Ÿ“ฎPIN Code Lookup

Resolve any 6-digit Indian PIN code to its post office, district and state.

GET /api/v1/pincode/{pincode}

Parameters

  • pincode (path, required) โ€” 6-digit PIN code, e.g. 110001

Example

GET https://apibharat.com/api/v1/pincode/110001
{
  "success": true,
  "data": {
    "pincode": "110001",
    "district": "New Delhi",
    "state": "Delhi",
    "post_offices": [
      { "office_name": "Connaught Place", "region": "Delhi", "circle": "Delhi" },
      { "office_name": "Sansad Marg", "region": "Delhi", "circle": "Delhi" }
    ]
  },
  "message": "PIN code details found"
}

๐ŸฆIFSC Lookup

Get bank, branch and address details from an 11-character IFSC code.

GET /api/v1/ifsc/{ifsc}

Parameters

  • ifsc (path, required) โ€” 11-char IFSC, e.g. SBIN0000001

Example

GET https://apibharat.com/api/v1/ifsc/SBIN0000001
{
  "success": true,
  "data": {
    "ifsc": "SBIN0000001",
    "bank": "State Bank of India",
    "branch": "New Delhi Main Branch",
    "address": "11 Sansad Marg, New Delhi",
    "city": "New Delhi",
    "district": "New Delhi",
    "state": "Delhi",
    "contact": "011-23374103",
    "micr": "110002001"
  },
  "message": "IFSC details found"
}

๐ŸงพGST State Code Lookup

Decode the 2-digit state code at the start of any GSTIN.

GET /api/v1/gst/state/{code}

Parameters

  • code (path, required) โ€” 2-digit GST state code, e.g. 27

Example

GET https://apibharat.com/api/v1/gst/state/27
{
  "success": true,
  "data": {
    "state_code": "27",
    "state_name": "Maharashtra",
    "state_abbr": "MH"
  },
  "message": "GST state code details found"
}

๐Ÿš—RTO Lookup

Find the transport office, city and state behind a vehicle registration code.

GET /api/v1/rto/{code}

Parameters

  • code (path, required) โ€” RTO code, e.g. MH01

Example

GET https://apibharat.com/api/v1/rto/MH01
{
  "success": true,
  "data": {
    "rto_code": "MH01",
    "office_name": "RTO Mumbai (Tardeo)",
    "city": "Mumbai",
    "state": "Maharashtra"
  },
  "message": "RTO details found"
}

๐Ÿ“…Indian Holidays API

List national and gazetted holidays for any year.

GET /api/v1/holidays/{year}

Parameters

  • year (path, required) โ€” 4-digit year, e.g. 2026

Example

GET https://apibharat.com/api/v1/holidays/2026
{
  "success": true,
  "data": {
    "year": 2026,
    "count": 9,
    "holidays": [
      { "holiday_date": "2026-01-26", "name": "Republic Day", "type": "National", "day_of_week": "Monday" },
      { "holiday_date": "2026-08-15", "name": "Independence Day", "type": "National", "day_of_week": "Saturday" }
    ]
  },
  "message": "Holidays found for 2026"
}

๐Ÿ—บ๏ธState / District / City API

Cascading location data to build address dropdowns.

GET /api/v1/states
GET /api/v1/districts/{state_id}
GET /api/v1/cities/{district_id}

Parameters

  • state_id (path, optional) โ€” Used by /districts/{state_id}
  • district_id (path, optional) โ€” Used by /cities/{district_id}

Example

GET https://apibharat.com/api/v1/states
{
  "success": true,
  "data": {
    "count": 4,
    "states": [
      { "id": 4, "name": "Delhi", "abbr": "DL" },
      { "id": 2, "name": "Karnataka", "abbr": "KA" },
      { "id": 1, "name": "Maharashtra", "abbr": "MH" },
      { "id": 3, "name": "Tamil Nadu", "abbr": "TN" }
    ]
  },
  "message": "States found"
}

๐ŸชชPAN Validation

Validate the format of a PAN and decode the holder type.

GET /api/v1/pan/validate/{pan}

Parameters

  • pan (path, required) โ€” 10-char PAN, e.g. ABCPD1234E

Example

GET https://apibharat.com/api/v1/pan/validate/ABCPD1234E
{
  "success": true,
  "data": {
    "pan": "ABCPD1234E",
    "valid": true,
    "holder_type": "Individual",
    "note": "Format validation only. This does not confirm the PAN exists with the Income Tax Department."
  },
  "message": "PAN format is valid"
}

๐Ÿ”ŽHSN / SAC Search

Search HSN (goods) and SAC (services) codes with GST rates.

GET /api/v1/hsn/search?q={keyword}
GET /api/v1/sac/search?q={keyword}

Parameters

  • q (query, required) โ€” Search keyword or code, min 2 chars

Example

GET https://apibharat.com/api/v1/hsn/search?q=rice
{
  "success": true,
  "data": {
    "query": "rice",
    "count": 1,
    "results": [
      { "hsn_code": "1006", "description": "Rice", "gst_rate": "5.00" }
    ]
  },
  "message": "HSN codes found"
}