# Local Business & POI Listings Scraper (`moving_beacon-owner1/local-business-poi-listings-scraper`) Actor

Extract local business listings, shops, restaurants, amenities, medical clinics, offices, addresses, contact details, websites, opening hours, and geographic coordinates using the keyless OpenStreetMap Nominatim API ([nominatim.openstreetmap.org](https://nominatim.openstreetmap.org)).

- **URL**: https://apify.com/moving_beacon-owner1/local-business-poi-listings-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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

## Local Business & POI Listings Scraper (OpenStreetMap Nominatim)

Extract local business listings, shops, restaurants, amenities, medical clinics, offices, addresses, contact details, websites, opening hours, and geographic coordinates using the keyless OpenStreetMap Nominatim API ([nominatim.openstreetmap.org](https://nominatim.openstreetmap.org)).

***

### Features

- **Keyless & Credential-Free**: 100% keyless alternative to the paid Google Maps Places API. Search local venues and points of interest globally without paid API credits or billing accounts.
- **Geographic Radius Search**: Queries places inside a bounding box defined by center latitude, longitude, and radius (meters).
- **Contact Details via Extratags**: Automatically parses phone numbers (`phone`, `contact:phone`), official websites (`website`, `url`), emails (`email`, `contact:email`), and operating hours (`opening_hours`).
- **Structured Address Breakdown**: Deconstructs locations into street name, house number, neighborhood, city/municipality, state/county, postal code, and country.
- **Batch Multi-Location Search**: Supports multi-point queries and CSV batch coordinates via the `search_locations` parameter.
- **Strict Policy Etiquette**: Fully enforces OpenStreetMap's Nominatim usage policy (minimum 1.0s delay between requests, custom User-Agent, and `Retry-After` header handling on HTTP 429).
- **Apify Proxy Support**: Integrates with Apify residential and datacenter proxies.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | `string` | `"restaurant"` | **Required**. Business category, amenity, or keyword (e.g. `"restaurant"`, `"cafe"`, `"hotel"`, `"dentist"`, `"pharmacy"`, `"supermarket"`). |
| `latitude` | `number` | `40.7128` | Center latitude coordinate (e.g. `40.7128` for New York, `51.5074` for London, `48.8566` for Paris). |
| `longitude` | `number` | `-74.0060` | Center longitude coordinate (e.g. `-74.0060` for New York, `-0.1278` for London, `2.3522` for Paris). |
| `radius` | `integer` | `1000` | Search radius in meters (e.g. `1000` for 1 km, `5000` for 5 km). |
| `limit` | `integer` | `20` | Maximum total number of business records to return. |
| `per_query` | `integer` | `20` | Results per Nominatim query (capped at 40 by Nominatim). |
| `search_locations` | `array` | `[]` | Optional list of batch locations `[{"query": "cafe", "latitude": 40.7128, "longitude": -74.0060, "radius_m": 1000}]`. |
| `delay` | `number` | `1.1` | Pause between queries in seconds. OSM usage policy requires at least 1.0 second. |
| `include_extratags` | `boolean` | `true` | When true, extracts phone, website, email, and opening hours from OSM extratags. |
| `timeout` | `integer` | `40` | Network request timeout in seconds. |
| `proxyConfiguration` | `object` | `null` | Optional Apify proxy settings (e.g. `{"useApifyProxy": true}`). |

***

### Example Input JSON

#### Single Search Area

```json
{
  "query": "restaurant",
  "latitude": 40.7128,
  "longitude": -74.0060,
  "radius": 1000,
  "limit": 20,
  "per_query": 20,
  "delay": 1.1,
  "include_extratags": true,
  "timeout": 40,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

#### Batch Multi-Location Search

```json
{
  "search_locations": [
    {
      "query": "coffee",
      "latitude": 40.7128,
      "longitude": -74.0060,
      "radius_m": 1000
    },
    {
      "query": "bakery",
      "latitude": 40.7580,
      "longitude": -73.9855,
      "radius_m": 1500
    }
  ],
  "limit": 50,
  "delay": 1.2
}
```

***

### Output Dataset Schema

Each item in the output dataset contains:

| Field | Type | Description |
|---|---|---|
| `query` | `string` | Search query or category used. |
| `search_latitude` | `number` | Search center latitude coordinate. |
| `search_longitude` | `number` | Search center longitude coordinate. |
| `radius_m` | `integer` | Search bounding radius in meters. |
| `name` | `string` | Venue or business name. |
| `display_name` | `string` | Full formatted OpenStreetMap display name. |
| `address` | `string` | Clean multi-part street address. |
| `street` | `string \| null` | Street name and building/house number. |
| `city` | `string \| null` | City, town, or municipality. |
| `state` | `string \| null` | State, province, or region. |
| `postcode` | `string \| null` | Postal / ZIP code. |
| `country` | `string \| null` | Country name. |
| `phone` | `string \| null` | Contact phone number (from extratags). |
| `website` | `string \| null` | Official website URL (from extratags). |
| `email` | `string \| null` | Contact email address (from extratags). |
| `opening_hours` | `string \| null` | Weekly opening hours specification. |
| `category` | `string` | High-level OSM category (e.g. `amenity`, `shop`, `tourism`). |
| `type` | `string` | Specific POI classification (e.g. `restaurant`, `cafe`, `pharmacy`). |
| `latitude` | `number` | Latitude coordinate of the POI. |
| `longitude` | `number` | Longitude coordinate of the POI. |
| `osm_type` | `string` | OpenStreetMap element type (`node`, `way`, `relation`). |
| `osm_id` | `string` | OpenStreetMap element ID. |
| `osm_url` | `string` | Canonical link to openstreetmap.org entity page. |
| `place_id` | `integer` | Internal Nominatim place ID. |
| `boundingbox` | `array` | Geographic coordinate boundaries `[min_lat, max_lat, min_lon, max_lon]`. |
| `source` | `string` | Source identifier (`"nominatim.openstreetmap.org"`). |
| `scraped_at` | `string` | ISO 8601 UTC timestamp of extraction. |

#### Example Output Record

```json
{
  "query": "restaurant",
  "search_latitude": 40.7128,
  "search_longitude": -74.006,
  "radius_m": 1000,
  "name": "Delmonico's",
  "display_name": "Delmonico's, 56, Beaver Street, Whitehall, Manhattan, New York, 10004, United States",
  "address": "Beaver Street 56, 10004 New York New York United States",
  "street": "Beaver Street 56",
  "city": "New York",
  "state": "New York",
  "postcode": "10004",
  "country": "United States",
  "phone": "+12125091144",
  "website": "http://www.delmonicosny.com",
  "email": null,
  "opening_hours": "Mo-Fr 11:30-22:00; Sa 17:00-22:00",
  "category": "amenity",
  "type": "restaurant",
  "latitude": 40.705042,
  "longitude": -74.0102055,
  "osm_type": "node",
  "osm_id": "2186614177",
  "osm_url": "https://www.openstreetmap.org/node/2186614177",
  "place_id": 357385351,
  "boundingbox": [
    "40.7049920",
    "40.7050920",
    "-74.0102555",
    "-74.0101555"
  ],
  "source": "nominatim.openstreetmap.org",
  "scraped_at": "2026-11-18T14:20:00.000000+00:00"
}
```

***

### Policy & Compliance Guidelines

- **OpenStreetMap Usage Policy**: The Nominatim API is provided as a shared, free service by the OpenStreetMap community. Nominatim's [Acceptable Use Policy](https://operations.osmfoundation.org/policies/nominatim/) requires:
  - **Rate Limit**: Maximum of 1 request per second (enforced by default with `delay: 1.1`).
  - **Descriptive User-Agent**: Every request carries an identifying User-Agent.
  - **No Bulk Scraping**: Avoid automated scraping of massive geographic areas without personal proxy infrastructure or self-hosted Nominatim instances.
- **Open Data Commons**: OpenStreetMap data is licensed under the [Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/). Attribution must be provided to `© OpenStreetMap contributors` when redistributing or publishing extracted maps or POI datasets.
- **GDPR & Privacy Compliance**: Any personal data (such as sole proprietor contact details) must be handled in compliance with applicable local data protection regulations.

***

### How to Run

#### Apify Platform

1. Select the Actor in the Apify Console.
2. Enter your business query keyword, search coordinates, and radius in meters.
3. Click **Start** to run.
4. Export results to JSON, CSV, Excel, or NDJSON.

# Actor input Schema

## `query` (type: `string`):

Category or keyword to search for (e.g. 'restaurant', 'cafe', 'dentist', 'supermarket', 'hotel', 'pharmacy', 'bakery').

## `latitude` (type: `number`):

Center latitude for geographic search (e.g. 40.7128 for New York, 51.5074 for London, 48.8566 for Paris).

## `longitude` (type: `number`):

Center longitude for geographic search (e.g. -74.0060 for New York, -0.1278 for London, 2.3522 for Paris).

## `radius` (type: `integer`):

Radius around coordinates in meters (e.g. 1000 for 1km, 5000 for 5km).

## `limit` (type: `integer`):

Maximum total number of business listings to return.

## `per_query` (type: `integer`):

Number of results requested per Nominatim query (capped at 40 by Nominatim).

## `search_locations` (type: `array`):

Optional list of multiple locations/queries to search in batch. Each item can specify query, latitude, longitude, and radius_m.

## `delay` (type: `number`):

Pause between Nominatim requests. OpenStreetMap usage policy requires at least 1.0 second between consecutive calls.

## `include_extratags` (type: `boolean`):

Whether to extract phone numbers, websites, emails, and opening hours from OpenStreetMap extratags.

## `timeout` (type: `integer`):

Timeout in seconds for API HTTP requests.

## `proxyConfiguration` (type: `object`):

Optional proxy configuration for requests.

## Actor input object example

```json
{
  "query": "restaurant",
  "latitude": 40.7128,
  "longitude": -74.006,
  "radius": 1000,
  "limit": 20,
  "per_query": 20,
  "search_locations": [],
  "delay": 1.1,
  "include_extratags": true,
  "timeout": 40
}
```

# 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 = {
    "query": "restaurant",
    "latitude": 40.7128,
    "longitude": -74.006,
    "radius": 1000,
    "limit": 20,
    "per_query": 20,
    "search_locations": [],
    "delay": 1.1,
    "timeout": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/local-business-poi-listings-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 = {
    "query": "restaurant",
    "latitude": 40.7128,
    "longitude": -74.006,
    "radius": 1000,
    "limit": 20,
    "per_query": 20,
    "search_locations": [],
    "delay": 1.1,
    "timeout": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/local-business-poi-listings-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 '{
  "query": "restaurant",
  "latitude": 40.7128,
  "longitude": -74.006,
  "radius": 1000,
  "limit": 20,
  "per_query": 20,
  "search_locations": [],
  "delay": 1.1,
  "timeout": 40
}' |
apify call moving_beacon-owner1/local-business-poi-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/local-business-poi-listings-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/0mh1kDWA6zayj3Y1P/builds/FMORwemt4WBTRnH0G/openapi.json
