Blazing Fast Geocoding

OpenStreetMap addresses served from SSDs

HOW DOES IT WORK?

How does it work?

We run OpenStreetMap on our best servers, with SSDs to ensure response in milliseconds. We also give generous rate limits.

I'M READY, GET STARTED
30 more seconds to go..
1

Get a developer token

You'll need an unique token to identify your requests. We'll send you an email with an activation link .

2

Try it out

Geocode
                          

                          
                        
Reverse Geocode
                        

                        
                      
3

Read the docs!

The documentation is available here. That's all there is to it! :-)

Frequently Asked Questions

Where do you get your data?

From the reliable & free, OpenStreetMap project.

How many requests can I make?

The free tier is limited to 10k requests a day; If you need more, do reach out!

Who runs LocationIQ?

LocationIQ is run by the good folks at Unwired Labs, a Geolocation service.

How can I contribute?

Glad you asked! You could help spread the word or help us identify bugs / security loopholes!

What's next on roadmap?

We're looking to add routing, maps and a basic user dashboard. If you have something else in mind, tell us!

How do I contact you?

Send us a message here and we'll get back to you within a day.

What are rate-limits?

We rate-limit Developer Plans to 60 per minute - and 2 per second. We allow customizable rate-limits on Enterprise Plans.

Pricing
Developer
FREE
10,000 requests / day
60 r/m rate-limit
non-commercial use allowed
Your Current Plan
Professional
$50 /month
20,000 requests / day
600 r/m rate-limit
commercial use allowed
Change to this Plan
Startup
$100 /month
50,000 requests / day
720 r/m rate-limit
commercial use allowed
Change to this Plan

Business
$200 /month
100,000 requests / day
900 r/m rate-limit
commercial use allowed
Change to this Plan
Business Plus
$500 /month
500,000 requests / day
1200 r/m rate-limit
commercial use allowed
Change to this Plan
Enterprise
Custom
high volume plans
flexible contracts + SLA
commercial use allowed
Contact Sales

Considering self-hosting? See our detailed comparison here.

All paid subscriptions go towards maintenance of servers & software.
Documentation

Endpoint

http://locationiq.org/v1/search.php?key=<API_KEY>&format=json&q=Empire%20State%20Building

Options

  • q=<query>

    Query string to search for. Alternatively can be entered as:

    street=<housenumber> <streetname>
    city=<city>
    county=<county>
    state=<state>
    country=<country>
    postalcode=<postalcode>

    Alternative query string format for structured requests. Structured requests are faster and require less server resources. DO NOT COMBINE WITH q=<query> PARAMETER.

    Required (one of q= or individual components.)

  • format=[xml|json]

    Output format. Defaults to xml. (Optional)

  • accept-language=<browser language string>

    Preferred language order for showing search results, overrides the value specified in the "Accept-Language" HTTP header. Either uses standard rfc2616 accept-language string or a simple comma separated list of language codes. Defaults to en. (Optional)

  • countrycodes=<countrycode>[,<countrycode>][,<countrycode>]...

    Limit search results to a specific country (or a list of countries). <countrycode> should be the ISO 3166-1alpha2 code, e.g. in for India, us for the United States, etc. (Optional)

  • viewbox=<left>,<top>,<right>,<bottom>
    viewboxlbrt=<left>,<bottom>,<right>,<top>

    The preferred area to find search results. (Optional)

  • bounded=[0|1]

    Restrict the results to only items contained with the bounding box. Restricting the results to the bounding box also enables searching by amenity only. For example a search query of just "[pub]" would normally be rejected but with bounded=1 will result in a list of items matching within the bounding box. (Optional)

  • addressdetails=[0|1]

    Include a breakdown of the address into elements. Defaults to 0. (Optional)

  • exclude_place_ids=<place_id,[place_id],[place_id]>

    If you do not want certain openstreetmap objects to appear in the search result, give a comma separated list of the place_id's you want to skip. This can be used to broaden search results. For example, if a previous query only returned a few results, then including those here would cause the search to return other, less accurate, matches (if possible.) (Optional)

  • limit=<integer>

    Limit the number of returned results. (Optional)

  • polygon_geojson=1

    Output geometry of results in geojson format (if set.) (Optional)

  • polygon_kml=1

    Output geometry of results in kml format (if set.) (Optional)

  • polygon_svg=1

    Output geometry of results in svg format (if set.) (Optional)

  • polygon_text=1

    Output geometry of results as a WKT (if set.) (Optional)

  • extratags=1

    Include additional information in the result if available, e.g. wikipedia link, opening hours. (Optional)

  • namedetails=1

    Include a list of alternative names in the results. These may include language variants, references, operator and brand. (Optional)


Response

