PlacesPOIAmenityOpening hoursGeoJSON

Places API: Nearby Cafes, Restaurants, Pharmacies, and Opening Hours

Search nearby cafes, restaurants, pharmacies, ATMs, EV chargers, schools, and hospitals on OSM tags. Opening hours, nearest-first rank, and a live playground.

Try it nowJoel Sten · Sep 2, 2026Places API: Nearby Cafes, Restaurants, Pharmacies, and Opening Hours

Most local-search apps need the same three answers: what is around this point, is it open, and how far is it. MapLark now has dedicated endpoints for that. They sit on the same planet-scale OSM database as /v2/osm_features, but they are shaped for places: tagged points of interest, opening hours, and nearest-first ranking.

You keep OSM tags. Query cafes, restaurants, pharmacies, ATMs, EV charging stations, schools, hospitals, banks, fuel stations, toilets, and the rest of the amenity key with the same amenity=cafe strings mappers already use. You do not adopt a proprietary category tree.

How places differ from the Features API

GET /v2/osm_features is the generic layer: buildings, roads, park polygons, any tag and geometry shape. Places is the POI layer on top of that data.

  • Always points plus polygon POIs. Polygon venues come back as a Point at the centroid.
  • Every hit includes properties.openingHours (open, closed, or unknown).
  • No client-facing cursor. Raise limit if you need a larger page.
  • openNow=true keeps only places known open. Missing or unparseable hours are dropped, same as Google Places.

POST /v1/places/search takes a bounding box or a location plus radius. POST /v1/places/nearby requires tags and ranks by straight-line spheroid distance. Nearby is not a walking route.

The densest POI key in OpenStreetMap is amenity. The list below is the 100 most common amenity=* values from Taginfo (counts current as of Aug 31, 2026). Send any of them as tags on search or nearby, for example ["amenity=school"] or ["amenity=hospital"]. Combine several with orTags when you want cafes, restaurants, and fast food in one call.

