Position-lab

Nearby Places API

Search for locations within a defined region

Discover places in close proximity with the Nearby Search API, by inputting a particular location and defining a radius. You can also customize your search by targeting specific streets, categories, or names of places.

About Nearby Places API

The Nearby Places API serves as an essential tool for those who want to quickly and accurately locate points of interest, be it in a city, on a street, or within a specific radius around a focal point. With over 500 categories and filters, it’s easy to locate open cafes, dog-friendly eateries, city landmarks, or nearby medical services. By incorporating this API into map applications, developers can provide a dynamic and all-encompassing user experience.

You need to specify a reference area within which you are searching for the place, be it a city, street, or an area around certain coordinates. You can choose from a plethora of categories and can also filter the criteria within them based on your needs, e.g. dog-friendly, free-parking etc

Numerous categories are available, e.g. restaurants, hospitals, entertainment venues, hair salons, schools, malls, accomodation, offices etc. See the comprehensive list below. 

To display the findings from the Places API on a map, take the following actions: gather the place details, pull out the pertinent data, employ a map tool or service (such as Google Maps, MapLibre GL, Leaflet, Openlayers), and incorporate markers or layers to pinpoint the locations on the map.

You can adjust the “limit” parameter to 600 to obtain the highest number of items in a single response, if you wish to fetch more places, utilize the “offset” parameter to navigate to the next results pages.

The API mainly relies on OpenStreetMap (OSM) as its core data source. OSM is a community-driven mapping initiative where users from around the world contribute to and update geographic information. Using OSM data, Nearby Places API offers access to an extensive and detailed database of places and points of interest across different regions.

Steps to get points of interest data

4

3

2

1

First thing you need is a unique API key. Choose one from one of our pricing plans and get an email instantly with your API key. 

To authenticate and gain access to the Geocoding API, all you need to do is attach your key to the base endpoint URL. 

https://api.position-lab.com/nearby?key=API_KEY

Use parameters to find the location data you want. You can filter by location, distance, category and and based on numerous descriptors, like: dog-friendly, accessible with wheelchair, free parking..

Enjoy the data!

				
					{
    "status": "success",
    "data": {
        "places": [
            {
                "id": "12345",
                "name": "Brew Buddy Cafe",
                "address": "123 4th Street, NY",
                "latitude": 40.731610,
                "longitude": -73.936250,
                "category": "cafe",
                "tags": ["open_now", "dog_friendly"],
                "rating": 4.5,
                "opening_hours": {
                    "monday": "8:00 AM - 9:00 PM",
                    "tuesday": "8:00 AM - 9:00 PM",
                    "wednesday": "8:00 AM - 9:00 PM",
                    ...
                },
                "contact": "+1 (234) 567-8901",
                "website": "http://brewbuddycafe.com"
            },
            {
                "id": "67890",
                "name": "Bean's Best Coffee",
                "address": "789 10th Avenue, NY",
                "latitude": 40.729610,
                "longitude": -73.934220,
                "category": "cafe",
                "tags": ["open_now", "dog_friendly"],
                "rating": 4.8,
                "opening_hours": {
                    "monday": "7:00 AM - 7:00 PM",
                    "tuesday": "7:00 AM - 7:00 PM",
                    "wednesday": "7:00 AM - 7:00 PM",
                    ...
                },
                "contact": "+1 (345) 678-9012",
                "website": "http://beansbest.com"
            }
            ...
        ]
    },
    "metadata": {
        "total_results": 20,
        "limit": 10,
        "offset": 0,
        "radius": 1000,
        "latitude": 40.730610,
        "longitude": -73.935242
    }
}
				
			

Nearby Places API in practice

  • Travel Planning: Simplify users’ journey preparations by presenting them with top-rated hotels and attractions in proximity.
  • Location-Based Recommendations: Boost user engagement in travel apps with personalized venue suggestions like prime restaurants, cafes, and bakeries.
  • Business Finder: Offer users a comprehensive local business directory, aiding them in finding quality personal care services such as hairdressers or masseuses.
  • Real Estate Search: Improve users’ property search experience by highlighting areas with optimal living conditions.
  • Emergency Services Locator: Enhance user safety by ensuring swift access to critical services, including police stations, hospitals, and fire departments.
  • Outdoor Activities: Cater to adventure enthusiasts by showcasing close-by recreational venues.
  • Pet-friendly Locations: Enrich the experience of pet owners by pointing out nearby pet-accommodating spots.