# OpenStreetMap Business & POI Extractor - Leads with Contacts (`zhucl1006/openstreetmap-business-poi-extractor`) Actor

Extract shops, restaurants, clinics, offices and other businesses from OpenStreetMap for any city or bounding box via Overpass API: name, category, address, phone, email, website, opening hours, coordinates. Open ODbL data, a legal Google Maps alternative.

- **URL**: https://apify.com/zhucl1006/openstreetmap-business-poi-extractor.md
- **Developed by:** [leo zhu](https://apify.com/zhucl1006) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 pois

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 Business & POI Extractor - Local Leads with Contacts

Extract **businesses and points of interest from OpenStreetMap** for any neighbourhood, city or bounding box: restaurants, cafes, dentists, clinics, gyms, salons, car repair shops, lawyers, accountants, hotels, shops and any other OSM category. Get one clean row per place with **name, category, full address, phone, email, website, opening hours, social links and coordinates**. Built on **open data (ODbL)** queried through the public Overpass API - a legal, low-cost alternative to scraping Google Maps.

### Who uses it

- **Local lead generation & agencies**: build lists of dentists in Austin or cafes in Shoreditch with website/phone for outreach (combine with our Website Contact Info Extractor or Email Verifier).
- **Site selection & retail analytics**: count competitors, brands and amenities around a location.
- **Data teams & GIS**: export POIs with coordinates to CSV/GeoJSON pipelines, enrich CRMs, deduplicate addresses.
- **Delivery, mobility & travel apps**: seed place databases with open-licensed data.

### Input

| Field | Description |
|---|---|
| `locations` | Place names, e.g. `Shoreditch, London`, `Austin, Texas`. Geocoded via Nominatim; the place's bounding box is searched. |
| `categories` | Presets (`restaurant`, `cafe`, `dentist`, `doctor`, `gym`, `beauty`, `car_repair`, `lawyer`, `accountant`, `real_estate`, `hotel`, `any_shop`, `any_office` ...) or OSM tags like `shop=bicycle`. |
| `customTags` | Extra OSM tags, e.g. `craft=plumber`, `office=architect`. |
| `boundingBoxes` | Exact areas `south,west,north,east`. |
| `nameContains` | Filter by name (e.g. a brand). |
| `onlyWithContact` | Only places with a website, phone or email. |
| `maxItemsPerLocation` | Default 200. |

```json
{ "locations": ["Austin, Texas"], "categories": ["dentist", "doctor"], "onlyWithContact": true, "maxItemsPerLocation": 1000 }
```

### Output (one row per place)

```json
{
  "name": "La Perla", "category": "amenity=restaurant", "cuisine": "pizza",
  "address": "14 Tweede Tuindwarsstraat, 1015RZ, Amsterdam", "street": "14 Tweede Tuindwarsstraat", "postcode": "1015RZ", "city": "Amsterdam",
  "phone": null, "email": null, "website": "https://pizzaperla.nl", "openingHours": "Mo-Su 17:00-22:00", "wheelchair": "limited",
  "latitude": 52.3770366, "longitude": 4.881768, "osmType": "node", "osmId": 2631200752,
  "osmUrl": "https://www.openstreetmap.org/node/2631200752", "location": "52.37,4.88,52.38,4.90"
}
```

Coverage depends on the OpenStreetMap community: excellent in most of Europe and big cities, thinner elsewhere; not every place has phone/website tags.

### Pricing (pay per event)

- **$0.001 per place saved** (`poi`) - 1,000 places = $1.
- Tiny start fee per run (`apify-actor-start`). Locations that fail (not found / servers busy) are not charged. Set "Maximum cost per run" to cap spend.

### Reliability

Public Overpass servers are shared and sometimes busy. The Actor sends a descriptive User-Agent, retries with exponential backoff and automatically falls back across several public Overpass instances (overpass-api.de, overpass.kumi.systems, maps.mail.ru, private.coffee). Geocoding respects Nominatim's 1 request/second policy. For very large areas (whole countries) split the work into cities or bounding boxes.

### License & attribution (required)

Data © **OpenStreetMap contributors**, available under the **Open Database License (ODbL) 1.0** - https://www.openstreetmap.org/copyright. If you publish or redistribute the data you must credit "© OpenStreetMap contributors" and share derived databases under ODbL. This Actor is not affiliated with the OpenStreetMap Foundation.

# Actor input Schema

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

Neighbourhood, city or region names, e.g. 'Shoreditch, London', 'Austin, Texas', 'Valletta, Malta'. Geocoded with OpenStreetMap Nominatim (the bounding box of the place is searched). Smaller areas are faster.

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

Presets: restaurant, cafe, bar, fast_food, hotel, dentist, doctor, pharmacy, veterinary, gym, beauty, hairdresser, car_repair, car_dealer, supermarket, bakery, clothes, real_estate, lawyer, accountant, insurance, it_company, school, kindergarten, bank, fuel, coworking, florist, hardware, any_shop, any_office, any_craft, any_amenity. Or any OSM tag like shop=bicycle.

## `customTags` (type: `array`):

Extra OpenStreetMap tags, e.g. craft=plumber, office=architect, amenity=dentist, or a key alone like 'shop'.

## `boundingBoxes` (type: `array`):

Exact areas as 'south,west,north,east' in decimal degrees, e.g. 52.37,4.88,52.38,4.90.

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

Optional case-insensitive filter on the business name, e.g. Starbucks.

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

Skip places that have no contact details in OpenStreetMap.

## `maxItemsPerLocation` (type: `integer`):

Stop after this many places per location.

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

Adds every OpenStreetMap tag of the place (e.g. payment methods, diet options, levels).

## Actor input object example

```json
{
  "locations": [
    "Shoreditch, London"
  ],
  "categories": [
    "cafe"
  ],
  "customTags": [],
  "boundingBoxes": [],
  "onlyWithContact": false,
  "maxItemsPerLocation": 50,
  "includeAllTags": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

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

No description

# 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": [
        "Shoreditch, London"
    ],
    "categories": [
        "cafe"
    ],
    "maxItemsPerLocation": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhucl1006/openstreetmap-business-poi-extractor").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": ["Shoreditch, London"],
    "categories": ["cafe"],
    "maxItemsPerLocation": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("zhucl1006/openstreetmap-business-poi-extractor").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": [
    "Shoreditch, London"
  ],
  "categories": [
    "cafe"
  ],
  "maxItemsPerLocation": 50
}' |
apify call zhucl1006/openstreetmap-business-poi-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhucl1006/openstreetmap-business-poi-extractor"
        }
    }
}
```

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/qK3XacvP8BvjnUm9H/builds/JyKTqqaUzuFvHBEIh/openapi.json
