Places API - search points of interest by criteria

Search places by more than 500 categories: restaurants, tourist attractions, historical objects, accommodation, etc. In addition, you can specify conditions, for example, Free Internet Access, No Fee, Wheelchair Access, etc., to choose the suitable ones. Try it with our Live Demo:

The Places API works via HTTP get requests and is easy to integrate. All you need is an API key and a request URL which you can generate a request URL with the Places API Playground. Learn more about API keys on our Getting Started page >>

Supported categories

We support more than 500 place categories at the moment and extent this list continuously. Moreover, our categories are hierarchical so that you can specify the top-level or more detailed searches. Here you can find the full list of the categories >>

Top-level categoryDescription
accommodationHotels, apartments, guest houses, etc. Subcategories examples: "accommodation.hotel", "accommodation.hostel", "accommodation.motel"
activityClubs, community centers
commercialShops and shopping centers. Subcategories examples: "commercial.supermarket", "commercial.outdoor_and_sport.bicycle", "commercial.clothing.women"
cateringRestaurants, cafes, bars, etc. Subcategories examples: "catering.restaurant.italian", "catering.fast_food.kebab", "catering.cafe.bubble_tea"
educationSchools, colleges, univercities, etc.
entertainmentPlaces to spend time with friends and family. c"entertainment.culture.theatre", "entertainment.museum", "entertainment.theme_park"
healthcareClinics, praxises, hospitals, etc. Subcategories examples: "healthcare.clinic_or_praxis.psychiatry", "healthcare.dentist", "healthcare.pharmacy"
leisurePlaces where one can relax and unwind. Subcategories examples: "leisure.picnic.bbq", "leisure.spa", "leisure.park"
naturalMountains, protected areas, national parks
parkingParking houses and parking slots
serviceBanks, cleaning services, post, gas stations, etc.
tourismAttractions, sights, tourist info. Subcategories examples: "tourism.sights.lighthouse", "tourism.attraction.viewpoint", "tourism.sights.ruines"
adultEntertainments for adults, sometimes with a sexual context
skiSki stations and lifts
sportSport centers, stadiums, fitness
public_transportPublic transport stops and stations. Subcategories examples: "public_transport.train", "public_transport.subway.entrance", "public_transport.bus"

Conditions to search suitable places

In addition to categories, the Places API supports conditions - criteria the place should comply with. Here are examples of using categories and conditions in Places API queries:

  • parking + no_fee - search for free parking places;
  • catering.restaurant + internet_access + vegan.only - search restaurants who provide an internet access and serves vegan food only;
  • tourism.sights + dogs - find dog-friendly tourist sights.

Go to the list of supported conditions >>

Location filters and bias

The Places API allows searching places within a bounding box or radius, reachability area, and by proximity to a specific location:

Filtering places by boundingbox or radius

Search within geometry

The Places API lets you search places within specified geometry:

  • within a visible area or view box. For example, this is useful when you need to show points of interest on a visible part of a map;
  • within a radius. So, for example, you can get all the places within 10 kilometers from a location.

Search places within reachability area

Search reachable places

The Places API allows creating more advanced searches by filtering by reachability area or isoline. The Geoapify Places API accepts a geometry generated by Isoline API as an input.

For example, this can be helpful to find:

  • all public transport stations within 5 minutes of walking
  • gas stations within 5 minutes of driving
  • supermarkets within 10 minutes of biking

Filter places by bounds

Search nearby

You can also make search places by proximity bias. For example, you can create the following requests with bias parameter:

  • give me the 20 nearest supermarkets
  • give me the 100 neatest tourist attractions
  • give me the 5 nearest schools

Learn more about filter and bias parameters on the Places API Documentation page or try it with the Places API Playground >>

Integrate Places API to your project

The Places API works via HTTP get protocol and returns GeoJSON as a result which can be easily visualized by most map libraries.

You will need a Geoapify API key to use Places API. Visit our Getting Started page for details >>

Places API URL examples

Here are the API URL examples solving a particular business problem:

Search restaurants in Munich's city centerwithin a visible area

Let's run a search on 100 restaurants in Munich's city center. We will query the "catering.restaurant" category for that. Here is a URL that will do the job:

https://api.geoapify.com/v2/places?categories=catering.restaurant&filter=rect:11.549881365729718,48.15114774722076,11.58831616443861,48.12837326392079&limit=100&apiKey=YOUR_API_KEY

Restaurants in Munich

Places with category the "catering.restaurant"
Search for WCs within 10 minutes walking from Alexanderplatz in Berlin

You can find the list of reachable within 10 minutes WCs in two steps:

STEP 1. Generate an isochrone from Alexanderplatz in Berlin:

https://api.geoapify.com/v1/isoline?lat=52.521670650000004&lon=13.413278026558228&type=time&mode=walk&range=600&apiKey=YOUR_API_KEY

STEP 2. Query amenities with the "amenity.toilet" category by the isochrone using the geometry ID returned by the previous step:

https://api.geoapify.com/v2/places?categories=amenity.toilet&filter=geometry:GEOMETRY_ID&bias=proximity:13.413637435864272,52.52197645&limit=100&apiKey=YOUR_API_KEY

