How to build a store locator with free location data

A "store locator" or "near me" feature has two halves: the map (drawing pins) and the data (where the pins go). The map is easy — the hard part is usually getting clean, structured location data without paying for an API or scraping a site that forbids it. This guide covers the data half, using free OpenStreetMap data.

The data a locator needs

For each location you want to show, you need:

Every one of those fields comes straight from OpenStreetMap, where the community has mapped it (and comes back blank, never guessed, where they haven't).

Step 1 — get the locations (no API key)

Pull the places for your area and category in one call. Two ways:

Example: every pharmacy in a city, or every store of one brand via a name filter.

{"area":"Denver, CO","categories":["supermarket"]}

Get your locations on Apify →

Step 2 — put the pins on a map

Each row already has latitude and longitude, so plotting is the easy part: iterate your locations and add a marker at each coordinate, using the name, full_address and opening_hours in the popup. Any map library works — and if you want to stay fully open, an OpenStreetMap-based map renderer pairs naturally with OpenStreetMap data.

Step 3 — "near me" / radius search

Because every location has real coordinates, distance sorting is straightforward: take the user's position and rank locations by distance to it. If you'd rather not pull a whole city, the API also accepts lat, lon and radius, so you can fetch just the locations near a point on demand.

Why this beats a paid Maps API for the data

Paid place APIs require a key, meter your usage, and restrict how long you may store or how you may display their data. OpenStreetMap data is open under the ODbL: no key, no quota, and you can store and redistribute it as long as you attribute © OpenStreetMap contributors. For the data behind a locator, that's cleaner and cheaper.

FAQ

Do I need a Google Maps API key to build a store locator?

Not for the data. You can pull the locations (name, coordinates, address, hours) from OpenStreetMap with no key. You only need a map provider to draw the map — and there are free, open options there too.

What data does a store locator actually need?

At minimum a name and latitude/longitude per location; ideally also a clean address, opening hours, phone and website. All of those come straight from OpenStreetMap where mapped.

Can I use this commercially?

Yes, with attribution to © OpenStreetMap contributors (ODbL). Keep the attribution visible, as map and data projects normally do.