Search results are available
  • Parkingamenity=parking6,832,162
  • Parking spaceamenity=parking_space4,967,532
  • Benchamenity=bench3,378,328
  • Place of worshipamenity=place_of_worship1,618,000
  • Restaurantamenity=restaurant1,613,278
  • Schoolamenity=school1,444,857
  • Waste basketamenity=waste_basket1,237,631
  • Bicycle parkingamenity=bicycle_parking931,878
  • Shelteramenity=shelter681,881
  • Fast foodamenity=fast_food661,199
  • Cafeamenity=cafe647,179
  • Recyclingamenity=recycling583,209
  • Fuelamenity=fuel567,357
  • Toiletsamenity=toilets519,626
  • Pharmacyamenity=pharmacy439,400
  • Bankamenity=bank411,842
  • Post boxamenity=post_box411,623
  • Drinking wateramenity=drinking_water365,973
  • Vending machineamenity=vending_machine365,497
  • Kindergartenamenity=kindergarten338,911
  • Waste disposalamenity=waste_disposal316,086
  • Hunting standamenity=hunting_stand307,825
  • Parking entranceamenity=parking_entrance280,747
  • Baramenity=bar243,496
  • Atmamenity=atm242,891
  • Community centreamenity=community_centre219,739
  • Clinicamenity=clinic219,297
  • Post officeamenity=post_office217,723
  • Hospitalamenity=hospital217,185
  • Doctorsamenity=doctors207,601
  • Charging stationamenity=charging_station201,732
  • Fountainamenity=fountain201,428
  • Pubamenity=pub199,343
  • Social facilityamenity=social_facility179,112
  • Townhallamenity=townhall177,538
  • Policeamenity=police162,380
  • Grave yardamenity=grave_yard159,775
  • Dentistamenity=dentist159,533
  • Fire stationamenity=fire_station148,133
  • Car washamenity=car_wash125,059
  • Libraryamenity=library112,947
  • Parcel lockeramenity=parcel_locker99,267
  • Marketplaceamenity=marketplace98,339
  • Bicycle rentalamenity=bicycle_rental94,192
  • Childcareamenity=childcare76,263
  • Telephoneamenity=telephone75,148
  • Collegeamenity=college71,618
  • Bus stationamenity=bus_station67,889
  • Ice creamamenity=ice_cream66,259
  • Veterinaryamenity=veterinary65,089
  • Universityamenity=university57,885
  • Theatreamenity=theatre53,204
  • Taxiamenity=taxi51,894
  • Public bookcaseamenity=public_bookcase47,072
  • Motorcycle parkingamenity=motorcycle_parking46,955
  • Bbqamenity=bbq46,849
  • Letter boxamenity=letter_box46,240
  • Water pointamenity=water_point42,688
  • Grit binamenity=grit_bin40,751
  • Loading dockamenity=loading_dock40,384
  • Ferry terminalamenity=ferry_terminal37,286
  • Showeramenity=shower37,082
  • Events venueamenity=events_venue35,977
  • Clockamenity=clock35,440
  • Driving schoolamenity=driving_school35,382
  • Public buildingamenity=public_building33,833
  • Car rentalamenity=car_rental32,710
  • Courthouseamenity=courthouse32,020
  • Cinemaamenity=cinema31,557
  • Watering placeamenity=watering_place29,929
  • Arts centreamenity=arts_centre28,477
  • Trolley bayamenity=trolley_bay26,189
  • Nightclubamenity=nightclub24,275
  • Bicycle repair stationamenity=bicycle_repair_station23,288
  • Bureau de changeamenity=bureau_de_change21,001
  • Studioamenity=studio17,959
  • Loungeramenity=lounger17,765
  • Food courtamenity=food_court17,431
  • Monasteryamenity=monastery16,178
  • Prisonamenity=prison15,510
  • Internet cafeamenity=internet_cafe15,484
  • Social centreamenity=social_centre15,078
  • Ticket validatoramenity=ticket_validator14,863
  • Payment terminalamenity=payment_terminal13,741
  • Music schoolamenity=music_school13,679
  • Vehicle inspectionamenity=vehicle_inspection13,540
  • Compressed airamenity=compressed_air13,314
  • Animal breedingamenity=animal_breeding13,237
  • Public bathamenity=public_bath13,055
  • Prep schoolamenity=prep_school12,794
  • Car sharingamenity=car_sharing12,406
  • Weighbridgeamenity=weighbridge12,309
  • Lavoiramenity=lavoir12,220
  • Nursing homeamenity=nursing_home12,097
  • Sanitary dump stationamenity=sanitary_dump_station11,348
  • Mobile money agentamenity=mobile_money_agent11,140
  • Language schoolamenity=language_school10,531
  • Biergartenamenity=biergarten10,375
  • Dojoamenity=dojo9,558
  • Vacuum cleaneramenity=vacuum_cleaner9,134
No selected item

Food and drink: restaurants, cafes, fast food, bars, pubs, and ice cream. Health: pharmacies, hospitals, clinics, doctors, dentists, and veterinary. Money and post: ATMs, banks, post boxes, and post offices. Transport: parking, fuel, charging stations, bicycle parking, bicycle rental, and bus stations. Education and civic: schools, kindergartens, libraries, town halls, police, and fire stations. Everyday map features: benches, toilets, drinking water, recycling, and waste baskets.

Places is not limited to amenity. Hotels are tourism=hotel. Transit stops are often highway=bus_stop or railway=station. Shops use values such as shop=supermarket and shop=convenience. Load hotels, transit stops, toilets, drinking water, or bike parking in the playground.

Nearby cafes and restaurants

A cafe finder is one call. Filter with OSM tags you already know, pin a location, and read names and hours from the FeatureCollection. The same pattern covers restaurants and fast food: amenity=restaurant, amenity=fast_food, or all three via orTags.

Python TypeScript
import os
from osmfeatures import OSMFeaturesClient

client = OSMFeaturesClient(
    api_key=os.environ["MAPLARK_API_KEY"],
    base_url=os.environ.get("MAPLARK_BASE_URL", "https://api.maplark.com"),
)
cafes = client.places_search(
    location={"lat": 59.316, "lng": 18.075},
    radius=800,
    or_tags=["amenity=cafe"],
    open_now=True,
)
print(cafes)

