Geocode

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

Geocodes an address into coordinates, or reverse geocodes a latlng position into an address. Provide exactly one of address or latlng.

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

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
data
string Defaults to standard

Selects the postal-code dataset. advanced extends the default Western-Europe coverage to worldwide postal codes.

Requires a dedicated license option subject to specific billing — please contact us.

Available options: advanced, standard
Example: advanced

Restricts results to one or more countries. Pass each country as a country:<ISO-3166-1 Alpha-2 or Alpha-3> filter. Use | to provide multiple values.

Example: country:gb
types
string Defaults to locality|postal_code|address

Restricts results to one or more types. Use | to provide multiple values. Ignored when latlng is set.

Show 3 variants Hide 3 variants
LocalitiesTypes string
Show 17 enum values Hide 17 enum values
country
admin_level
admin_level_1
admin_level_2
admin_level_3
postal_code
address
route
locality
city
town
village
hamlet
borough
suburb
quarter
neighbourhood
LocalitiesTypesPoi string
Show 80 enum values Hide 80 enum values
point_of_interest
beach
government
park
park.national
place_of_worship
police
post_office
sports
sports.golf
sports.winter
transit
transit.station
transit.station.airport
transit.station.rail
transit.station.rail.subway
transit.station.rail.train
transit.station.rail.light_rail
transit.station.rail.monorail
transit.station.rail.funicular
transit.station.rail.tram
business
business.car_repair
business.car_rental
business.cinema
business.conference_centre
business.exhibition_centre
business.theatre
business.nightclub
business.finance
business.finance.bank
business.fuel
business.parking
business.mall
business.food_and_drinks
business.food_and_drinks.bar
business.food_and_drinks.biergarten
business.food_and_drinks.cafe
business.food_and_drinks.fast_food
business.food_and_drinks.pub
business.food_and_drinks.restaurant
business.food_and_drinks.food_court
business.shop
business.shop.mall
business.shop.bakery
business.shop.butcher
business.shop.library
business.shop.grocery
business.shop.sports
business.shop.toys
business.shop.clothes
business.shop.furniture
business.shop.electronics
business.shop.doityourself
business.shop.craft
education
education.school
education.kindergarten
education.university
education.college
education.library
hospitality
hospitality.hotel
hospitality.hostel
hospitality.guest_house
hospitality.bed_and_breakfast
hospitality.motel
medical
medical.hospital
medical.pharmacy
medical.clinic
tourism
tourism.art_gallery
tourism.attraction
tourism.attraction.amusement_park
tourism.attraction.zoo
tourism.attraction.aquarium
tourism.monument
tourism.monument.castle
tourism.museum
LocalitiesTypesPoiAlias string
Show 9 enum values Hide 9 enum values
airport
train_station
metro_station
shopping
museum
zoo
amusement_park
art_gallery
tourist_attraction
Example: address

Restricts results by excluding one or more types. Use | to provide multiple values.

Show 3 variants Hide 3 variants
LocalitiesTypes string
Show 17 enum values Hide 17 enum values
country
admin_level
admin_level_1
admin_level_2
admin_level_3
postal_code
address
route
locality
city
town
village
hamlet
borough
suburb
quarter
neighbourhood
LocalitiesTypesPoi string
Show 80 enum values Hide 80 enum values
point_of_interest
beach
government
park
park.national
place_of_worship
police
post_office
sports
sports.golf
sports.winter
transit
transit.station
transit.station.airport
transit.station.rail
transit.station.rail.subway
transit.station.rail.train
transit.station.rail.light_rail
transit.station.rail.monorail
transit.station.rail.funicular
transit.station.rail.tram
business
business.car_repair
business.car_rental
business.cinema
business.conference_centre
business.exhibition_centre
business.theatre
business.nightclub
business.finance
business.finance.bank
business.fuel
business.parking
business.mall
business.food_and_drinks
business.food_and_drinks.bar
business.food_and_drinks.biergarten
business.food_and_drinks.cafe
business.food_and_drinks.fast_food
business.food_and_drinks.pub
business.food_and_drinks.restaurant
business.food_and_drinks.food_court
business.shop
business.shop.mall
business.shop.bakery
business.shop.butcher
business.shop.library
business.shop.grocery
business.shop.sports
business.shop.toys
business.shop.clothes
business.shop.furniture
business.shop.electronics
business.shop.doityourself
business.shop.craft
education
education.school
education.kindergarten
education.university
education.college
education.library
hospitality
hospitality.hotel
hospitality.hostel
hospitality.guest_house
hospitality.bed_and_breakfast
hospitality.motel
medical
medical.hospital
medical.pharmacy
medical.clinic
tourism
tourism.art_gallery
tourism.attraction
tourism.attraction.amusement_park
tourism.attraction.zoo
tourism.attraction.aquarium
tourism.monument
tourism.monument.castle
tourism.museum
LocalitiesTypesPoiAlias string
Show 9 enum values Hide 9 enum values
airport
train_station
metro_station
shopping
museum
zoo
amusement_park
art_gallery
tourist_attraction
Example: suburb|quarter|neighbourhood
address
string

