Geocoding
Using the Geocoding API
4min
making a request to geocode an address, make a post request to the geocoding endpoint with the address details in the request body request body the request body should contain the data object with the following fields field required/optional type description address required string the street address which you want to geocode pincode optional string pincode associated with the provided address city optional string city associated with the provided address state optional string state associated with the provided address example request { "data" { "address" "delhivery corporate office, sector 44, gurugram", "pincode" "122003", "city" "gurgaon", "state" "haryana" } } understanding the response the geocoding api will return a json response with the geocoded coordinates of the address response schema field type description success boolean indicates if the request was successful true if successful, false if there was an error status code number status code of the request message string information about the processed request request id string a unique id for the request result object contains the geocoded coordinates and the confidence radius result lat number the latitude part of the geographical coordinates result lng number the longitude part of the geographical coordinates result confidence radius number it is a measure of horizontal accuracy that indicates the actual address will be within the radius of x meters around the predicted geocode example response { "success" true, "status code" 200, "message" "request has been processed", "request id" "ax34687667877689", "result" { "geocode" { "lat" 28 454736, "lng" 77 070171 }, "confidence radius" 24 // unit is in meters } } in the result object, you'll find the geocoded coordinates ( lat and lng ) and the confidence radius , which indicates the accuracy of the geocoded location