S2Coder Address
Features Pricing Documentation FAQ

Endpoints

Geocoding API

Resolve a textual address to coordinates.

GET /api/v1/geocode

Parameters

At least one is required.

NameDescription
qFree-text address. A six-digit PIN inside the text is detected automatically.
addressAlias for q.
localityLocality name, if you have it separately.
cityCity name.
pincodePIN code, which sharply narrows the candidate set.

Request

curl "https://address.s2coder.com/api/v1/geocode?q=Gomti+Nagar&pincode=226010" \ -H "X-API-Key: YOUR_API_KEY"

Response

{ "success": true, "data": { "latitude": 26.8467, "longitude": 80.9462, "formatted_address": "Gomti Nagar, Lucknow, Uttar Pradesh, 226010", "matched_on": "locality", "precision": "approximate", "components": { "locality": "Gomti Nagar", "city": "Lucknow", "district": "Lucknow", "state": "Uttar Pradesh", "pincode": "226010" } } }

Precision levels

Always read precision before using the coordinates. A PIN centroid can be kilometres from the actual address, which matters a great deal for a delivery ETA and not at all for a map preview.

PrecisionMatched onMeaning
rooftopaddressAn exact address record with its own coordinates.
approximatelocalityThe centre of the locality.
centroidpincodeThe centre of the PIN code area. Coarse.

When nothing matches

Responds 404 with no coordinates could be resolved. This is a normal outcome, not an error condition — handle it as "unknown location" rather than as a failure.

Where coordinates come from

Only from data already in the platform: your own imported rows and the licensed reference dataset. No third-party geocoding service is called, so the addresses you send are never forwarded outside our infrastructure.