Details

GET
https://api.woosmap.com/localities/details

Returns the full details of a suggestion, looked up by its public_id.

Ratelimit: 50/1s

Authorization

key
apiKey query

Public key of the project usually starts with woos-

private_key
apiKey query

Private key with or without write permission.

X-Api-Key
apiKey header

Private key with or without write permission.

Header Parameters

Query Parameters

fields
string Defaults to geometry|address_components

Restricts the response to a subset of fields. Use | to provide multiple values.

Available options: geometry, address_components, shape
Example: shape
language
string Defaults to ""

Language code (ISO 639-1, two letters) for the response.

Resolution order:

  1. language (this parameter)
  2. The request's Accept-Language header
  3. locale default
  4. English (when neither is recognised)

Only part of the address components are translated; not required for postal-code requests.

Example: en
cc_format
CountryCodeFormat

Format of the country code returned in address_components. When unset, mirrors the format used in components, or alpha2 if components is not provided.

Available options: alpha2, alpha3
Example: alpha3
public_id
string required

Identifier of the place to retrieve details for. Use the public_id returned by the Autocomplete endpoint.

Example: cG9zdGFsX2NvZGU6Z2I6OmNDN0N0ZUF2MW9YRi9KLzlnS2cremJndktFaz0=

Response

200 application/json

Successful Response

result
object required

The Root Node for Localities Details

Show 10 propertiesHide 10 properties
result. public_id
string required

Unique identifier for this place.

result. types
string[] required

Available localities types.

result. formatted_address
string required

Contains the readable text description of the result.

result. name
string | null

The postal code name if result is a postal code.

result. administrative_area_label
string | null

Only available for admin_level suggestions, this contains the local english name of the administration level ("department" for France or "federal_state" for Germany).

result. status
string | null

This optional field is only available for UK addresses referenced as not yet built by Royal Mail. Only one value yet.

result. geometry
object | null

The location of the PostalCode, in latitude and longitude, eventually associated with a Viewport and a shape.

Show 4 propertiesHide 4 properties
result.geometry. location
object | null
Show 2 propertiesHide 2 properties
result.geometry.location. lat
number required
result.geometry.location. lng
number required
result.geometry. viewport
object | null
Show 2 propertiesHide 2 properties
result.geometry.viewport. northeast
object required
Show 2 propertiesHide 2 properties
result.geometry.viewport.northeast. lat
number required
result.geometry.viewport.northeast. lng
number required
result.geometry.viewport. southwest
object required
Show 2 propertiesHide 2 properties
result.geometry.viewport.southwest. lat
number required
result.geometry.viewport.southwest. lng
number required
result.geometry. shape
object | null
Show 2 propertiesHide 2 properties
result.geometry.shape. type
string required
Available options: Polygon, MultiPolygon
result.geometry.shape. coordinates
array required
result.geometry. accuracy
string | null

This accuracy represents the type of address returned - DISTRICT and POSTAL_CODE are for UK only.

Show 6 enum values Hide 6 enum values
ROOFTOP
APPROXIMATE
RANGE_INTERPOLATED
GEOMETRIC_CENTER
POSTAL_CODE
DISTRICT
result. address_components
object[] | null
Show 3 propertiesHide 3 properties
result.address_components. types
string[] required
result.address_components. long_name
string | array required
result.address_components. short_name
string | array required
result. categories
string[] | null
result. addresses
object | null

For the UK only. When a postal code is returned, this field contains a list of addresses associated with this postal code.

Show 2 propertiesHide 2 properties
result.addresses. pagination
object required deprecated

The pagination part of the response is deprecated as all the addresses are now automatically returned in the response. It will be turned off at some point. From now on, the pagination will systematically return page=1, page_count=1, addresses_per_page=total addresses count and address_count=total addresses count.

Show 4 propertiesHide 4 properties
result.addresses.pagination. page
integer required deprecated

the request page

result.addresses.pagination. page_count
integer required deprecated

the number of available pages

result.addresses.pagination. addresses_per_page
integer required deprecated

the number of available addresses per page

