# OpenStreetMap POI Extractor (`fetch_cat/openstreetmap-poi-extractor`) Actor

Extract public OpenStreetMap POIs by area and category for lead generation, market mapping, and site research.

- **URL**: https://apify.com/fetch\_cat/openstreetmap-poi-extractor.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Lead generation, Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 poi 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/platform/actors/running/actors-in-store#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

## OpenStreetMap POI Extractor

Extract public OpenStreetMap points of interest by area, category, and optional name keyword.

Use this Actor for local business lists, POI mapping, site-selection research, neighborhood amenity checks, travel datasets, and geospatial enrichment workflows.

### At a glance

- **Best for:** local POI exports, lead generation, market mapping, real-estate research, logistics planning, and public geospatial datasets.
- **Inputs:** bounding box, numeric corners, center point + radius, or place name; amenity/shop/tourism tags; optional name keyword; raw tag toggle; and maximum POIs.
- **Outputs:** one OpenStreetMap object per row with name, category, coordinates, address, phone, website, opening hours, brand/operator, accessibility, and source URL when available.
- **Exports:** download CSV, JSON, Excel, XML, RSS, or use the Apify Dataset API.
- **Cost:** `$0.005` per run plus the `item` event for each saved POI row.

### Input recipes

Use these concrete input patterns when starting a new run:

- **Cafes in SoHo:** `{"placeName":"SoHo, New York, USA","amenityTags":["cafe"],"maxItems":25}`
- **Hotels near a district:** `{"bbox":"40.720,-74.005,40.730,-73.995","tourismTags":["hotel"],"maxItems":20}`
- **Supermarkets by bounding box:** `{"bbox":"51.500,-0.130,51.510,-0.110","shopTags":["supermarket"],"maxItems":50}`
- **Pharmacies near a coordinate:** `{"centerLat":52.5163,"centerLon":13.3777,"radiusMeters":750,"amenityTags":["pharmacy"],"maxItems":30}`
- **Accessible restaurants with raw tags:** `{"placeName":"Mitte, Berlin, Germany","amenityTags":["restaurant"],"includeRawTags":true,"maxItems":30}`

### What can it do?

OpenStreetMap POI Extractor turns public OpenStreetMap places into a clean dataset.

- **Extract bounded OpenStreetMap POIs:** provide a small bounding box or place name and collect matching public OSM objects.
- **Filter by OSM categories:** use amenity, shop, and tourism tags such as `cafe`, `restaurant`, `supermarket`, `hotel`, or `museum`.
- **Collect contact and location fields:** save names, coordinates, category tags, address fields, phone, website, opening hours, and source URLs when available.
- **Inspect advanced tags:** enable `includeRawTags` when you need full OSM tag metadata for GIS or enrichment workflows.
- **Use as an OSM data API workflow:** run through Apify API, export CSV/Excel/JSON, schedule repeat extracts, or connect AI agents through Apify MCP.

### Who is it for?

- **Local lead generation teams:** build public prospect lists by area and category.
- **Site-selection teams:** compare neighborhood amenities.
- **Logistics teams:** map nearby services and pickup points.
- **Real-estate analysts:** research local surroundings and nearby services.
- **Market researchers:** compare category density by area.
- **Travel and mobility teams:** enrich maps with public POIs.

### Why use this actor?

OpenStreetMap is a strong alternative when you need public geographic data without scraping search engines or map apps.

This actor is designed for repeatable, bounded extraction jobs that produce structured rows you can export to CSV, Excel, JSON, Google Sheets, or an API pipeline.

### Output fields

