# OpenStreetMap POI Scraper: Local Business Leads via Overpass (`datafeedlab/osm-places`) Actor

OpenStreetMap POI scraper and places extractor using the official Overpass API: name, address, phone, website and hours. A ToS-safe Google Maps alternative for local business leads.

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

## Pricing

$0.50 / 1,000 places

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 POI Scraper: Local Business Leads via Overpass

**An OpenStreetMap POI scraper that finds local businesses and points of interest without scraping Google Maps.** This Actor queries **OpenStreetMap** through the official **Overpass API** and returns names, categories, coordinates, addresses, public phone numbers, websites, opening hours, cuisine, brand and more.

It is a ToS-safe alternative to Google Maps scrapers (Google's terms forbid automated access to Maps). You provide **coordinates or a bounding box** — this Actor does **not** call the public Nominatim geocoder, which [forbids resale via Apify](https://operations.osmfoundation.org/policies/nominatim/).

💸 **$0.50 per 1,000 places. No start fee.** Filtered-out and duplicate places are free.

Compare with typical Google Maps Actors at **$4 per 1,000 places** (Free-tier list price of the Store leader).

### Why use it?

| | This Actor | Typical Google Maps scrapers |
|---|---|---|
| Price | **$0.50 / 1,000 places** | ~$4 / 1,000 (Free tier), plus extras |
| Legal basis | Official Overpass API + ODbL | Often against Google Maps ToS |
| API key | **None** | sometimes proxies required |
| Fields | name, category, address, phone, website, hours, cuisine, brand, Wikidata | ratings & reviews (Google-only) |
| Attribution | Every row includes `© OpenStreetMap contributors` | — |

OpenStreetMap does **not** include Google ratings or Google review text. It does include structured, worldwide POI data that you can use for lead lists, store locators and market maps.

### Use cases

- **Local lead generation** — restaurants, clinics, shops or hotels in a catchment area, with phone and website when mapped.
- **Store locators and territory design** — export coordinates and addresses for a city district.
- **Market research** — count amenities (pharmacies, gyms, cafes) in a bounding box.
- **Enrichment** — attach OSM categories and opening hours to an existing list of coordinates.

### How to use

1. Paste **areas as coordinates**, one per line:
   - `lat,lon` — uses the default radius
   - `lat,lon,radiusMeters` — e.g. `40.7580,-73.9855,400`
   - bounding box `south,west,north,east` — e.g. `40.750,-73.995,40.765,-73.975`
2. Choose categories (`cafe`, `restaurant`, `hotel`, `pharmacy`, …) or raw OSM tags (`shop=bakery`).
3. Optional: keep only places with a phone or website, or filter by name.
4. Run and export the **Places** table to CSV, Excel, JSON or Google Sheets.

To turn a city name into coordinates, use any geocoder **you** are licensed to use (your own Nominatim, a commercial geocoder, or a one-off lookup), then paste the numbers here.

#### Example input

```json
{
  "areas": ["40.7580,-73.9855,400"],
  "categories": ["cafe", "restaurant"],
  "maxPlaces": 100
}
```

#### Example output

```json
{
  "osmType": "node",
  "osmId": 123456789,
  "name": "Example Cafe",
  "category": "cafe",
  "lat": 40.7584,
  "lon": -73.9857,
  "address": "123 Example St, New York",
  "phone": "+1 212 555 0100",
  "website": "https://example.com",
  "openingHours": "Mo-Fr 07:00-19:00",
  "osmUrl": "https://www.openstreetmap.org/node/123456789",
  "license": "ODbL-1.0",
  "attribution": "© OpenStreetMap contributors"
}
```

### Categories

Presets: `restaurant`, `fast_food`, `cafe`, `bar`, `hotel`, `shop`, `supermarket`, `convenience`, `bakery`, `pharmacy`, `hospital`, `clinic`, `doctors`, `bank`, `atm`, `fuel`, `parking`, `school`, `gym`, `beauty`, `hairdresser`, `office`, `tourism`.

Leave the list empty to search a broad **business** set (food, shops, offices, hotels, healthcare). You can also pass raw OSM filters such as `amenity=library` or `tourism=museum`.

### Fair use and limits

- Public Overpass servers ask for about **10,000 requests and 1 GB per day** as a one-off ceiling, and much less for regular automated use. This Actor sends **one query per area**, sequentially, and caps radius (25 km) and bounding-box size (~25 km × 25 km) and results (15,000).
- For heavy or scheduled jobs, set **Overpass API URL** to **your own Overpass instance**.
- Public Nominatim (`nominatim.openstreetmap.org`) is **not used**.

### License (required)

OpenStreetMap data is © OpenStreetMap contributors, available under the [Open Data Commons Open Database License (ODbL)](https://www.openstreetmap.org/copyright). If you publish a dataset or a map derived from this Actor, you must **attribute OSM** and share alike any derivative database under ODbL. Every output row includes `license` and `attribution` fields to make this straightforward.

### Pricing

**$0.50 per 1,000 places** saved to the dataset. No start fee. Duplicates and places removed by your filters are not charged. Failed areas are listed in the run summary and are free.

### More Actors by DataFeed Lab

ToS-compliant data Actors for growth, product and research teams. All are callable from the Apify API, integrations, or [Apify's MCP server](https://mcp.apify.com) for AI agents.

- [Greenhouse Jobs Scraper](https://apify.com/datafeedlab/ats-jobs-scraper) — Official Greenhouse, Lever, Ashby, Workable, SmartRecruiters and Recruitee job APIs, with salary, remote flag and a new-jobs monitor. $1 per 1,000 jobs.
- [WHOIS Lookup](https://apify.com/datafeedlab/bulk-domain-intel) — Bulk WHOIS/RDAP domain age and expiry, DNS, SPF/DMARC and SSL checker. $1 per 1,000 domains.
- [Contact Details Scraper](https://apify.com/datafeedlab/contact-details-scraper) — Company emails, phones, social profiles, contact forms and tech stack (no personal emails). $2 per 1,000 sites with contacts.
- [Shopify Scraper](https://apify.com/datafeedlab/shopify-products-scraper) — Products, prices, variants, stock and sales, with a price/stock monitor. $0.70 per 1,000 products.
- [Tech Stack Detector](https://apify.com/datafeedlab/tech-stack-detector) — BuiltWith alternative: CMS, Shopify, analytics, pixels and hosting. $1 per 1,000 sites.
- [App Store Reviews Scraper](https://apify.com/datafeedlab/app-store-reviews) — Official Apple iOS reviews and metadata. $0.08 per 1,000 rows.
- [Hacker News Scraper](https://apify.com/datafeedlab/hacker-news-scraper) — Stories, search, Ask HN and parsed Who is Hiring jobs. $0.10 per 1,000 items.
- [Website to Markdown Crawler](https://apify.com/datafeedlab/website-markdown-crawler) — HTML to Markdown for AI and RAG, robots.txt respected. $1 per 1,000 pages.

# Actor input Schema

## `areas` (type: `array`):

One per line, coordinates only (this Actor does not geocode place names — the public Nominatim server forbids resale via Apify). Use `lat,lon` (with the radius below), `lat,lon,radiusMeters`, or a bounding box `south,west,north,east`. Example: `40.7580,-73.9855` or `40.750,-73.995,40.765,-73.975`.

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

Presets or raw OSM tags, one per line. Presets: `restaurant`, `cafe`, `bar`, `hotel`, `shop`, `supermarket`, `convenience`, `pharmacy`, `hospital`, `clinic`, `bank`, `atm`, `fuel`, `parking`, `school`, `gym`, `beauty`, `hairdresser`, `office`, `tourism`, `fast_food`, `bakery`, `pharmacy`, `doctors`. Raw tags: `amenity=cafe`, `shop=bakery`, `tourism=museum`. Leave empty to return common business POIs (amenity/shop/tourism/office/healthcare).

## `radiusMeters` (type: `integer`):

Used when an area line is just `lat,lon`. Capped at 25 km per query to stay within Overpass fair use.

## `nameContains` (type: `string`):

Optional case-insensitive substring filter on the place name. Filtered places are free.

## `requirePhone` (type: `boolean`):

Only places with a phone number

## `requireWebsite` (type: `boolean`):

Only places with a website

## `maxPlaces` (type: `integer`):

Hard cap for the run (default 500, max 15,000). Large extracts should use your own Overpass instance.

## `includeRawTags` (type: `boolean`):

Add a `tags` object with every OSM tag. Off by default to keep rows compact.

## `overpassUrl` (type: `string`):

Optional. Defaults to the public overpass-api.de endpoint, with automatic fallbacks. Heavy or scheduled use should point this at **your own Overpass instance**. See the Overpass fair-use guideline in the README.

## Actor input object example

```json
{
  "areas": [
    "40.7580,-73.9855,400"
  ],
  "categories": [
    "cafe",
    "restaurant"
  ],
  "radiusMeters": 500,
  "requirePhone": false,
  "requireWebsite": false,
  "maxPlaces": 500,
  "includeRawTags": false
}
```

# Actor output Schema

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

Places and POIs ('Places' view).

## `runSummary` (type: `string`):

Counts and errors (free).

# 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 = {
    "areas": [
        "40.7580,-73.9855,400"
    ],
    "categories": [
        "cafe",
        "restaurant"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datafeedlab/osm-places").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 = {
    "areas": ["40.7580,-73.9855,400"],
    "categories": [
        "cafe",
        "restaurant",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("datafeedlab/osm-places").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 '{
  "areas": [
    "40.7580,-73.9855,400"
  ],
  "categories": [
    "cafe",
    "restaurant"
  ]
}' |
apify call datafeedlab/osm-places --silent --output-dataset

```

## MCP server setup

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

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/rigphEy96DnWraKhH/builds/50se9cKqfSxKLCBUL/openapi.json
