- Developers
- Mapas Sygic
- Geocoding API
- Geocoding V1
- Response
Response
Geocoding response is in the JSON format.
Top-level element consists of an array of results, status and copyright notice.
Geocoding response
Value | Description |
results | Array of GeocodingResultItems |
status | Descriptive response status OK - in case of HTTP status code 200 ACCESS_DENIED - status code 401, missing or invalid ApiKey INVALID_REQUEST - status code 400, invalid combination of required parameters or missing parameter OVER_QUERY_LIMIT - status code 429, throttling limit exceeded |
copyright | Sygic copyright notice |
GeocodingResultItem
Value | Description |
components | Array of GeocodingComponents |
formatted_result | Formatted address |
location | Geographic location of result |
location_type | Kind of geographic location in relation to results exact - exact match of result location interpolated - location match based on interpolation from an address range closest_point - result contains match of closest address point service could find based on specified location (e.g. if service can't find a house number '14' but it found an address with house number '12') |
type | Type of result item address - address point result type road - street result type (in case address point was not found) |
country_iso | ISO3 code of the country |
GeocodingComponent
Value | Description |
type | location component type. Multiple items with the same type are allowed admin_level_2 - country name admin_level_3 - country subdivision admin_level_4 - country secondary subdivision admin_level_8 - municipality name (city) admin_level_9 - municipality subdivision postal_code - postal code of the area street - street name house_number - house number |
value | String value |
Response example
{
"results": [
{
"components": [
{
"type": "admin_level_2",
"value": "Deutschland"
},
{
"type": "admin_level_3",
"value": "Bayern"
},
{
"type": "admin_level_4",
"value": "München (Stadt)"
},
{
"type": "admin_level_8",
"value": "München"
},
{
"type": "admin_level_9",
"value": "Ludwigsvorstadt"
},
{
"type": "postal_code",
"value": "80335"
},
{
"type": "street",
"value": "Bayerstraße"
},
{
"type": "house_number",
"value": "32"
}
],
"formatted_result": "Bayerstraße 32, 80335 München, Deutschland",
"location": {
"lat": 48.13918,
"lon": 11.5516
},
"location_type": "exact",
"type": "address",
"country_iso": "deu"
}
],
"status": "OK",
"copyright": "© 2019 Sygic a.s."
}
Service status codes
200 - service returned a result (see response format section)
202 - batch job submission succeeded
204 - service did not find the specified location
400 - mandatory input parameter is missing
401 - invalid API key
404 - batch job was not found
429 - throttling limit exceeded
500 - service error
504 - service request timed out
- Previous article: Parameters