Endpoints
Address Search API
Filtered search across the address database. Use this when you have structured criteria rather than a partial string.
GET /api/v1/address/searchParameters
At least one of the following must be supplied.
| Name | Type | Description |
|---|---|---|
| q | string | Free text. A six-digit value is treated as a PIN code. |
| pincode | string | Exact six-digit PIN code. |
| locality | string | Locality prefix. |
| city | string | City prefix. |
| district | string | District prefix. |
| state | string | State name or abbreviation. |
| limit | integer | 1–50. Defaults to 10. |
Request
curl "https://address.s2coder.com/api/v1/address/search?pincode=226010&limit=20" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"success": true,
"data": [
{
"id": 123,
"address": "3/216 Vibhuti Khand, Gomti Nagar",
"locality": "Vibhuti Khand",
"city": "Lucknow",
"district": "Lucknow",
"state": "Uttar Pradesh",
"pincode": "226010",
"latitude": 26.8535,
"longitude": 81.0065
}
],
"meta": { "count": 1, "limit": 20 }
}Fetching one address
When you already have an id — from a previous autocomplete call, for example — fetch the full record directly.
curl "https://address.s2coder.com/api/v1/address/123" \
-H "X-API-Key: YOUR_API_KEY"
This returns the complete record including house, street,
landmark, country, place_id,
source and status, which the list endpoints omit for
payload size. Responds 404 if the id does not exist or is not visible
to your key.
What your key can see
Search results always include the shared reference dataset plus any addresses you have imported into your own account. One customer's imported data is never visible to another customer's key.