| Field | Description |
| --- | --- |
| `osmId` | OpenStreetMap object ID |
| `osmType` | OSM object type: node, way, or relation |
| `name` | Place name when available |
| `categoryKey` | OSM category group such as amenity, shop, or tourism |
| `categoryValue` | OSM category value such as cafe or hotel |
| `lat` | Latitude |
| `lon` | Longitude |
| `address` | Human-friendly address assembled from common OSM tags |
| `city` | City, town, or village field |
| `postcode` | Postal code |
| `country` | Country code when present |
| `phone` | Phone/contact phone when present |
| `website` | Website/contact website when present |
| `openingHours` | OSM opening hours string |
| `brand` | Brand tag |
| `operator` | Operator tag |
| `wheelchair` | Wheelchair accessibility tag |
| `rawTags` | Optional raw OSM tags object |
| `sourceUrl` | Direct OpenStreetMap object URL |

### Pricing

This Actor uses Apify pay-per-event pricing. The prices below come from the current Actor pricing configuration. Apify public plans map to Store discount tiers, so the table shows both the user-facing plan context and the pricing tier name. The final price shown in Apify depends on the user account plan and any custom agreement.

| Event | What is charged | Price |
| --- | --- | ---: |
| `start` | One-time fee charged when a run starts. Covers fixed startup cost. | $0.005 |
| `item` | One saved OpenStreetMap POI row | $0.00003226 on Free; $0.000028052 on Bronze; $0.000021881 on Silver; $0.000016831 on Gold; $0.000011221 on Platinum; $0.0000078546 on Diamond |

At the Bronze rate, 1,000 saved POIs cost about `$0.028` for the `item` event, plus the one-time start fee.

Apify may also charge platform usage for compute, storage, proxies, or data transfer outside this Actor pricing. Check the Actor run and the Apify Pricing tab for the exact cost shown to your account.

### How to use it

1. Choose a small area.
2. Enter either a `bbox` (`south,west,north,east`) or a `placeName`.
3. Add one or more OSM tag values under amenity, shop, or tourism.
4. Optionally add a name keyword filter.
5. Set `maxItems`.
6. Run the actor.
7. Export the dataset or connect it to your workflow.

### Input configuration

| Setting | JSON key | What it does |
| --- | --- | --- |
| Bounding box | `bbox` | Exact area in `south,west,north,east` order. Best when you already know the coordinates. |
| Place name | `placeName` | Geocoded area name for a one-off neighborhood-level extraction. Repeated identical names use a short-lived internal bounding-box cache; use `bbox` or coordinates for repeat or scheduled workflows. |
| Numeric bounding-box edges | `south`, `west`, `north`, `east` | API-friendly alternative to `bbox`; provide all four values together. |
| Center point and radius | `centerLat`, `centerLon`, `radiusMeters` | Derives a bounded box locally, with a radius from 50 m to 10 km. Best when your workflow already has coordinates. |
| Resume cursor | `resumeFromIndex` | Optional best-effort continuation cursor after a partial run. It skips the first N normalized rows from a new query; because upstream OSM results can change, it is not a stable snapshot or duplicate-free guarantee. |
| Amenity tags | `amenityTags` | OSM amenity values such as `cafe`, `restaurant`, `pharmacy`, `school`, `bank`, or `charging_station`. |
| Shop tags | `shopTags` | OSM shop values such as `supermarket`, `bakery`, `convenience`, `clothes`, or `hairdresser`. |
| Tourism tags | `tourismTags` | OSM tourism values such as `hotel`, `hostel`, `museum`, `attraction`, or `guest_house`. |
| Name keyword | `keyword` | Optional filter against OSM names. Useful for brand or chain searches. |
| Maximum POIs | `maxItems` | Maximum saved POI rows. The Actor enforces conservative limits for public OSM resources. |
| Include raw tags | `includeRawTags` | Adds the full raw OSM tag object when you need advanced metadata. |
| Custom Overpass endpoint | `overpassEndpoint` | Optional credential-free HTTPS Overpass interpreter endpoint. Leave empty for the default public endpoint. |

#### Area input options

#### Bounding box

Use `bbox` when you already know the exact coordinates.

Example:

```json
{
  "bbox": "40.720,-74.005,40.730,-73.995"
}
```

The order is always:

```text
south,west,north,east
```

#### Place name