Address, street, locality, or postal code to geocode.

Only the first 20 tokens (within 150 characters) are processed.

Example: 224%20Rue%20de%20Rivoli%2C%20Paris
latlng
string

Point to reverse geocode, required if the address parameter is missing.

Example: 52.479699,-1.902691
list_sub_buildings
boolean Defaults to false

Returns all addresses sharing the same street number or building in a sub_buildings field. Reverse geocoding only.

Example: true

Response

200 application/json

Successful Response

Any of

Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)

results
object[] required
Show 9 propertiesHide 9 properties
results. public_id
string required

Unique identifier for this place.

results. types
string[] required

An array containing the types of the result

results. formatted_address
string required

Contains the readable text description of the result.

results. name
string | null

Name of the result when available

results. address_components
object[] | null
Show 3 propertiesHide 3 properties
results.address_components. types
string[] required
results.address_components. long_name
string | array required
results.address_components. short_name
string | array required
results. 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).

results. status
string | null

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

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

Specifies additional data about the geocoded location. The following values are currently supported:

  • ROOFTOP result is a precise geocode for which we have location information accurate down to street address precision.
  • RANGE_INTERPOLATED result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.
  • GEOMETRIC_CENTER result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …).
  • APPROXIMATE result is approximate (usually when no other above value applies)
  • POSTAL_CODE Address has inherited from the location of the postal code it is part of (for NYB addresses)
  • DISTRICT Address has inherited from the location of the district it is part of (for NYB addresses)
Show 6 enum values Hide 6 enum values
ROOFTOP
APPROXIMATE
RANGE_INTERPOLATED
GEOMETRIC_CENTER
POSTAL_CODE
DISTRICT
results. scores_per_components
object | null

For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode's result.

Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)

results
object[] required
Show 10 propertiesHide 10 properties
results. public_id
string required

Unique identifier for this place.

results. types
string[] required

An array containing the types of the result

results. formatted_address
string required

Contains the readable text description of the result.

results. name
string | null

Name of the result when available

results. address_components
object[] | null
Show 3 propertiesHide 3 properties
results.address_components. types
string[] required
results.address_components. long_name
string | array required
results.address_components. short_name
string | array required
results. 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).

results. status
string | null

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

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

Specifies additional data about the geocoded location. The following values are currently supported:

  • ROOFTOP result is a precise geocode for which we have location information accurate down to street address precision.
  • RANGE_INTERPOLATED result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.
  • GEOMETRIC_CENTER result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …).
  • APPROXIMATE result is approximate (usually when no other above value applies)
  • POSTAL_CODE Address has inherited from the location of the postal code it is part of (for NYB addresses)
  • DISTRICT Address has inherited from the location of the district it is part of (for NYB addresses)
Show 6 enum values Hide 6 enum values
ROOFTOP
APPROXIMATE
RANGE_INTERPOLATED
GEOMETRIC_CENTER
POSTAL_CODE
DISTRICT
results. distance
number required

When reverse geocoding, this field represents the distance (in meter) to the requested latlng

results. sub_buildings
object[] | null

When reverse geocoding with list_sub_buildings=true, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.

Show 2 propertiesHide 2 properties
results.sub_buildings. public_id
string required

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

results.sub_buildings. 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/geocode?address=Place%20Jeanne-d%27Arc&components=country%3AFR&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'

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

