APIs
Places API — nearby search
A places API with nearby search returns the points of interest closest to a coordinate — restaurants, pharmacies, museums — nearest first, each with its distance. oslew filters them by category and, where an attributes feed carries opening hours, by whether they are open at a moment you choose. The places come from open data licensed CDLA-Permissive-2.0, which you may store; that data is smaller than the largest commercial places databases, and this page is plain about where that shows.
Last reviewed
Nearby search answers a question every location product eventually asks: what is around here, of the kind I care about, and is it open? GET /v1/nearby answers the first two from open place data and the third from whatever opening-hours feed is loaded — and because hours are where open data is thinnest, most of what follows is about reading that third answer correctly.
What a nearby request answers
The route returns places only — museums, shops, restaurants, offices — never address records. For the nearest addresses, or addresses and places together with the administrative areas around a point, use reverse geocoding instead.
A request takes at, the coordinate with latitude first; category, to keep one kind of place; open_at, to keep places open at an instant; and limit, defaulting to a handful. Each result carries distance_m from the point, and the list is ordered by it.
The search begins in the few hundred metres around the point and widens a level at a time until it holds enough places it can vouch for as the nearest, stopping at a cell of about 10 km. Beyond that it answers with what it found, which may be fewer than you asked for, or nothing: an empty list with a success status. “Nearest” therefore means the nearest the data holds, which in a sparse area can be kilometres away; deciding what counts as near enough is yours, and the distance is there so you can.
Categories
The category you send is normalised — case and accents folded, underscores and other punctuation turned into spaces — and compared with each place’s own category. A place matches when its category equals yours or contains it as one word: restaurant matches both restaurant and mexican_restaurant, and shop matches coffee_shop. A category of several words must match a whole category, so coffee shop does not match specialty_coffee_shop.
The vocabulary is the place source’s, written in snake_case, and the reliable way to learn it is to look at the categories real answers carry in hierarchy.category. A category no place has is not an error; it returns an empty list, so an empty answer after a hand-typed category is worth checking for spelling before concluding the area has none. The filter is applied as the neighbourhood is walked, so a narrow category does not make a request slower.
Open at a moment
open_at=now, or a unix time, keeps only places whose opening hours say they are open at that instant. The instant is converted into a local weekday and minute using the time zone at the point you asked about — see the time zone API for where zones come from — and tested against that day’s hours. Two things must be loaded for the filter to mean anything:
- A time-zone layer covering the point. Without one, the request is refused with a
400saying thatopen_atneeds a zone. A point on open sea gets the same answer. - An attributes feed with hours for the places there. A place no feed knows is dropped. With no attributes feed loaded at all, nothing is ever open, and the answer is an empty list.
The hours filter runs over a fixed multiple of your limit of the nearest places and keeps the open ones; it does not go further out looking for more. If few places near the point have hours, a request can come back short while an open place sits a little further away. Hours that run past midnight are also approximated in the small hours when a place’s schedule changes from day to day. When completeness matters more than the filter, ask without open_at, with a larger limit, and read the hours yourself.
A place with no hours reads as closed
Ratings, reviews, price levels, photos and opening hours are not part of open place data. They come from an attributes feed, joined to each place by where it is and what it is called, and returned in an attributes object with its own provenance, separate from the place’s. Where no feed knows a place, attributes is null rather than guessed.
Hours are encoded as seven pairs of opening and closing minutes, Monday first, and the encoding has no way to say “unknown”: a closed day is written the same way as a day the feed says nothing about. The Wikidata-derived feed shows why this matters. It carries photos and little else, so every place it knows arrives with no rating and all seven days marked closed. That does not mean the place is shut; it means the feed has no hours. The filter is safe with this — such a place is never claimed open by open_at, it is only missing from the list — but a page that displays hours must not print “closed” from it.
So before showing hours, check which feed they came from, treat them as known only when at least one day says something other than closed, and say where they came from. Joining by name and position also has an edge: two differently named things are never confused, but a feed row with the same name a few metres away can attach one place’s photo to its neighbour.
Where the data comes from, and how big it is
Places are built from open releases, chiefly Overture Maps, whose places theme is licensed CDLA-Permissive-2.0; a permissively licensed places dataset can also be conflated in at build time. There is no share-alike, so place results may be kept in your own database, as the licensing page sets out. Wikidata attributes are CC0; images under their Commons licences.
It is worth being direct about size. Google describes its Places data as covering over 250 million points of interest. (Google Maps Platform, read 24 Sep 2026) The open places layer is smaller, and named points of interest are where open data is thinnest: a search for a particular local business will sometimes find nothing where a large commercial database has a record. For a search product whose whole value is finding named local businesses, that difference can decide it; the comparison with Google Maps sets out where each is the better choice. The released store holds ⟦pending:coverage.places.count⟧ places. For nearby search in a product where the places are your own — stores, depots, clinics — the question does not arise, and the store locator use case shows that pattern.
What it costs
Nearby search belongs to the Search product, with autocomplete. The Search plan is $299 a month for 20 requests a second sustained, burst 100 of search, and includes the Address product too; Platform and Scale include both. One request takes one token from the key’s search bucket, whatever the category or open_at, and there is no monthly count of lookups.
Limits worth knowing
- Places only; no addresses in the answer.
- Hours exist only where an attributes feed carries them, and a missing day reads as closed.
- An
open_atsearch can return fewer places than asked while an open one sits just beyond the searched set. - Category names follow the place source’s vocabulary; a misspelt category returns nothing rather than an error.
- The open places layer is smaller than the largest commercial databases, and named local businesses are where that shows first.
Bottom line
Use nearby search to list the places around a point by kind, and to filter by opening time where hours are known. Read distance_m before calling something near, read the attributes’ provenance before showing hours, and never display “closed” from a feed that does not carry hours at all.
Questions
How do I find places near a location with an API?
Send the coordinate as at, latitude first, to GET /v1/nearby, with a category such as restaurant or pharmacy if you want one kind. The answer lists the nearest places the data holds, nearest first, each with its distance in metres. Add open_at=now or a unix time to keep only places whose known hours say they are open then.
Why does a place show as closed when it is open?
Usually because no feed has its hours. Opening hours are stored as seven daily pairs, and a closed day and an unknown day are written the same way, so a feed that carries photos but no hours reads as closed all week. Such a place is never returned by an open_at search. Treat hours as known only when at least one day says something other than closed.
Is oslew’s places data as large as Google’s?
No. Google describes its Places data as covering over 250 million points of interest. (Google Maps Platform, read 24 Sep 2026) oslew’s places come from open releases, chiefly Overture Maps, and the open layer is smaller. For named points of interest a large commercial database will find names oslew does not have. The compare page sets out where each side is stronger.
Can I store places results?
Yes. Places carry CDLA-Permissive-2.0, a permissive licence with no share-alike, so they can sit in your own database. Place attributes from Wikidata are CC0, while each photo is under its own Wikimedia Commons licence, stated on its Commons page. Every record carries its licence code, so store it beside the row.