# OpenStreetMap POI, Amenities & Geocoding Extractor (`litezero/openstreetmap-poi-scraper`) Actor

Query OpenStreetMap Overpass API for Points of Interest (restaurants, hospitals, schools, shops), geographic coordinates, postal addresses, and tags across any city or bounding box.

- **URL**: https://apify.com/litezero/openstreetmap-poi-scraper.md
- **Developed by:** [LiteZero](https://apify.com/litezero) (community)
- **Categories:** Travel, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 item scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, Amenities & Geocoding Extractor

Extract points of interest (POI), local amenities, commercial venues, and global geographic data from [OpenStreetMap](https://www.openstreetmap.org). Perfect for real estate analytics, competitor store mapping, travel guides, urban research, and B2B local business prospecting.

***

### ⚡ Key Capabilities

- **Global Geospatial Search**: Search across any city, region, or country worldwide (e.g. `"coffee shop in Manhattan"`, `"hospitals in Munich"`).
- **Deep Structured Addresses**: Normalized breakdown of street, neighborhood, city, state, postal code, and ISO country code.
- **Enriched Metadata & Extratags**: Extracts opening hours, cuisine types, phone numbers, official websites, brand wikidata IDs, and wheelchair accessibility.
- **Bounding Boxes & Coordinates**: High-precision latitude/longitude coordinates and geographic bounding boxes ready for GIS/mapping workflows.
- **Pay-Per-Result Pricing**: Only pay **$1.50 per 1,000 places** retrieved.

***

### 📊 Comparison with Alternatives

| Feature | 🗺️ OpenStreetMap Scraper | Google Places API | Foursquare Places API |
|---|:---:|:---:|:---:|
| **Pricing** | **$1.50 / 1k results** | $17.00 - $32.00 / 1k | $15.00 / 1k |
| **API Key Needed** | ❌ None | Required (Credit Card) | Required |
| **Global Coverage** | ✅ Complete Worldwide | Restricted in some areas | Fragmented |
| **Export Formats** | JSON, CSV, Excel, XML | JSON only | JSON only |
| **Terms of Use** | Open Database License (ODbL) | Strict storage restrictions | Proprietary lock-in |

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|:---:|:---:|---|
| `queries` | `Array<string>` | `["cafe in London", "pharmacy in Berlin"]` | Search terms or location-based POI queries. |
| `amenity` | `string` | `""` | Optional amenity filter (`cafe`, `restaurant`, `hospital`, `bank`). |
| `countryCodes` | `string` | `""` | Optional ISO 3166-1 alpha-2 codes (e.g. `us,gb,de`). |
| `maxItems` | `number` | `50` | Maximum total records to extract (up to 500). |

***

### 📤 Output Sample

```json
{
  "placeId": 244747404,
  "osmId": 9765973817,
  "osmType": "node",
  "name": "Starbucks",
  "displayName": "Starbucks, Manhattan Drive, Najafgarh, Delhi, South West Delhi, Delhi, 110037, India",
  "category": "amenity",
  "type": "cafe",
  "latitude": 28.550666,
  "longitude": 77.1217458,
  "address": {
    "amenity": "Starbucks",
    "road": "Manhattan Drive",
    "neighbourhood": "Najafgarh",
    "city": "Delhi",
    "county": "South West Delhi",
    "state": "Delhi",
    "postcode": "110037",
    "country": "India",
    "countryCode": "in"
  },
  "extraTags": {
    "cuisine": "coffee_shop",
    "takeaway": "yes",
    "opening_hours": "Mo-Su 08:15-24:00",
    "brand:wikidata": "Q37158",
    "internet_access": "wlan"
  },
  "osmUrl": "https://www.openstreetmap.org/node/9765973817",
  "scrapedAt": "2026-10-03T06:30:00.000Z"
}
```

# Actor input Schema

## `queries` (type: `array`):

POI search queries such as 'cafe in London', 'hospital in Berlin', 'hotels in Manhattan', or street addresses.

## `amenity` (type: `string`):

Specific amenity type (e.g. cafe, restaurant, hospital, pharmacy, bank, cinema).

## `countryCodes` (type: `string`):

Comma-separated two-letter ISO 3166-1 alpha-2 country codes (e.g. 'us,gb,de').

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

Maximum total places to output.

## Actor input object example

```json
{
  "queries": [
    "cafe in London",
    "pharmacy in Berlin"
  ],
  "maxItems": 50
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "cafe in London",
        "pharmacy in Berlin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("litezero/openstreetmap-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 = { "queries": [
        "cafe in London",
        "pharmacy in Berlin",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("litezero/openstreetmap-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 '{
  "queries": [
    "cafe in London",
    "pharmacy in Berlin"
  ]
}' |
apify call litezero/openstreetmap-poi-scraper --silent --output-dataset

```

## MCP server setup

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