fetch("https://api.woosmap.com/localities/geocode?address=Place%20Jeanne-d'Arc&components=country%3AFR&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/geocode?address=Place%20Jeanne-d'Arc&components=country%3AFR&key=YOUR_PUBLIC_API_KEY"

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

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

print(response.text)


    
        
{
"results": [
{
"public_id": "0+FTYd/1MsiBSxLAKq+/Fiyy+uM=",
"types": [
"address",
"route"
],
"formatted_address": "Place Jeanne D'Arc, 75013, Paris",
"address_components": [
{
"types": [
"country",
"administrative_area_level_0",
"division_level_0"
],
"long_name": "France",
"short_name": "FR"
},
{
"types": [
"state",
"division_level_1"
],
"long_name": "Île-de-France",
"short_name": "Île-de-France"
},
{
"types": [
"administrative_area_level_1",
"county",
"division_level_2"
],
"long_name": "Paris",
"short_name": "Paris"
},
{
"types": [
"locality"
],
"long_name": "Paris",
"short_name": "Paris"
},
{
"types": [
"postal_codes"
],
"long_name": "75013",
"short_name": "75013"
},
{
"types": [
"route"
],
"long_name": "Place Jeanne D'Arc",
"short_name": "Place Jeanne D'Arc"
}
],
"geometry": {
"location": {
"lat": 48.829405,
"lng": 2.367944
},
"location_type": "GEOMETRIC_CENTER"
},
"scores_per_components": {
"street_name": 1
}
}
]
}
        
{
"results": [
{
"public_id": "",
"types": [
"address"
],
"formatted_address": "Radway House, Alfred Road, London, W2 5ER",
"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": "W2 5ER",
"short_name": "W2 5ER"
},
{
"types": [
"route"
],
"long_name": "Alfred Road",
"short_name": "Alfred Road"
},
{
"types": [
"premise"
],
"long_name": "Radway House",
"short_name": "Radway House"
}
],
"geometry": {
"location": {
"lat": 51.5211258,
"lng": -0.1956346
},
"location_type": "ROOFTOP"
},
"distance": 28.62347934634507,
"sub_buildings": [
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9faitia1pNNURnOWYvQmRjMUdweXl5SjdLZUZnPQ==",
"description": "Flat 1, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fbTRoZVpxYkhBYVVXSytqek04UGtGQ1VLTVI0PQ==",
"description": "Flat 2, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fcmY1MHV6aE5kVytLWWZLV3JabzFzR2lnbThzPQ==",
"description": "Flat 3, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fajlaWXJJUDFKSmI1Y0dpNElDanBQejF2YUg4PQ==",
"description": "Flat 4, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fbkdEZTNOODZNL0VlWGtoR0pSa2tBS1NMYndVPQ==",
"description": "Flat 5, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fTGxlWUlKN2NhU1JXcTBuSEs1RExiamliNlpNPQ==",
"description": "Flat 6, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9feVZXa05ISjhzVGNHK2NQUHFpNlFIUWgvSnpJPQ==",
"description": "Flat 7, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fTVc5NldSeWpuOENUS2xST21vZzdnNGxGQldrPQ==",
"description": "Flat 8, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fN3RkdE9HeHBwT2M5R1hQMUFwNDJUc3NwRklZPQ==",
"description": "Flat 9, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fR2RVRHpoYll4a2RlTldjLzF3NVNFTXNZYzlFPQ==",
"description": "Flat 10, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fL3FXbnVZU2h4bjAwMDNKK3hJeU9OL3lnemFzPQ==",
"description": "Flat 11, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fVVVCUWhpNVJQWWk2eTl1WFBTVTRmK3Zma3VBPQ==",
"description": "Flat 12, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fV2hSUDNadnFMN3ZzaWJ6UFd2MWM3aW1qT3hBPQ==",
"description": "Flat 13, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fcWxGbFRlcE1TVStZVElodzFSdVhiTGxZTXl3PQ==",
"description": "Flat 14, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fYjR5VHRXMmZTQ0FOMGwwZHJNaFh5TFRnVHlnPQ==",
"description": "Flat 15, Radway House, Alfred Road, London, W2 5ER"
},
{
"public_id": "Nmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PV9fNmp0K1VVUFQ4eFI3S1BuaDZEZVVJVWhYY3A4PQ==",
"description": "Flat 16, Radway House, Alfred Road, London, W2 5ER"
}
]
}
]
}
Was this helpful?