Within the Addressing REST API, a request to the Geocode Service returns a list of results. Not every field will be returned with a result; see Addressing API Objects: Result for more detail.
Response Structure
Within the Addressing REST API, a request to the Address Geocode Service returns a list of results. Not every field will be returned with a result.
Field | Type | Description |
---|---|---|
errorMessage | String | Error message: The error message returned from the service with an error code. |
status | Status | Status of the response. |
results | <Result array> | List of results based on the specified criteria. |
Addressing API: Geocode Example
In the Sample application, do the following:
- Navigate to .
- Enter the Address "10 downing street london SW1A 2AA" and "GBR" as the Country.
- Click Submit and review the Response.
{ "responses": [ { "status": "OK", "results": [ { "score": 100, "address": { "formattedAddress": "PRIME MINISTER& FIRST LORD OF THE TREASURY, 10 DOWNING STREET, LONDON, SW1A 2AA", "formattedStreetAddress": "10 DOWNING STREET", "formattedLocationAddress": "LONDON SW1A 2AA", "addressNumber": "10", "country": { "isoAlpha3Code": "GBR" }, "admin1": {}, "admin2": {}, "city": { "longName": "LONDON", "shortName": "LONDON" }, "neighborhood": {}, "postalCode": "SW1A 2AA", "placeName": "PRIME MINISTER& FIRST LORD OF THE TREASURY", "street": "DOWNING" }, "addressLines": [ "PRIME MINISTER& FIRST LORD OF THE TREASURY", "10 DOWNING STREET", "LONDON", "SW1A 2AA" ], "location": { "explanation": { "type": "ADDRESS_POINT" }, "feature": { "type": "Feature", "properties": { "crsName": "epsg:4326" }, "geometry": { "type": "Point", "coordinates": [ -0.12767, 51.50354 ] } } }, "parsed": { "ggs": [ { "score": 0, "classifications": [ { "label": "street", "value": "DOWNING", "start": 0, "end": 0 }, { "label": "city", "value": "LONDON", "start": 0, "end": 0 }, { "label": "addressNumber", "value": "10", "start": 0, "end": 0 }, { "label": "postalCode", "value": "SW1A 2AA", "start": 0, "end": 0 }, { "label": "country", "value": "GBR", "start": 0, "end": 0 }, { "label": "streetSuffix", "value": "STREET", "start": 0, "end": 0 } ] } ] }, "explanation": { "addressMatch": { "type": "ADDRESS", "description": [ { "label": "placeName", "matchType": "NONE" }, { "label": "addressNumber", "matchType": "EXACT" }, { "label": "admin1", "matchType": "NONE" }, { "label": "admin2", "matchType": "NONE" }, { "label": "city", "matchType": "EXACT" }, { "label": "neighborhood", "matchType": "NONE" }, { "label": "suburb", "matchType": "NONE" }, { "label": "street", "matchType": "EXACT" }, { "label": "postalCode", "matchType": "EXACT" }, { "label": "streetType", "matchType": "EXACT" }, { "label": "postalCodeExt", "matchType": "NONE" }, { "label": "streetDirectional", "matchType": "EXACT" } ] }, "source": { "label": "ggs" } }, "customFields": { "RPC_STATUS_FLAG": "2", "PB_KEY": "P00019Y5JMUS", "LANGUAGE": "en", "BLPU_STATE_CODE": "2", "VALIDATION_CONFIDENCE": "93", "RESULT_CODE": "S8HPNTSCZA", "POST_THOROUGHFARE_TYPE": "STREET", "LOGICAL_STATUS_CODE": "1", "THOROUGHFARE_TYPE": "STREET", "GEOHASH": "gcpuvpgjc5dr", "MATCH_TYPE": "ADDRESS", "MAIN_ADDRESS": "DOWNING", "UPRN": "100023336956", "ADDRESS_LINE1": "PRIME MINISTER& FIRST LORD OF THE TREASURY", "ADDRESS_LINE2": "10 DOWNING STREET", "ADDRESS_LINE3": "LONDON", "PRECISION_CODE": "S8HPNTSCZA", "ADDRESS_LINE4": "SW1A 2AA", "ORGANISATIONAL_NAME": "PRIME MINISTER & FIRST LORD OF THE TREASURY " } } ] } ] }