Array of all elements matched. For a detailed list of all possible data returned, please checkout OpenStreetMap Wiki!

  • place_id

    Unique ID for this element in LocationIQ database. Useful for debugging in cases of errors.

  • licence

    The Licence and attribution requirements.

  • osm_type

    The type of this element. One of node way relation.

  • osm_id

    The OSM ID of this element type.

  • boundingbox

    Array of bounding box coordinates where this element is located. The order is as below:

    • min lat / bottom-left Latitude

    • max lat / top-right Latitude

    • min lon / bottom-left Longitude

    • max lon / top-right Longitude

  • lat

    The Latitude of this element

  • lon

    The Longitude of this element

  • display_name

    The display name of this element, with complete address

  • class

    The category of this element.

  • type

    The 'type' of the class/category of this element.

  • importance

    Calculated importance of this element compared to the search query the user has provided. Ranges between 0 and 1. Type: float

  • icon

    The URL of an icon representing this element, if applicable.

  • address

    The address breakdown into individual components. Returned when addressdetails=1 is set in the request. Important components include (but not limited to) country, country_code, postcode, state, county, city, town.

  • extratags

    The extratags defined for this element. Returned when extratags=1 is set in the request.

  • namedetails

    The names defined in other languages for this element. Returned when namedetails=1 is set in the request.

  • geojson

    Output geometry of results in geojson format. Returned when polygon_geojson=1 is set in the request.

  • geokml

    Output geometry of results in kml format. Returned when polygon_kml=1 is set in the request.

  • svg

    Output geometry of results in svg format. Returned when polygon_svg=1 is set in the request.

  • geotext

    Output geometry of results as a WKT. Returned when polygon_text=1 is set in the request.

Endpoint

http://locationiq.org/v1/reverse.php?format=json&key=<API_KEY>&lat=17.421223&lon=78.400674

Options

  • lat=<value>
    lon=<value>

    The location to generate an address for.

    Required.

  • format=[xml|json]

    Output format. Defaults to xml. (Optional)

  • accept-language=<browser language string>

    Preferred language order for showing search results, overrides the value specified in the "Accept-Language" HTTP header. Either uses standard rfc2616 accept-language string or a simple comma separated list of language codes. Defaults to en. (Optional)

  • osm_type=[N|W|R]
    osm_id=<value>

    A specific osm node / way / relation to return an address for. Use this in preference to lat/lon where possible. (Optional. If set, lat, lon are not required.)

  • zoom=[0-18]

    Level of detail required where 0 is country and 18 is house/building. Defaults to 18. (Optional)

  • addressdetails=[0|1]

    Include a breakdown of the address into elements. Defaults to 1. (Optional)

  • polygon_geojson=1

    Output geometry of results in geojson format (if set.) (Optional)

  • polygon_kml=1

    Output geometry of results in kml format (if set.) (Optional)

  • polygon_svg=1

    Output geometry of results in svg format (if set.) (Optional)

  • polygon_text=1

    Output geometry of results as a WKT (if set.) (Optional)

  • extratags=1

    Include additional information in the result if available, e.g. wikipedia link, opening hours. (Optional)

  • namedetails=1

    Include a list of alternative names in the results. These may include language variants, references, operator and brand. (Optional)


Response

Array of all elements matched. For a detailed list of all possible data returned, please checkout OpenStreetMap Wiki!

  • place_id

    Unique ID for this element in LocationIQ database. Useful for debugging in cases of errors.

  • licence

    The Licence and attribution requirements.

  • osm_type

    The type of this element. One of node way relation.

  • osm_id

    The OSM ID of this element type.

  • boundingbox

    Array of bounding box coordinates where this element is located. The order is as below:

    • min lat / bottom-left Latitude

    • max lat / top-right Latitude

    • min lon / bottom-left Longitude

    • max lon / top-right Longitude

  • lat

    The Latitude of this element

  • lon

    The Longitude of this element

  • display_name

    The display name of this element, with complete address

  • address

    The address breakdown into individual components. Returned when addressdetails=1 is set in the request. Important components include (but not limited to) country, country_code, postcode, state, county, city, town.

  • extratags

    The extratags defined for this element. Returned when extratags=1 is set in the request.

  • namedetails

    The names defined in other languages for this element. Returned when namedetails=1 is set in the request.

  • geojson

    Output geometry of results in geojson format. Returned when polygon_geojson=1 is set in the request.

  • geokml

    Output geometry of results in kml format. Returned when polygon_kml=1 is set in the request.

  • svg

    Output geometry of results in svg format. Returned when polygon_svg=1 is set in the request.

  • geotext

    Output geometry of results as a WKT. Returned when polygon_text=1 is set in the request.

Endpoint

http://locationiq.org/v1/balance.php?format=json&key=<API_KEY>

Response

  • day - Balance left for the day (UTC timezone). Type: integer.

Error messages

  • NO_KEY - No API key was provided. HTTP Header 400 is returned.
  • INVALID_KEY - API Key provided is invalid or inactive. HTTP Header 401 is returned.
  • UNKNOWN_ERROR - Some unknown error encountered; please try again after some time. HTTP Header 503 is returned.

Format

format=[xml|json]
  • Output format - Defaults to json.