# OSM POI Scraper — Leads by Category & Area (`devilscrapes/osm-overpass-poi-scraper`) Actor

Extract business POIs — dentists, restaurants, gyms, hotels, car repair shops, pharmacies, EV charging stations, supermarkets and cafes — from OpenStreetMap for any place name or bounding box. Returns name, address, phone, website, email and coordinates as clean dataset rows.

- **URL**: https://apify.com/devilscrapes/osm-overpass-poi-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## OSM POI Scraper — Leads by Category & Area

**💰 $5.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Extract business POIs — dentists, restaurants, gyms, hotels, car repair shops, pharmacies, EV charging stations, supermarkets and cafes — from OpenStreetMap for any place name or bounding box. Returns name, address, phone, website, email and coordinates as clean dataset rows.

</div>

***

> **Quick answer:** The **OSM POI Scraper** pulls business points of interest — dentists, restaurants, gyms, hotels, car repair shops, pharmacies, EV charging stations, supermarkets and cafés — out of OpenStreetMap for any place name or bounding box, returning name, street address, phone, website, email, opening hours and coordinates as flat rows in JSON, CSV or Excel. It uses two keyless public endpoints (Overpass for the query, Nominatim to turn a place name into a bounding box), paces itself to at least one second between requests to stay inside Overpass's shared fair-use budget, and covers nodes, ways and relations via `out center` so building-outline POIs aren't silently missing. Pricing is pay-per-result — **$5.20 per 1 000 POIs**, no subscription, no card required to try it.

### 🎯 What this scrapes

Point this Actor at a place name or a bounding box, pick a business category, and get a flat lead list pulled straight from OpenStreetMap's Overpass API — name, street address, phone, website, email, opening hours and coordinates for every matching dentist, restaurant, gym, hotel, car repair shop, pharmacy, EV charging station, supermarket or café in the area. No API key, no map-tile scraping — just the business records local lead-gen agencies, franchise-siting analysts and field-sales teams actually need.

### 🔥 What we handle for you

- 🌐 **Two verified public endpoints** — Overpass API for the POI query, Nominatim for place-name-to-bbox resolution — both keyless, no account or API key to manage.
- 🔁 **Retries with exponential backoff** on `429` (rate-limited) and `504` (query timeout) — up to 5 attempts, `Retry-After` honoured, other 4xx failures reported immediately instead of retried blind.
- 🧱 **Self-throttled pacing** — at least 1 second between outbound requests, so we stay inside Overpass's shared fair-use budget instead of getting rate-limited in the first place.
- 🏷️ **Category-aware tag mapping** — plain-English categories (`dentist`, `gym`, `car_repair`, ...) translate to the right OSM tag combinations, including the ones a naive query would miss.
- 🧊 **Node, way and relation coverage** — building-outline POIs (not just point nodes) are included via `out center`, so results aren't silently missing half the map.
- 💰 **Pay-Per-Event pricing** — you only pay for results that land in your dataset. No data, no charge beyond the small warm-up fee.

### 💡 Use cases

- Local lead generation — pull every business of a category in a city or neighborhood as a ready-to-dial list.
- Franchise siting — map competitor and complementary-business density before picking a new location.
- Field-sales territory planning — export addresses and coordinates for route mapping.
- Market research — count and profile businesses by category across regions without a maps API key.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `placeName` | `string` | no | 'Helsinki, Finland' | Named area resolved to a bounding box via Nominatim, e.g. "Helsinki, Finland". Used only when `bbox` is not set. |
| `bbox` | `array` | no | \[60.15, 24.9, 60.2, 24.98] | Explicit bounding box as \[south, west, north, east]. Takes precedence over Place name when both are set. |
| `category` | `string` | no | 'dentist' | Plain-English business category, translated to the matching OpenStreetMap tag filter(s). |
| `maxResults` | `integer` | no | 50 | Server-side cap passed to Overpass as `out N;` — never fetched-then-truncated. Each result is one billed dataset row. |
| `timeoutSeconds` | `integer` | no | 25 | Overpass `[timeout:NN]` setting — how long the Overpass server is allowed to spend building the response. |
| `rawOverpassQuery` | `string` | no | '—' | Advanced escape hatch: full Overpass QL, sent verbatim. Bypasses category/bbox/place translation entirely. Must contain… |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | Overpass and Nominatim are public keyless APIs and do not need a proxy. Leave this off unless your account requires… |

#### Example input