Source: Python · TypeScript

Try cafes in the playground or load restaurants.

Places open now

Set openNow=true when you only want known-open hits. Optional asOf pins the evaluation instant. A naive timestamp (no offset) is that clock at the search location. Hours use each place's IANA timezone from its coordinates.

OSM coverage of opening_hours varies by city. If a bar has no hours tag, openNow will not return it. That is the filter, not a missing result. See bars open now. The same filter applies to restaurants, pharmacies, and other amenities that mappers tag with hours.

Pharmacy, ATM, hospital, and store locator

Nearby is the store-locator primitive: one tagged set, ranked from a point, each item carrying distance_m. Pharmacies, ATMs, hospitals, clinics, banks, and similar amenities map cleanly onto OSM tags.

Python TypeScript
import os
from osmfeatures import OSMFeaturesClient

client = OSMFeaturesClient(
    api_key=os.environ["MAPLARK_API_KEY"],
    base_url=os.environ.get("MAPLARK_BASE_URL", "https://api.maplark.com"),
)
nearby = client.places_nearby(
    location={"lat": 59.316, "lng": 18.075},
    or_tags=["amenity=pharmacy"],
    radius=1000,
    limit=5,
)
print(nearby)

Source: Python · TypeScript

Pharmacies and ATMs are presets on the same page.

EV charging stations

amenity=charging_station is a first-class POI query. Use search for a viewport, or nearby to rank chargers from the vehicle's current point. Fuel stations (amenity=fuel) use the same call shape. Load EV charging in the playground.

Draw results on a free basemap

Places is not a tile API. Search returns a GeoJSON FeatureCollection of points. Overlay that on a free OpenFreeMap style with MapLibre GL JS. Leaflet plus the same GeoJSON works too. You do not need Mapbox, MapTiler, or Google tiles. Polygon venues already come back as a Point at the centroid, so every hit is a pin.

Install MapLibre (npm install maplibre-gl) and add a sized <div id="map"> to the page. Fetch search, then addSource plus a circle addLayer. Nearby is the same overlay after you unwrap items into a FeatureCollection.

Search Nearby
import maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';

const map = new maplibregl.Map({
  container: 'map',
  style: 'https://tiles.openfreemap.org/styles/bright',
  center: [18.06, 59.33],
  zoom: 14,
});

map.on('load', async () => {
  const res = await fetch('https://api.maplark.com/v1/places/search', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer <your-api-key>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      bbox: '18.05,59.32,18.10,59.34',
      tags: ['amenity=cafe'],
      openNow: true,
      limit: 100,
    }),
  });
  if (!res.ok) throw new Error(await res.text());
  const geojson = await res.json();

  map.addSource('places', { type: 'geojson', data: geojson });
  map.addLayer({
    id: 'places',
    type: 'circle',
    source: 'places',
    paint: {
      'circle-color': '#2d6a4f',
      'circle-radius': 6,
      'circle-stroke-color': '#ffffff',
      'circle-stroke-width': 1.5,
    },
  });
});

OpenFreeMap also publishes Positron, Dark Matter, and Fiord. Swap the style URL; the overlay stays the same. The demo key is shared and free-tier rate limited. If you get a 429, sign up for your own key. See it running on the Places playground.

A Google Maps alternative

Google Maps can be very expensive. MapLark is a privacy first, low-cost alternative that uses OpenStreetMap data with generious free tier. All we ask for really is compensation for the complex data hosting infrastructure. The Places API matches the Google Places endpoints in shape and purpose.

MapLark is GDPR compliant. Results come from OpenStreetMap, not a proprietary place graph or end-user profiles. We do not sell personal data. Account records are limited to name, email, and usage statistics. See the privacy policy.

Walk and bike routing is a sibling API (/v1/routes/isochrone, /v1/routes/path, /v1/routes/optimized_path), documented in the Geo Agent OpenAPI tag. It is not on the Places playground.

Try it on a map

Run search and nearby against live OSM places, then grab a free API key.

Try it live Get your API key