Use `placeName` for a quick test or neighborhood-level query.

Example:

```json
{
  "placeName": "SoHo, New York, USA"
}
```

Very large places may be rejected. Use a smaller area for reliable results. Identical place-name lookups may reuse a short-lived internal bounding-box cache; this changes neither your input nor the returned POIs.

#### Center point and radius

Use a coordinate and radius when your source already provides a map pin or GPS coordinate. The Actor derives the bounding box locally, so no place-name lookup is needed.

```json
{
  "centerLat": 52.5163,
  "centerLon": 13.3777,
  "radiusMeters": 750
}
```

#### Category input options

OpenStreetMap uses tags.

This actor supports three common POI tag groups:

- `amenityTags`
- `shopTags`
- `tourismTags`

Examples of `amenityTags`:

- `cafe`
- `restaurant`
- `pharmacy`
- `school`
- `bank`
- `bar`
- `charging_station`

Examples of `shopTags`:

- `supermarket`
- `bakery`
- `convenience`
- `clothes`
- `hairdresser`

Examples of `tourismTags`:

- `hotel`
- `hostel`
- `museum`
- `attraction`
- `guest_house`

### Example input

```json
{
  "bbox": "40.720,-74.005,40.730,-73.995",
  "amenityTags": ["cafe", "restaurant"],
  "shopTags": [],
  "tourismTags": [],
  "maxItems": 50,
  "includeRawTags": false
}
```

### Example output

```json
{
  "osmId": 123456789,
  "osmType": "node",
  "name": "Example Cafe",
  "categoryKey": "amenity",
  "categoryValue": "cafe",
  "lat": 40.7251,
  "lon": -74.0001,
  "address": "10 Example Street, New York 10001, US",
  "city": "New York",
  "postcode": "10001",
  "country": "US",
  "phone": "+1 555 0100",
  "website": "https://example.com",
  "openingHours": "Mo-Fr 08:00-18:00",
  "brand": null,
  "operator": null,
  "wheelchair": "yes",
  "sourceUrl": "https://www.openstreetmap.org/node/123456789"
}
```

### Tips for better results

- **Start with one or two categories:** confirm the tag values before adding a broader list.
- **Use a small area first:** neighborhood-level runs are more reliable than city-wide exports.
- **Prefer coordinates for repeatable automations:** `bbox` or center + radius avoids ambiguity and external place-name lookups.
- **Use exact OSM tag values:** `cafe`, `restaurant`, and `supermarket` work better than free-form category names.
- **Increase `maxItems` gradually:** scale only after confirming the output shape.
- **Public-service availability can vary:** the Actor tries compatible public Overpass services with short safety limits. If they are all busy, retry later rather than treating a failed run as an empty result.
- **Enable raw tags only when needed:** `includeRawTags` is useful for GIS workflows but makes rows heavier.

### Common workflows

- **Local lead lists:** extract cafes, restaurants, shops, or pharmacies in a target neighborhood.
- **Real-estate enrichment:** measure nearby services around a building, parcel, or rental area.
- **Market mapping:** compare the number and density of similar places across areas.
- **Logistics research:** find service points, fuel stations, convenience stores, or nearby amenities.

### Integrations

Use the dataset with:

- Google Sheets exports
- CSV and Excel workflows
- CRM enrichment pipelines
- BI dashboards
- Geospatial tools
- Apify API automations
- Webhooks after run completion

### API usage

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/openstreetmap-poi-extractor').call({
  bbox: '40.720,-74.005,40.730,-73.995',
  amenityTags: ['cafe'],
  maxItems: 25
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/openstreetmap-poi-extractor').call(run_input={
    'bbox': '40.720,-74.005,40.730,-73.995',
    'amenityTags': ['cafe'],
    'maxItems': 25,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~openstreetmap-poi-extractor/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "bbox": "40.720,-74.005,40.730,-73.995",
    "amenityTags": ["cafe"],
    "maxItems": 25
  }'