```json
{
  "placeName": "Helsinki, Finland",
  "bbox": [
    60.15,
    24.9,
    60.2,
    24.98
  ],
  "category": "dentist",
  "maxResults": 3,
  "timeoutSeconds": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `name` | `string` | Business name, from `tags.name`. |
| `category` | `string` | Echoed input category, e.g. `dentist`. |
| `street` | `string` | Street name, from `tags["addr:street"]`. |
| `housenumber` | `string` | House/building number, from `tags["addr:housenumber"]`. |
| `city` | `string` | City, from `tags["addr:city"]`. |
| `postcode` | `string` | Postal code, from `tags["addr:postcode"]`. |
| `country` | `string` | Country, from `tags["addr:country"]`. |
| `phone` | `string` | Phone number — `tags.phone`, falls back to `tags["contact:phone"]`. |
| `website` | `string` | Website URL — `tags.website`, falls back to `tags["contact:website"]`. |
| `email` | `string` | Email address — `tags.email`, falls back to `tags["contact:email"]`. |
| `opening_hours` | `string` | Opening hours string, from `tags.opening_hours`. |
| `latitude` | `number` | Latitude — `element.lat`, or `element.center.lat` for ways/relations. |
| `longitude` | `number` | Longitude — `element.lon`, or `element.center.lon` for ways/relations. |
| `osm_id` | `integer` | OpenStreetMap element ID. |
| `osm_type` | `string` | OpenStreetMap element type: `node`, `way` or `relation`. |
| `osm_link` | `string` | Link to the element on openstreetmap.org. |

#### Example output

```json
{
  "name": "Hammaslaakariasema Esplanadi",
  "category": "dentist",
  "street": "Pohjoisesplanadi",
  "housenumber": "31",
  "city": "Helsinki",
  "postcode": "00100",
  "country": null,
  "phone": "+358 9 1234567",
  "website": "https://example-dental.fi",
  "email": null,
  "opening_hours": "Mo-Fr 08:00-18:00",
  "latitude": 60.1682,
  "longitude": 24.9457,
  "osm_id": 123456789,
  "osm_type": "node",
  "osm_link": "https://www.openstreetmap.org/node/123456789"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result` | $0.005 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$5.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Coverage depends entirely on OpenStreetMap's own tagging density in the target area — well-mapped cities return rich results, sparsely-mapped regions return fewer than a proprietary maps API would.
- No reverse-geocoding or address enrichment when `addr:*` tags are missing on the source OSM element — the field comes back `null` rather than guessed.
- The category list is a fixed 9-item enum in v1 (dentist, restaurant, gym, hotel, car\_repair, pharmacy, ev\_charging, supermarket, cafe). The advanced `rawOverpassQuery` field is available for anything outside that list.
- Only bounding-box and place-name area input is supported — no custom polygon shapes.

### ❓ FAQ

**Do I need an API key or OpenStreetMap account?**

No. Both the Overpass API and Nominatim place-name lookup this Actor uses are free, public and keyless.

**Why did I get fewer results than I expected?**

OpenStreetMap coverage varies by region — a category with no matching tags in that bounding box returns zero rows, which is a real answer, not an error. Try a larger bbox or check the category's OSM tag mapping in the README.

**Can I write my own Overpass query?**

Yes — set `rawOverpassQuery` to bypass the place/category/bbox translation entirely and send your own Overpass QL. It must include `out:json`.

**How do I find a bounding box for my area?**

Use `placeName` instead — the Actor resolves it to a bbox via Nominatim automatically — or pull one from a tool like bboxfinder.com and paste it into `bbox` as `[south, west, north, east]`.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

#### 🗺️ Data credit

Every row traces back to **[OpenStreetMap](https://www.openstreetmap.org/copyright)**
contributors, © OpenStreetMap contributors, available under the
**Open Database License (ODbL)**. Place-name lookups use the OSM
**Nominatim** service. We stay well inside both services' fair-use
limits — see "What we handle for you" above.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `placeName` (type: `string`):

Named area resolved to a bounding box via Nominatim, e.g. "Helsinki, Finland". Used only when `bbox` is not set.

## `bbox` (type: `array`):

Explicit bounding box as \[south, west, north, east]. Takes precedence over Place name when both are set.

## `category` (type: `string`):

Plain-English business category, translated to the matching OpenStreetMap tag filter(s).

## `maxResults` (type: `integer`):

Server-side cap passed to Overpass as `out N;` — never fetched-then-truncated. Each result is one billed dataset row.

## `timeoutSeconds` (type: `integer`):

Overpass `[timeout:NN]` setting — how long the Overpass server is allowed to spend building the response.

## `rawOverpassQuery` (type: `string`):

Advanced escape hatch: full Overpass QL, sent verbatim. Bypasses category/bbox/place translation entirely. Must contain `out:json`.

## `proxyConfiguration` (type: `object`):

Overpass and Nominatim are public keyless APIs and do not need a proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "placeName": "Helsinki, Finland",
  "bbox": [
    60.15,
    24.9,
    60.2,
    24.98
  ],
  "category": "dentist",
  "maxResults": 50,
  "timeoutSeconds": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "placeName": "Helsinki, Finland",
    "bbox": [
        60.15,
        24.9,
        60.2,
        24.98
    ],
    "category": "dentist",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/osm-overpass-poi-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 = {
    "placeName": "Helsinki, Finland",
    "bbox": [
        60.15,
        24.9,
        60.2,
        24.98,
    ],
    "category": "dentist",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/osm-overpass-poi-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 '{
  "placeName": "Helsinki, Finland",
  "bbox": [
    60.15,
    24.9,
    60.2,
    24.98
  ],
  "category": "dentist",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/osm-overpass-poi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/osm-overpass-poi-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/OXMsBCDQFAydbVit4/builds/PrUSqCbOCHqMkRTvO/openapi.json