We also add bias corresponding to the original location to sort the result by proximity.

WCs in Berlin

Places with the category "amenity.toilet"
Query nearest 50 tourist sights from a location with barrier-free access

We will use a combination of the "tourism.sights" category and "wheelchair" condition for the query:

https://api.geoapify.com/v2/places?categories=tourism.sights&conditions=wheelchair&bias=proximity:7.744380838810624,48.5873243&limit=200&apiKey=YOUR_API_KEY

Sights with barrier-free access

Places with the "tourism.sights" category and "wheelchair" condition

You can generate more specific, business-oriented examples using the Places API Playground.

Places API response object example

The API returns GeoJSON.FeatureCollection object as a result.

Each result object has:

  • a categories list that lists all the categories and conditions corresponding to the place;
  • the details information available that can be queried with Place Details API;
  • the place ID for the Place Details API.

Here is an example of the response object:

    • "FeatureCollection"
    • [] 1 item
      • {} 3 keys
        • "Feature"
        • {} 20 keys
          • "Monument du Général Kléber"
          • "Place Kléber"
          • "La Petite France"
          • "Krutenau"
          • "Strasbourg"
          • "Strasbourg"
          • "Bas-Rhin"
          • "Grand Est"
          • "France"
          • "fr"
          • 7.745774519707208
          • 48.58337235
          • "Monument du Général Kléber, Place Kléber, Strasbourg, France"
          • "Monument du Général Kléber"
          • "Place Kléber, Strasbourg, France"
          • [] 7 items
            • "heritage"
            • "tourism"
            • "tourism.sights"
            • "tourism.sights.memorial"
            • "tourism.sights.memorial.monument"
            • "wheelchair"
            • "wheelchair.yes"
          • [] 3 items
            • "details.facilities"
            • "details.heritage"
            • "details.wiki_and_media"
          • {} 4 keys
            • "openstreetmap"
            • "© OpenStreetMap contributors"
            • "Open Database Licence"
            • "https://www.openstreetmap.org/copyright"
          • 450
          • "514533f150acfb1e4059b3e200f2ab4a4840f00102f901f68556020000000092031d4d6f6e756d656e742064752047c3a96ec3a972616c204b6cc3a9626572"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 7.745774521562287
            • 48.58337235491981

Call the Places API

Here are some code samples that show how to use the Places API in different programming languages:

Places API JavaScript

JavaScript fetch() function provides a convenient and straightforward mechanism for external APIs and resources. The fetch interface allows parsing a JSON object from the response:


fetch('https://api.geoapify.com/v2/places?categories=commercial&filter=rect:7.735282,48.586797,7.756289,48.574457&limit=200&apiKey=YOUR_API_KEY')
.then(resp => resp.json())
.then((places) => {
	console.log(places);
});

More information about a place with the Place Details API

The Place Details API provides comprehensive information about its geometry, contact information, open hours, and more.

Together with common information about the place, it's possible to query related features and analytical data. For example, all commercials reachable within 5 minutes, schools and kindergartens nearby, the closest public transport stops.

Places categories and conditions

Need more categories and conditions?

We constantly increase the number of categories and conditions. The list already includes all common amenity types. However, it might not cover some cases.

Contact us and describe your business case. We will be happy to extend the API to cover it!

FAQ

How much does a Places API request cost?

Geoapify's Places API has different pricing plans depending on usage. Prices are calculated in credits. Each time 20 results are returned by Places API, one credit is consumed. Up to 3000*20 = 60000 places/day are Free, then each 20 results cost 0.0049€ and less.

Can I store the Places API results?

Yes, sure. Geoapify Places API uses open data sources, so you can cache, store, redistribute data without any restrictions. Nevertheless, please keep all the attrition data together.

How can I get restaurants with API?

You can query restaurants with Geoapify Places API. We have categories for restaurants, fast food, cafes, bars, etc., and their types. So, for example, you can query separately Italian restaurants, Ice cream cafes, or Kebab fast food places.

How to extract data from OpenStreetMap?

There are several ways to query data from OpenStreetMap. The Geoapify Places API is one of the most convenient ones. We processed, verified, and standardized OpenStreetMaps data for you so you can query them by categories.

What is the maximal amount of places I can query in one request?

You can set limit=500 to get the maximum amount of elements in one response. Otherwise, you can access the next pages by using the offset parameter. Please note, when the limit is bigger than 20, every 20 items in the response are counted as one Places API request.

What is the rate limit for the API?

Depending on pricing plan we offer up to 30 requests / sec for Places API requests.

Can I find all the places of certain type nearby?

Yes, sure. Set location bias and set the maximal amount of results as a limit. In addition, you can set the location filter as a view box or circle.

Which kind of geometry can I set as a location filter?

You can set as a filter any geometry generated by the Geoapify Location Platform. For example, this could be isoline or result of geometry operation on isoline. You can try filter by geometry in our Playground.

The first version of the API is deprecated now. How long do you plan to keep it alive it in the future?

We recommend all our customers to switch version 2, as it's more powerful and supports more types of places. However, we do not plan at the moment to shut down the first version as there are still customers that using it.

Ready to get started?

Get an API key and benefit Places API!