Public V1 endpoints
The examples below use the current public base URL https://api.pincodeapi.in/api/v1. All shown routes are read-only GET requests.
| Purpose | Endpoint |
|---|---|
| PIN code lookup | GET /pincode/{pincode} |
| State lookup | GET /state/{state} |
| District lookup | GET /district/{district} |
| Post office search | GET /search?q={query} |
| Health check | GET /health |
PIN code lookup
GET https://api.pincodeapi.in/api/v1/pincode/751001A successful PIN lookup returns a success flag, a data object with the requested PIN and its post_offices, and request information in meta. One PIN code can be linked to several post offices.
State lookup
GET https://api.pincodeapi.in/api/v1/state/OdishaUse the state or Union Territory name in the path. URL-encode spaces and other reserved characters when required.
District lookup
GET https://api.pincodeapi.in/api/v1/district/KhordhaUse the district name in the path. A district name is not the same as a city name, and this website does not treat district as city.
Search
GET https://api.pincodeapi.in/api/v1/search?q=Bhubaneswar&limit=20&offset=0Use q for the search text, limit to control the maximum number of results, and offset to continue through a larger result set. Search can return more than one match, so check the office name, PIN code, district and state before using a result.
Health check
GET https://api.pincodeapi.in/api/v1/healthThe API root at https://api.pincodeapi.in/ publishes the current API path, documentation URL, health path and V1 service metadata.
API discovery
{
"success": true,
"data": {
"api": "/api/v1",
"documentation_url": "https://pincodeapi.in/docs/",
"health": "/api/v1/health",
"service": "PincodeAPI.in",
"website": "https://pincodeapi.in/"
},
"meta": {
"api_version": "v1"
}
}Use the discovery document to confirm the public API path and documentation location. Request-specific metadata such as release and request identifiers can change and should not be hard-coded by clients.
OpenAPI
Use the OpenAPI JSON or OpenAPI YAML for a machine-readable description of the public routes documented on this website.