How to get the POIS around a place

Hi all and thanks in advance for your help!

What I want to achieve:

Given a place (eg a town) I want to get a number of POIS around.

The word around is very important because I know that

  1. I can use /v2/directions/{profile}
  2. insert a single pair of coordinate for my place
  3. insert the round_trip option with a length
  4. Get the bbox value
  5. Use /pois
  6. Pass the previous bbox value
  7. Get the POIS

Problem is that the bbox calculated by /v2/directions/{profile} is not around my place, but it can be rendered only on north, only on south etc

How can I do?

Many thanks!


Hi @aminta,

check out the api-documentation for the /pois endpoint.

You can pass a GeoJSON to the pois endpoint and specify a buffer in meters around the geometry in which it should search for POIs.
Carefull with high buffer values though, depending on the area you are looking at, it might take a while to return all values.

If you use the /v2/directions/{profile}/geojson endpoint you can just use the route geometry and pass it to the pois service, like in the following example with a buffer of 20 meters:


Best regards

1 Like

Thanks @amandus for your prompt answer! In your example, if I have not misunderstood, you give to the endpoint a line, searching for POIS in a maximum distance of 20 meters. What I’m trying to achieve is, instead, given a single point (ie the center of a town), to get the POIS, filtered by category, in a given radius, say, of 20 maximum 30 km, so I can create a route to ride for example by bicycle…


you can do that by passing a point instead of the line with a buffer and also add the filter category to the request.
However, the maximum search radius is 2km.
So you either have to use the bbox after all and do multiple requests around the center
like this where x is your center and each rectangle is one bbox for a poi request.


or use a different strategy or service after all.

Best regards

1 Like

Thanks @amandus, maybe I can use the Overpass API to get the POIS in a radius of 15-30km and then pass the result to Openroute directions service…