# Local Business Scraper — Leads by City & Category (`hichemdev/local-business-scraper`) Actor

Scrape local business leads from OpenStreetMap by city and category: name, phone, e-mail, website, address, opening hours, coordinates and social links. 34 categories from restaurants and hotels to dentists, lawyers and plumbers. An open alternative to Google Maps. No API key.

- **URL**: https://apify.com/hichemdev/local-business-scraper.md
- **Developed by:** [Hichem Ben Moussa](https://apify.com/hichemdev) (community)
- **Categories:** Lead generation, Business, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 businesses

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Scraper — Leads by City & Category

Scrape **local business leads from OpenStreetMap** — name, phone, e-mail, website, address, opening hours and exact coordinates — for any city in the world and any of 34 built-in business categories.

An open, un-rate-limited alternative to scraping Google Maps: no API key, no billing account, no quota, and the data is licensed for reuse.

### What you get

| Field | Description |
|---|---|
| `name` | Business name |
| `category` | What it is — restaurant, dentist, plumber… |
| `cuisine` | Cuisine type, for food businesses |
| `brand`, `operator` | Chain and operating company, where tagged |
| `phone` | Phone number, usually in international format |
| `email` | E-mail address |
| `website` | Website, normalised to include the scheme |
| `facebook`, `instagram` | Social profiles |
| `address` | Assembled street address |
| `street`, `houseNumber`, `city`, `postcode`, `country` | Address components |
| `openingHours` | Opening hours in OpenStreetMap syntax, e.g. `Mo-Su 12:00-14:00, 19:30-22:00` |
| `wheelchair`, `outdoorSeating`, `takeaway`, `delivery`, `internetAccess` | Amenity details |
| `latitude`, `longitude` | Exact coordinates |
| `osmId`, `osmUrl` | Stable OpenStreetMap identifier and link |
| `mapsUrl` | One-click Google Maps link to the coordinates |

### Categories

Restaurants · Cafes · Bars & pubs · Fast food · Bakeries · Hotels & lodging · Supermarkets · Pharmacies · Doctors · Dentists · Vets · Hairdressers · Beauty & massage · Gyms & sports · Car repair · Car dealers · Banks · Lawyers · Accountants · Estate agents · Insurance · Company offices · Schools · Childcare · Florists · Hardware & DIY · Clothing & shoes · Furniture & interiors · Electronics · Laundry & dry cleaning · Funeral directors · Plumbers · Electricians · Builders & trades

Need something else? Put a raw OpenStreetMap tag filter in **Custom filter**, e.g. `["shop"="butcher"]` or `["amenity"~"^(cinema|theatre)$"]`.

### Example input

```json
{
  "location": "Lyon, France",
  "category": "restaurant",
  "onlyWithPhone": true,
  "maxPlaces": 200
}
```

Search a radius around a point instead of a whole city:

```json
{
  "latitude": "40.7580",
  "longitude": "-73.9855",
  "radiusKm": 3,
  "category": "dentist"
}
```

### Example output

```json
{
  "osmId": "node/25733700",
  "name": "L'Esprit Bistrot",
  "category": "restaurant",
  "cuisine": "french",
  "phone": "+33 4 78 74 38 42",
  "website": "https://www.lespritbistrot.com/lesprit-bistrot-monplaisir/",
  "openingHours": "Mo-Su 12:00-14:00, 19:30-22:00",
  "latitude": 45.7410332,
  "longitude": 4.8689407,
  "osmUrl": "https://www.openstreetmap.org/node/25733700",
  "mapsUrl": "https://www.google.com/maps/search/?api=1&query=45.7410332,4.8689407"
}
```

### Who uses this

- **Agencies and local SEO** — build a prospect list of every restaurant in a city that has a phone number but no website
- **Field sales** — territory lists with coordinates, ready to route
- **Franchise and site selection** — competitor density by neighbourhood, with exact positions
- **Delivery, logistics and fintech** — merchant discovery in a new market
- **Market research** — count and map an entire category across a region at no per-request cost

The `onlyWithWebsite: false` + `onlyWithPhone: true` combination is the classic "sell them a website" list.

### How complete is this data? (read this before you buy)

OpenStreetMap is volunteer-maintained, and coverage is **uneven by field and by region**. On a typical European city query for restaurants, expect roughly:

| Field | Typical coverage |
|---|---|
| `name`, coordinates, `category` | ~100% |
| `phone` | ~70% |
| `website` | ~65% |
| `openingHours` | ~65% |
| **`address` / `city`** | **~20% — often much lower** |

That address figure is the important one. Most mappers tag a business by position rather than by street address, so **coordinates are near-universal while structured addresses are frequently missing**. If your workflow needs a postal address for every record, this is not the right source on its own — though you can reverse-geocode the coordinates, which are always present.

Coverage is strongest in Western Europe, weaker in North America for commercial POIs, and thin in much of the world. Cities beat rural areas everywhere. Use `onlyWithPhone` / `onlyWithWebsite` to get a clean list rather than assuming every record is complete.

### Pricing

Pay per result. Each business returned counts as one result, and the phone/website filters are applied before charging.

### Notes

- Data comes from OpenStreetMap via the public Overpass API, under the Open Database License. **Attribution to OpenStreetMap contributors is required when you republish this data.**
- The public Overpass endpoint is a shared community resource and throttles heavy use. The actor backs off and retries on 429 and 504; very large areas may still need a smaller bounding box or a second run.
- Place names are resolved through OpenStreetMap's geocoder. Ambiguous names resolve to the most prominent match, so prefer `"Springfield, Illinois, USA"` over `"Springfield"`.
- This is an unofficial actor and is not affiliated with the OpenStreetMap Foundation.

# Actor input Schema

## `location` (type: `string`):

Where to search, e.g. Lyon, France or Austin, Texas, USA. Be specific for ambiguous names. Ignored if you give coordinates and a radius below.

## `category` (type: `string`):

What kind of business to look for.

## `customFilter` (type: `string`):

Advanced. An Overpass tag filter used instead of the category, e.g. \["shop"="butcher"] or \["amenity"~"^(cinema|theatre)$"].

## `latitude` (type: `string`):

Optional. Search around this point instead of a named place. Requires a radius.

## `longitude` (type: `string`):

Optional. Search around this point instead of a named place. Requires a radius.

## `radiusKm` (type: `integer`):

Search a circle of this radius instead of the whole place boundary. 0 uses the place boundary.

## `onlyNamed` (type: `boolean`):

Skip entries with no business name in OpenStreetMap.

## `onlyWithPhone` (type: `boolean`):

Keep only businesses that publish a phone number.

## `onlyWithWebsite` (type: `boolean`):

Keep only businesses that publish a website.

## `maxPlaces` (type: `integer`):

Stop after this many businesses.

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

Optional. A proxy is not required for this actor.

## Actor input object example

```json
{
  "location": "Lyon, France",
  "category": "restaurant",
  "radiusKm": 0,
  "onlyNamed": true,
  "onlyWithPhone": false,
  "onlyWithWebsite": false,
  "maxPlaces": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items as JSON.

## `overview` (type: `string`):

Browse results in the Apify Console.

# 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 = {
    "location": "Lyon, France",
    "maxPlaces": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("hichemdev/local-business-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 = {
    "location": "Lyon, France",
    "maxPlaces": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("hichemdev/local-business-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 '{
  "location": "Lyon, France",
  "maxPlaces": 50
}' |
apify call hichemdev/local-business-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hichemdev/local-business-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/k1vSgV2HcCIaqYHyz/builds/hNSDhD2xWORWu7o5f/openapi.json
