# OpenStreetMap Places Scraper (`properscraper/openstreetmap-places-scraper`) Actor

Find local businesses and places from OpenStreetMap by type and area: name, address, coordinates, phone, website, email and opening hours. Search a town, a district or a radius around a point.

- **URL**: https://apify.com/properscraper/openstreetmap-places-scraper.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** Lead generation, Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 place saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## OpenStreetMap Places Scraper

Find local businesses and places by type and area, from OpenStreetMap. For each place you get its name, category, address, coordinates and, where the map has them, phone number, website, email and opening hours.

OpenStreetMap is the free, community-built map of the world, with tens of millions of shops, restaurants, hotels, surgeries and other places. This Actor reads it through OpenStreetMap's public query service. No login and no API key are needed.

Use it to:

- build a list of local businesses of a given type in a town or district
- find places for a store locator, a directory or a travel guide
- study how many of something there are in an area, and where
- enrich your own data with coordinates, opening hours and websites

### Input

| Field | What it does |
|---|---|
| **Locations** | One per line: a place name (`Soho, London`) or a point (`51.5136, -0.1365`). |
| **Types of place** | Everyday words (`cafe`, `dentist`, `hotel`, `bakery`) or exact OpenStreetMap tags (`shop=bakery`, `shop=*`). |
| **Maximum places per location** | Stop after this many places for each location. Default 500. |
| **Radius** | How far to search around a point, in km. Default 2. |
| **Only places with contact details** | Only places with a phone number, website or email. |
| **Include places without a name** | Also return unnamed places. |
| **Include all map tags** | Add every OpenStreetMap tag of each place. |

```json
{
    "locations": ["Soho, London", "51.4545, -2.5879"],
    "categories": ["cafe", "restaurant", "shop=bakery"],
    "radiusKm": 3,
    "onlyWithContact": true
}
```

A place name that has an outline on the map, such as a town, district or county, is searched inside its outline. A point, an address or a small village is searched within the radius.

### Output

One record per place:

```json
{
    "location": "Soho, London",
    "name": "Bar Italia",
    "category": "amenity=cafe",
    "lat": 51.5134,
    "lon": -0.1313,
    "address": "22 Frith Street, London, W1D 4RF",
    "street": "Frith Street",
    "houseNumber": "22",
    "city": "London",
    "postcode": "W1D 4RF",
    "country": "GB",
    "phone": "+44 20 7437 4520",
    "website": "https://www.baritaliasoho.co.uk/",
    "email": null,
    "openingHours": "Mo-Su 07:00-05:00",
    "cuisine": ["coffee_shop", "italian"],
    "brand": null,
    "operator": null,
    "wheelchair": "limited",
    "facebook": null,
    "instagram": null,
    "osmType": "node",
    "osmId": 348871686,
    "osmUrl": "https://www.openstreetmap.org/node/348871686",
    "scrapedAt": "2026-11-12T09:00:00.000Z"
}
```

- `location` is the line of input the place was found under.
- `category` is the OpenStreetMap tag that says what the place is.
- `openingHours` uses OpenStreetMap's own notation.
- `osmUrl` opens the place on openstreetmap.org, where you can see and correct its details.
- `tags` is added with **Include all map tags**.

A `SUMMARY` record in the run's key-value store lists, for each location, the area that was searched, how many places were saved and any error.

### Pricing

Pay per result. You are charged once for each place saved to the dataset, at the per-result price shown on this page.

Locations that cannot be found or searched cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- **Coverage depends on the map.** OpenStreetMap is edited by volunteers. Names, categories and coordinates are widely filled in; phone numbers, websites and opening hours are present for some places and missing for many. Coverage is best in Europe and in cities. There are no ratings or reviews.
- Very large areas, such as a whole country or a big city with many categories, can be too much for one search. Use districts, or a radius around a point. The summary says when an area was too large.
- The query service is a free community service with limited capacity. The Actor makes one search at a time and waits when asked to. At busy times a location can fail with a "busy" message; run it again later.
- A place name is matched to the best result for that name. Add the region or country (`Springfield, Illinois`) to avoid the wrong one. The summary shows which area was searched.

### Data licence

The data is © OpenStreetMap contributors and is available under the [Open Database Licence](https://www.openstreetmap.org/copyright). If you publish it or something built on it, you must credit OpenStreetMap and its contributors.

### Is this allowed?

The Actor uses the Overpass API and the Photon geocoder, public services provided for programs to query OpenStreetMap data, and stays within their usage guidelines. Business contact details in the data are those published on the map. You are responsible for how you use the data, including the licence above and any marketing rules that apply to you.

# Actor input Schema

## `locations` (type: `array`):

One per line. A place name such as "Soho, London" or "Austin, Texas" (a district or town works best), or a point as "latitude, longitude" such as "51.5136, -0.1365".

## `categories` (type: `array`):

One per line. An everyday word such as restaurant, cafe, dentist, hotel, bakery, gym or supermarket, or an exact OpenStreetMap tag such as shop=bakery (shop=\* means every shop).

## `maxPlacesPerLocation` (type: `integer`):

Stop after this many places for each location.

## `radiusKm` (type: `integer`):

How far to search around a point. Used for coordinates, addresses and villages that are only a point on the map. Towns and districts with an outline are searched inside their outline instead.

## `onlyWithContact` (type: `boolean`):

Only return places that list a phone number, a website or an email address.

## `includeUnnamed` (type: `boolean`):

Also return places nobody has named on the map. Usually these are not businesses.

## `includeAllTags` (type: `boolean`):

Add every OpenStreetMap tag of each place in a "tags" field, for details such as payment methods, outdoor seating or internet access.

## Actor input object example

```json
{
  "locations": [
    "Soho, London"
  ],
  "categories": [
    "cafe",
    "restaurant"
  ],
  "maxPlacesPerLocation": 500,
  "radiusKm": 2,
  "onlyWithContact": false,
  "includeUnnamed": false,
  "includeAllTags": false
}
```

# Actor output Schema

## `places` (type: `string`):

Every place saved by the run, one record per place.

## `summary` (type: `string`):

Totals for the run and, for each location, how many results were saved and any error.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "Soho, London"
    ],
    "categories": [
        "cafe",
        "restaurant"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/openstreetmap-places-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "locations": ["Soho, London"],
    "categories": [
        "cafe",
        "restaurant",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("properscraper/openstreetmap-places-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "Soho, London"
  ],
  "categories": [
    "cafe",
    "restaurant"
  ]
}' |
apify call properscraper/openstreetmap-places-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/openstreetmap-places-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FdS8AyryqtEa60WXo/builds/r1BREAYSQ4ejEHQgZ/openapi.json
