Using the Address Standardization API
To standardize an address, make a POST request to the Address Standardization 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 process. |
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:
The Address Standardization API returns a JSON response with the standardized 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 standardized address components. |
Example Response:
In the result object, you'll find the standardized address components, including pincode, country, state, city, locality, and sub_locality. The entity_information object will contain additional information about the address if available.
Parameter | Required/Optional | Description | Example |
---|---|---|---|
data* | Required | Payload with details of address, pin code, city, and state. | N/A |
address* | Required | The street address for which you want to get the standardized output. | Plot 5, Sector 44, Gurgaon |
pincode | Optional | The Pincode associated with the provided address. | 122003 |
city | Optional | City associated with the provided address. | Gurgaon |
state | Optional | State associated with the provided address. | Haryana |