# OpenStreetMap POI Extractor (`felicific_overlook/osm-poi-extractor`) Actor

Extract POIs (cafes, restaurants, hotels, shops, banks) from OpenStreetMap by bounding box: name, category, address, coordinates, opening hours, website, phone. No API key; fair-use queries; ODbL attribution on every row.

- **URL**: https://apify.com/felicific_overlook/osm-poi-extractor.md
- **Developed by:** [yinkai zhao](https://apify.com/felicific_overlook) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 results

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 Extractor

Extract real Points of Interest — cafés, restaurants, hotels, shops, banks, pharmacies and more — from **OpenStreetMap** by bounding box, into a clean structured dataset. No API keys, no proxies, no scraping of restricted sites. Every row carries the required **ODbL attribution**.

### What you get

One dataset row per POI with:

| Field | Example |
|---|---|
| `name` | Rossini Cafe |
| `category` | cafe |
| `osmKey` | amenity |
| `latitude`, `longitude` | -33.8688, 151.2073 |
| `address` | 12 George St Sydney 2000 |
| `openingHours` | Mo-Fr 07:00-17:00 |
| `website`, `phone` | https://…, +61 2 … |
| `osmUrl` | https://www.openstreetmap.org/node/1001 |
| `attribution` | Data © OpenStreetMap contributors, ODbL 1.0 |

Optionally writes `poi.csv` to the run's key-value store (`includeCsv: true`).

### Why OpenStreetMap

OpenStreetMap is open data licensed under ODbL 1.0 — usable for commercial analysis when attribution is preserved (it is embedded in every row). This Actor deliberately does **not** scrape Google Maps or other sites whose terms forbid it.

### Use cases

- Local lead generation and market research (business density, category mix)
- GIS / mapping enrichment without an API key
- Site selection and catchment analysis
- Data journalism and open-data projects

### Input

```json
{
  "bbox": [-33.8688, 151.2073, -33.8600, 151.2170],
  "categories": ["cafe", "restaurant"],
  "maxResults": 500,
  "includeUnnamed": false,
  "includeCsv": false
}
```

- `bbox` — `[south, west, north, east]` in WGS84 degrees. **Max 0.25 square degrees** per run (e.g. 0.5° × 0.5°); split larger areas into tiles to respect the public Overpass API's fair-use policy.
- `categories` — presets (`food`, `lodging`, `services`, `retail`), raw OSM values (`cafe`, `bank`), or explicit `key=value` tags (`shop=bakery`, `tourism=hotel`).
- `maxResults` — 1–2000 rows per run.
- `includeUnnamed` — keep POIs without a name tag (`name: null`).
- `includeCsv` — also store a CSV in the key-value store.

### Output example

```json
{
  "id": "node/1001",
  "name": "Rossini Cafe",
  "category": "cafe",
  "osmKey": "amenity",
  "latitude": -33.8688,
  "longitude": 151.2073,
  "address": "12 George St Sydney 2000",
  "openingHours": "Mo-Fr 07:00-17:00",
  "website": null,
  "phone": null,
  "osmUrl": "https://www.openstreetmap.org/node/1001",
  "attribution": "Data © OpenStreetMap contributors, ODbL 1.0 (https://www.openstreetmap.org/copyright)"
}
```

The run's **Output** tab shows the dataset; the API response exposes `output.results` pointing to `/items`.

### Pricing

Pay per event: **$4 per 1,000 results** (plus the platform's standard actor-start event), i.e. $0.004 per POI written to the dataset. Apify keeps a 20% commission; platform usage is deducted from the payout. Free-plan users' platform costs are covered by Apify and don't count toward earnings.

Cost reality: measured runs cost about $0.017 platform usage per 500-result run (≈$0.035 per 1,000 results), so the price covers costs with a healthy margin.

### Reliability & limits

- Bounded jittered retries (429/502/503/504, network errors) with a per-attempt 90 s timeout.
- Requests are bounded to 0.25 sq° and 2,000 results; unbounded Overpass use is intentionally prevented.
- Data freshness follows OpenStreetMap community edits; coverage and tags vary by region.
- POIs are returned as mapped; no geocoding, dedupe across bboxes, or verification calls.

### Attribution and ODbL obligations

OpenStreetMap data is licensed under **ODbL 1.0**. If you display or redistribute the extracted data:

- keep the attribution **© OpenStreetMap contributors, ODbL 1.0** (included in every JSON row and in the CSV `attribution` column);
- treat a redistributed extracted database as a **Derivative Database**: it must remain available under ODbL (share-alike) with attribution;
- reports, maps or visualisations built from it are typically **Produced Works** and need clear attribution;
- do not present the data as originating from another provider.

This is a licensing summary, not legal advice; check https://www.openstreetmap.org/copyright and https://opendatacommons.org/licenses/odbl/1-0/ for the authoritative terms.

### FAQ

**Does it need a Google Maps API key?** No. It uses the public Overpass API and open OSM data.

**Can I extract a whole country?** Not in one run — split into tiles of ≤0.25 sq°; each run is one tile. Contact us for batch workflows.

**Why are some fields null?** Only tags present in OSM are returned. Coverage depends on local mapping activity.

# Actor input Schema

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

Search area as \[south, west, north, east] in WGS84 degrees. Max 0.25 square degrees per run. Alternatively use center + radiusKm.

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

Presets (food, lodging, services, retail), raw amenity values (cafe, bank) or key=value tags (shop=bakery, tourism=hotel).

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

Upper bound on dataset rows per run (1-2000).

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

When true, POIs without a name tag are kept (name will be null).

## `contactFields` (type: `boolean`):

Include website/phone tags when present.

## `includeCsv` (type: `boolean`):

When true, a poi.csv file is written to the run key-value store.

## `center` (type: `array`):

\[latitude, longitude] of the search centre. Requires radiusKm. No geocoding is performed.

## `radiusKm` (type: `number`):

Search radius around center, 0.1-50 km; converted to a bounding box.

## Actor input object example

```json
{
  "bbox": [
    -33.87,
    151.2,
    -33.85,
    151.22
  ],
  "categories": [
    "cafe",
    "restaurant"
  ],
  "maxResults": 500,
  "includeUnnamed": false,
  "contactFields": true,
  "includeCsv": false
}
```

# Actor output Schema

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

All extracted POIs for the requested bounding box, served from the default dataset as JSON items.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("felicific_overlook/osm-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("felicific_overlook/osm-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 '{}' |
apify call felicific_overlook/osm-poi-extractor --silent --output-dataset

```

## MCP server setup

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