```

### MCP and AI agents

Connect this Actor to AI tools through the official Apify MCP server. The default server can search and run Actors; the focused URL exposes only this Actor.

MCP URL:

```text
https://mcp.apify.com?tools=fetch_cat/openstreetmap-poi-extractor
```

Claude Code example:

```bash
claude mcp add --transport http apify-osm-pois "https://mcp.apify.com?tools=fetch_cat/openstreetmap-poi-extractor"
```

Claude Desktop example:

```json
{
  "mcpServers": {
    "apify-osm-pois": {
      "url": "https://mcp.apify.com?tools=fetch_cat/openstreetmap-poi-extractor"
    }
  }
}
```

Example prompts:

- "Find cafes in this bounding box and return a CSV-ready table."
- "Extract hotels around this district and summarize addresses and websites."
- "Compare supermarkets in two neighborhoods using separate actor runs."

### Limits and fair use

OpenStreetMap and Overpass are community resources.

This actor intentionally enforces conservative limits:

- Small bounding boxes only
- Maximum 1,000 saved POIs per run
- Short public API timeouts
- Limited retries

`placeName` performs one conservative Nominatim `/search` request to turn an area name into a box. It is not an autocomplete or bulk-geocoding feature. A rate-limited, unavailable, or non-geocoding response fails before the run start charge and tells you to retry later or provide a `bbox` (or coordinates) directly.

For scheduled, repeated, or high-volume workflows, pass an explicit `bbox` (or coordinates) so the run does not depend on the shared public geocoding service. The same Actor input and `/search` request parameters can later be directed to a compatible self-hosted Nominatim deployment, including an instance we operate, without changing users' tasks or integrations.

If you need very large OSM extracts, use official planet/regional extracts or your own Overpass infrastructure.

### Legality and attribution

This actor extracts public OpenStreetMap data.

OpenStreetMap data is available under the Open Database License (ODbL). You are responsible for complying with OSM attribution and share-alike requirements for your use case.

A practical attribution line is:

```text
OpenStreetMap contributors
```

Review the OpenStreetMap copyright and license pages before redistributing derived databases.

### Troubleshooting

#### Why did my run fail with a large bounding box?

The actor rejects large areas to protect public API resources and avoid expensive runs.

Use a smaller neighborhood-level bounding box or split the area into several runs.

#### Why are some fields empty?

OpenStreetMap is community-contributed data. Some POIs have complete address and contact tags; others only have names and coordinates.

Enable `includeRawTags` to inspect all available tags.

#### Why did I get fewer items than `maxItems`?

The selected area and categories may contain fewer matching POIs than your requested maximum.

Try a broader category or a nearby area.

### FAQ

#### Can this scrape Google Maps?

No. This actor extracts OpenStreetMap data only.

#### Can I search by brand name?

Yes. Use `keyword` to filter by the OSM `name` tag.

#### Can I extract hotels?

Yes. Add values such as `hotel`, `hostel`, or `guest_house` to `tourismTags`.

#### Can I extract supermarkets?

Yes. Add `supermarket` to `shopTags`.

#### Can I include all OSM tags?

Yes. Set `includeRawTags` to `true`.

### Related actors

- [Google News Scraper](https://apify.com/fetch_cat/google-news-scraper) - monitor local business or competitor news.
- [Yandex Maps Scraper](https://apify.com/fetch_cat/yandex-maps-scraper) - export public Yandex Maps business listings.
- [Website Contact Finder](https://apify.com/fetch_cat/website-contact-finder) - enrich website lists with public contact details.
- [Trustpilot Reviews Scraper](https://apify.com/fetch_cat/trustpilot-reviews-scraper) - export public business review data.

### Support

If a run fails, returns no data, or a field looks wrong, open an issue from the Actor page.

Please include the Apify run ID or run URL, input JSON, one example public URL, query, or input item, what you expected, and what the dataset returned. Small reproducible inputs make parsing or site-layout issues much faster to fix.

### Privacy and data handling

This Actor runs with Apify limited permissions and only processes data needed for the documented run. It uses the inputs you provide and the public records needed to produce the documented dataset to produce the output dataset and sends requests to OpenStreetMap/Nominatim or related OpenStreetMap data endpoints; results are stored in Apify run storage for your account. FetchCat does not use your inputs or outputs for advertising, does not use them for model training, and does not retain them outside the Apify run except for transient support debugging when you explicitly share run details. You are responsible for using the Actor lawfully, respecting the target site's terms, and avoiding unnecessary personal or sensitive data in inputs.

# Actor input Schema

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

Small area to geocode into a bounding box, for example a neighborhood or district. Large cities may be rejected if the bounding box is too large.

## `bbox` (type: `string`):

Optional south,west,north,east bounding box. Takes priority over place name when provided.

## `south` (type: `number`):

Optional numeric bounding-box south edge. Use together with west, north, and east.

## `west` (type: `number`):

Optional numeric bounding-box west edge. Use together with south, north, and east.

## `north` (type: `number`):

Optional numeric bounding-box north edge. Use together with south, west, and east.

## `east` (type: `number`):

Optional numeric bounding-box east edge. Use together with south, west, and north.

## `centerLat` (type: `number`):

Optional center point latitude. Use together with centerLon and radiusMeters; the Actor derives a bounded box locally.

## `centerLon` (type: `number`):

Optional center point longitude. Use together with centerLat and radiusMeters.

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

Optional search radius for centerLat/centerLon. Allowed range: 50 to 10,000 metres.

## `amenityTags` (type: `array`):

OpenStreetMap amenity values to extract, such as cafe, restaurant, pharmacy, school, bank, bar, or charging\_station.

## `shopTags` (type: `array`):

OpenStreetMap shop values to extract, such as supermarket, bakery, convenience, clothes, or hairdresser.

## `tourismTags` (type: `array`):

OpenStreetMap tourism values to extract, such as hotel, hostel, museum, attraction, or guest\_house.

## `keyword` (type: `string`):

Optional case-insensitive filter applied to the OSM name tag.

## `maxItems` (type: `integer`):

Maximum number of POIs to save. Keep this modest for public Overpass API fair use.

## `resumeFromIndex` (type: `integer`):

Advanced: skip this many normalized results from a new query before saving. Use the nextIndex value from PENDING\_WORK after an interrupted run.

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

Include the full raw OpenStreetMap tags object for each POI.

## `overpassEndpoint` (type: `string`):

Advanced: custom Overpass interpreter endpoint. Leave empty to use the public default.

## Actor input object example

```json
{
  "placeName": "SoHo, New York, USA",
  "bbox": "40.720,-74.005,40.730,-73.995",
  "amenityTags": [
    "cafe",
    "restaurant"
  ],
  "shopTags": [],
  "tourismTags": [],
  "maxItems": 50,
  "resumeFromIndex": 0,
  "includeRawTags": false
}
```

# Actor output Schema

## `overview` (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 = {
    "placeName": "SoHo, New York, USA",
    "bbox": "40.720,-74.005,40.730,-73.995",
    "amenityTags": [
        "cafe",
        "restaurant"
    ],
    "shopTags": [],
    "tourismTags": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/openstreetmap-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 = {
    "placeName": "SoHo, New York, USA",
    "bbox": "40.720,-74.005,40.730,-73.995",
    "amenityTags": [
        "cafe",
        "restaurant",
    ],
    "shopTags": [],
    "tourismTags": [],
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/openstreetmap-poi-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "SoHo, New York, USA",
  "bbox": "40.720,-74.005,40.730,-73.995",
  "amenityTags": [
    "cafe",
    "restaurant"
  ],
  "shopTags": [],
  "tourismTags": []
}' |
apify call fetch_cat/openstreetmap-poi-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fetch_cat/openstreetmap-poi-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/DLZp6Y8Jn1mPw26B7/builds/d1Ublf6CUBPCicqGe/openapi.json
