# OpenStreetMap POI Finder — Cafés, Shops, Parks, 1k+ Categories (`scrupulous_waterbird_m4w/osm-poi-finder`) Actor

Query OpenStreetMap's Overpass API for any bounding box + tag filter and return points of interest as structured JSON. Cafés, restaurants, shops, parks, schools, hospitals, 1,000+ other categories. No auth, no proxy, public Overpass API.

- **URL**: https://apify.com/scrupulous\_waterbird\_m4w/osm-poi-finder.md
- **Developed by:** [Mori](https://apify.com/scrupulous_waterbird_m4w) (community)
- **Categories:** Travel, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 44.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Finder

Query OpenStreetMap's Overpass API for any point, bounding box, or city — cafés, restaurants, shops, parks, schools, hospitals and 1,000+ other POI categories.

### What it does
- Submits one or more Overpass-QL queries and returns one record per matching OSM element
- Each record carries geometry, the primary OSM category tag, structured address/contact fields, and the full raw tag map
- No proxy, no auth, no captcha, no JS rendering
- Handles element-type selection (`node`, `way`, `relation`) per query

### Input

| Field             | Required | Description |
|-------------------|----------|-------------|
| `queries`         | yes      | List of query objects (see schema below) |
| `maxResults`      | no       | Cap on records emitted per query (default 1000) |
| `overpassEndpoint`| no       | Override Overpass base URL (default `https://overpass-api.de/api/interpreter`) |

Each `queries[]` entry:

```json
{
  "label": "Cafés in downtown SF",
  "bbox": "37.7749,-122.4194,37.7849,-122.4094",
  "filters": ["amenity=cafe", "amenity=restaurant"],
  "elementType": "node"
}
````

- `bbox`: `"south,west,north,east"` decimal degrees (Overpass convention)
- `filters`: list of `"key=value"` strings (e.g. `amenity=cafe`, `shop=bakery`, `tourism=museum`)
- `elementType`: `node` (default), `way`, or `relation`
- `label`: free-form, surfaces in every emitted record for traceability

### Output

One record per matching element, plus a final `_summary: true` record with per-query counts:

```json
{
  "queryLabel": "Cafés and restaurants in downtown San Francisco",
  "bbox": { "south": 37.7749, "west": -122.4194, "north": 37.7849, "east": -122.4094 },
  "filters": ["amenity=cafe", "amenity=restaurant"],
  "osmType": "node",
  "osmId": 1493456487,
  "lat": 37.7770688,
  "lon": -122.41733,
  "name": "Starbucks",
  "category": "amenity",
  "subcategory": "cafe",
  "address": { "street": "Market Street", "housenumber": "1390", "city": "San Francisco", "postcode": "94102", "state": "CA" },
  "contact": { "phone": "+1-415-555-0100", "website": "https://...", "opening_hours": "Mo-Fr 07:00-19:00" },
  "tags": { "amenity": "cafe", "brand": "Starbucks", "cuisine": "coffee_shop", "wheelchair": "yes" },
  "scrapedAt": "2026-07-08T12:34:56.789Z"
}
```

### Examples

**Coffee shops + bakeries in a 1km box around SF Union Square:**

```json
{
  "queries": [
    {
      "label": "Coffee and bakeries near Union Square",
      "bbox": "37.7820,-122.4100,37.7920,-122.4000",
      "filters": ["amenity=cafe", "shop=bakery"],
      "elementType": "node"
    }
  ],
  "maxResults": 500
}
```

**All parks in a city-wide box:**

```json
{
  "queries": [
    {
      "label": "Parks in San Francisco",
      "bbox": "37.7050,-122.5150,37.8350,-122.3550",
      "filters": ["leisure=park"],
      "elementType": "way"
    }
  ]
}
```

### Pricing

Free tier: 100 runs/month on Apify's free plan. Each run is a single Overpass POST.

### Limitations

- Overpass rate-limits per IP. For high-volume runs, use `overpassEndpoint` to switch to a regional mirror (`https://overpass.kumi.systems/api/interpreter`, `https://overpass.us/api/interpreter`).
- `way` and `relation` queries require Overpass to compute centroids — adds a few seconds per query but is handled by the public server.
- Bounding-box queries only. Radius-around-point and city-name geocoding are out of scope for v0.1.

### Changelog

- 0.1.0 — initial release. One-or-more query list, Overpass-QL generation, structured JSON output with address/contact extraction.

# Actor input Schema

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

One or more Overpass queries. Each query runs independently and emits its own records.

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

Cap on records emitted per query (Overpass can return thousands in dense areas).

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

Overpass API base URL. Use the default (overpass-api.de) or a regional mirror if you hit rate limits.

## Actor input object example

```json
{
  "queries": [
    {
      "label": "Cafés in downtown San Francisco",
      "bbox": "37.7749,-122.4194,37.7849,-122.4094",
      "filters": [
        "amenity=cafe",
        "amenity=restaurant"
      ],
      "elementType": "node"
    }
  ],
  "maxResults": 1000,
  "overpassEndpoint": "https://overpass-api.de/api/interpreter"
}
```

# 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": [
        {
            "label": "Cafés in downtown San Francisco",
            "bbox": "37.7749,-122.4194,37.7849,-122.4094",
            "filters": [
                "amenity=cafe",
                "amenity=restaurant"
            ],
            "elementType": "node"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrupulous_waterbird_m4w/osm-poi-finder").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": [{
            "label": "Cafés in downtown San Francisco",
            "bbox": "37.7749,-122.4194,37.7849,-122.4094",
            "filters": [
                "amenity=cafe",
                "amenity=restaurant",
            ],
            "elementType": "node",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("scrupulous_waterbird_m4w/osm-poi-finder").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 '{
  "queries": [
    {
      "label": "Cafés in downtown San Francisco",
      "bbox": "37.7749,-122.4194,37.7849,-122.4094",
      "filters": [
        "amenity=cafe",
        "amenity=restaurant"
      ],
      "elementType": "node"
    }
  ]
}' |
apify call scrupulous_waterbird_m4w/osm-poi-finder --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenStreetMap POI Finder — Cafés, Shops, Parks, 1k+ Categories",
        "description": "Query OpenStreetMap's Overpass API for any bounding box + tag filter and return points of interest as structured JSON. Cafés, restaurants, shops, parks, schools, hospitals, 1,000+ other categories. No auth, no proxy, public Overpass API.",
        "version": "0.0",
        "x-build-id": "u1HJBz8xw6Awpr1pT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrupulous_waterbird_m4w~osm-poi-finder/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrupulous_waterbird_m4w-osm-poi-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrupulous_waterbird_m4w~osm-poi-finder/runs": {
            "post": {
                "operationId": "runs-sync-scrupulous_waterbird_m4w-osm-poi-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrupulous_waterbird_m4w~osm-poi-finder/run-sync": {
            "post": {
                "operationId": "run-sync-scrupulous_waterbird_m4w-osm-poi-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Queries",
                        "type": "array",
                        "description": "One or more Overpass queries. Each query runs independently and emits its own records."
                    },
                    "maxResults": {
                        "title": "Max results per query",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Cap on records emitted per query (Overpass can return thousands in dense areas).",
                        "default": 1000
                    },
                    "overpassEndpoint": {
                        "title": "Overpass endpoint",
                        "type": "string",
                        "description": "Overpass API base URL. Use the default (overpass-api.de) or a regional mirror if you hit rate limits.",
                        "default": "https://overpass-api.de/api/interpreter"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