result.addresses.pagination. address_count
integer required deprecated

the number of available addresses

result.addresses. list
object[] required

List of addresses

Show 2 propertiesHide 2 properties
result.addresses.list. public_id
string required

The public_id of the address can be used to gather details on that specific address

result.addresses.list. description
string required

A human readable description of the address

Errors

401

Unable to locate credentials.

application/json
detail
string required
402

Out of free quota.

application/json
detail
string required
403

Credentials found, but not matching.

application/json
detail
string required
422

Validation Error

application/json
detail
object[]
Show 5 propertiesHide 5 properties
detail. loc
any[] required
detail. msg
string required
detail. type
string required
detail. input
any
detail. ctx
object
429

Rate limit reached

application/json
detail
string required
        curl -L 'https://api.woosmap.com/localities/details?public_id=TVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPV9fTVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPQ%3D%3D&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'

    
        const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/localities/details?public_id=TVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPV9fTVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPQ%3D%3D&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

    
        import requests

url = "https://api.woosmap.com/localities/details?public_id=TVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPV9fTVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPQ%3D%3D&key=YOUR_PUBLIC_API_KEY"

payload = {}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)


    
        
{
"result": {
"public_id": "TVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPV9fTVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPQ==",
"types": [
"address"
],
"formatted_address": "House Of Commons, Houses Of Parliament, London, SW1A 0AA",
"geometry": {
"location": {
"lat": 51.4998415,
"lng": -0.1246375
},
"accuracy": "ROOFTOP"
},
"address_components": [
{
"types": [
"country",
"administrative_area_level_0",
"division_level_0"
],
"long_name": "United Kingdom",
"short_name": "GB"
},
{
"types": [
"state",
"division_level_1"
],
"long_name": "England",
"short_name": "England"
},
{
"types": [
"administrative_area_level_1",
"county",
"division_level_2"
],
"long_name": "City of London",
"short_name": "City of London"
},
{
"types": [
"district",
"division_level_3"
],
"long_name": "Westminster",
"short_name": "Westminster"
},
{
"types": [
"locality"
],
"long_name": "London",
"short_name": "London"
},
{
"types": [
"postal_codes"
],
"long_name": "SW1A 0AA",
"short_name": "SW1A 0AA"
},
{
"types": [
"premise"
],
"long_name": "Houses Of Parliament",
"short_name": "Houses Of Parliament"
},
{
"types": [
"organisation"
],
"long_name": "House Of Commons",
"short_name": "House Of Commons"
}
]
}
}
        
{
"result": {
"public_id": "cG9zdGFsX2NvZGU6Z2I6OmNDN0N0ZUF2MW9YRi9KLzlnS2cremJndktFaz0=",
"types": [
"postal_code"
],
"formatted_address": "SW1A 0AA, City of London",
"name": "SW1A 0AA",
"geometry": {
"location": {
"lat": 51.499842,
"lng": -0.124638
},
"accuracy": "GEOMETRIC_CENTER"
},
"address_components": [
{
"types": [
"country",
"administrative_area_level_0",
"division_level_0"
],
"long_name": "United Kingdom",
"short_name": "GB"
},
{
"types": [
"state",
"division_level_1"
],
"long_name": "England",
"short_name": "England"
},
{
"types": [
"administrative_area_level_1",
"county",
"division_level_2"
],
"long_name": "City of London",
"short_name": "City of London"
},
{
"types": [
"district",
"division_level_3"
],
"long_name": "Westminster",
"short_name": "Westminster"
},
{
"types": [
"postal_codes"
],
"long_name": "SW1A 0AA",
"short_name": "SW1A 0AA"
}
],
"addresses": {
"pagination": {
"page": 1,
"page_count": 1,
"addresses_per_page": 1,
"address_count": 1
},
"list": [
{
"public_id": "TVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPV9fTVZaV0JmR1pRbkFRbjlKdEU5Q0paamdlQjRRPQ==",
"description": "House Of Commons, Houses Of Parliament London, SW1A 0AA"
}
]
}
}
}
Was this helpful?