How does the Object table and JSON output of international street address autocomplete API created by Smarty function?
In this article, I will clarify the object table and JSON output specifically of Smarty's international street address autocomplete API. I will explain what information is contained in the object table and how it is formatted in the JSON output. It is important for developers to understand the structure of the object table and JSON output in order to effectively utilize the data provided by the API.
Object and Description of API
Objects | Description |
candidates | |
street | |
locality | |
administrative_area | |
sub_administrative_area | |
postal_code | |
country_iso3 |
candidates: This object contains an array of candidate addresses that match the inputted address query.
street: This object contains the street name and number of the address.
locality: This object contains the city or town name of the address.
administrative_area: This object contains the state or province of the address.
sub_administrative_area: This object contains the county or district of the address.
postal_code: This object contains the postal code of the address.
country_iso3: This object contains the ISO 3166-1 alpha-3 code of the country of the address.
The information contained in the table is useful for developers because it provides a clear and structured layout of the data that is returned by the international street address autocomplete API. By understanding the specific objects and their corresponding descriptions, developers can easily access and utilize the specific pieces of information they need from the API. This is especially useful when working with large amounts of data, as it allows developers to quickly and efficiently sort through and process the information in a consistent and organized manner. Additionally, the clear structure of the object table allows developers to easily integrate the API's data into their own systems and applications.
JSON explained
The JSON output contains an object called "candidates", which is an array containing a single object. This single object has several properties: "street", "locality", "administrative_area", "sub_administrative_area", "postal_code", and "country_iso3". "Street" contains a string value of "14 Frenchman Drive", "locality" contains a string value of "Port Elliot", "administrative_area" contains a string value of "SA", "sub_administrative_area" contains a string value of "Alexandrina", "postal_code" contains a string value of "5212", and "country_iso3" contains a string value of "AUS". This JSON output represents a single candidate address with the specified street address, city, state, county, postal code, and country.
{
"candidates": [
{
"street": "14 Frenchman Drive",
"locality": "Port Elliot",
"administrative_area": "SA",
"sub_administrative_area": "Alexandrina",
"postal_code": "5212",
"country_iso3": "AUS"
}
]
}
Conclusion
In summary, we have discussed the object table and JSON output of Smarty's international street address autocomplete API. The object table consists of several objects that contain specific pieces of information about an address, including the street, locality, administrative area, sub-administrative area, postal code, and country. This information is useful for developers to understand and utilize in order to effectively work with the data provided by the API. The JSON output presents this information in a structured and organized manner, allowing developers to easily access and process the data. Overall, understanding the object table and JSON output is crucial for developers looking to integrate the API into their systems and applications.
Footnote
To access the Smarty international street address autocomplete API, you can request access through the third party data marketplace of Worldindata. Worldindata is a platform that provides access to a wide range of data sources, including the Smarty API. By signing up for an account and purchasing a subscription, you can gain access to the API and use it to retrieve international street address autocomplete data for your projects and applications. Worldindata offers various subscription options to fit your data needs, so you can choose the one that best suits your requirements. Once you have purchased a subscription and received your API key, you can begin making requests to the API to retrieve the data you need.