# Local Business Leads from OpenStreetMap (`forgeloop/osm-business-leads`) Actor

Find local businesses in any city or region from OpenStreetMap open data: name, address, phone, website, email, opening hours and coordinates. 50+ categories or free OSM tags, area or radius search, website and phone filters. Pay per place.

- **URL**: https://apify.com/forgeloop/osm-business-leads.md
- **Developed by:** [Markus Heiß](https://apify.com/forgeloop) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 places

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 Leads from OpenStreetMap

Find local businesses in any city, district or region from OpenStreetMap open data. Pick categories like restaurants, dentists, hairdressers or plumbers, or enter your own OSM tags. Get back one row per place with name, address, phone, website, email, opening hours, coordinates and a link to the OSM object.

An open data alternative to lead lists built from map apps. The data is free to reuse under the Open Database License (ODbL), with attribution. Coverage is very good in most of Europe and in many cities worldwide, and it depends on what local mappers have entered.

Not affiliated with the OpenStreetMap Foundation. All place data comes from [OpenStreetMap](https://www.openstreetmap.org), © OpenStreetMap contributors, ODbL. See [openstreetmap.org/copyright](https://www.openstreetmap.org/copyright).

### What it does

- **Turns a place name into an area:** "Graz, Austria" or "Kreuzberg, Berlin" is looked up once with Nominatim, the OSM geocoder, and searched inside its OSM boundary. You can also give an OSM relation like `relation/34719`.
- **Searches around a point:** latitude, longitude and a radius up to 50 km.
- **53 business categories** mapped to OSM tags: restaurant, cafe, bar, hotel, dentist, doctors, pharmacy, hairdresser, car repair, bakery, supermarket, clothes, lawyer, accountant, real estate agent, plumber, electrician, gym and more.
- **Free OSM tag filters** for anything else: `shop=bicycle`, `craft=*`, `cuisine=pizza|kebab` or `amenity=restaurant&cuisine=pizza`.
- **Lead filters:** only places with a website, a phone number or an email. Places without a name are skipped by default.
- **Clean rows:** address split into street, house number, postcode and city, plus a ready address line. Phone numbers from `phone`, `contact:phone` and `mobile` tags, the website from `website` or `contact:website`, the email only from tags on the business object.
- **Deduplicates:** the same OSM object found for two locations is delivered once, and a business mapped twice, as a point and as a building with the same name within 75 m, comes back as one row (the one with more data).
- **Gentle with the public servers:** one Overpass query at a time, it checks the Overpass status page for a free slot before each query, backs off on HTTP 429 and 5xx, and calls Nominatim at most once per second with each name looked up only once per run.

### Use cases

- **Local sales prospecting:** all dentists, physiotherapists or law firms in a city with phone and website.
- **Agency lead lists:** restaurants and cafes without a website are prospects for web design. Restaurants with a website are prospects for online ordering.
- **Market research:** count and map gyms, bakeries or car repair shops per district.
- **Territory planning:** a list of all pharmacies or opticians in a sales region with coordinates.
- **Data enrichment:** match your CRM against OSM IDs, Wikidata IDs, opening hours and websites.

### Input

| Field | Description | Default |
|---|---|---|
| Locations | Place names like `Graz, Austria`, or `relation/34719` | |
| Categories | One or more of 53 business types | |
| OSM tag filters | Like `shop=bicycle`, `craft=*`, `amenity=restaurant&cuisine=pizza` | |
| Only with website | Keep only places with a website | off |
| Only with phone | Keep only places with a phone number | off |
| Only with email | Keep only places with an email | off |
| Max results per location | 1 to 5000 | 100 |
| Center latitude, longitude | Search around a point instead of, or in addition to, the locations | |
| Radius (km) | Around the point, 0.1 to 50 | 2 |
| Only places with a name | Skip places without a name | on |
| Include all OSM tags | Add every tag of the place under `allTags` | off |
| Query timeout | Seconds for one Overpass query, 30 to 180 | 60 |

You need at least one location or a center point, and at least one category or tag filter.

Example, dentists and doctors with a phone number in two cities:

```json
{
  "locations": ["Graz, Austria", "Linz, Austria"],
  "categories": ["dentist", "doctors"],
  "onlyWithPhone": true,
  "maxResultsPerLocation": 200
}
```

Example, bicycle shops and pizza restaurants within 3 km of a point:

```json
{
  "latitude": 48.2082,
  "longitude": 16.3738,
  "radiusKm": 3,
  "tagFilters": ["shop=bicycle", "amenity=restaurant&cuisine=pizza"],
  "maxResultsPerLocation": 100
}
```

### Output

One dataset item per place:

```json
{
  "location": "Leoben, Austria",
  "name": "Café Himml auf Erdn",
  "category": "cafe",
  "osmTag": "amenity=cafe",
  "address": "Franz Josef-Straße 2a, 8700 Leoben",
  "street": "Franz Josef-Straße",
  "housenumber": "2a",
  "postcode": "8700",
  "city": "Leoben",
  "country": "AT",
  "phone": "+43 6643331642",
  "phones": ["+43 6643331642"],
  "website": "https://cafe-himmlauferdn.at/",
  "email": null,
  "openingHours": "08:30-18:30",
  "lat": 47.3822278,
  "lon": 15.0940964,
  "osmType": "node",
  "osmId": 840572455,
  "osmUrl": "https://www.openstreetmap.org/node/840572455",
  "wikidata": null,
  "lastEditedAt": "2026-08-30T10:12:16Z",
  "osmVersion": 12,
  "tags": {
    "amenity": "cafe",
    "cuisine": "cake;coffee_shop;tea",
    "outdoor_seating": "no",
    "addr:suburb": "Leoben"
  },
  "attribution": "© OpenStreetMap contributors, ODbL",
  "attributionUrl": "https://www.openstreetmap.org/copyright",
  "error": null
}
```

- `category` is the category key you picked, or the tag filter that matched. `osmTag` is the OSM tag that made the match.
- `address` joins street, house number, postcode and city. Fields are `null` when the place has no such tag in OSM. `street` falls back to `addr:place` where places have no street name.
- `country` is the `addr:country` tag, or the country of the location Nominatim found. It is `null` for point searches without that tag.
- `phone` is the first number, `phones` all numbers from `phone`, `contact:phone`, `mobile` and `contact:mobile`. Numbers are kept as entered in OSM.
- `website` is the first value of `website`, `contact:website` or `url`. A value without `http` gets `http://` in front.
- `email` comes only from the `email` or `contact:email` tag of the place itself. The Actor does not visit websites to look for addresses.
- `openingHours` is the OSM `opening_hours` value in [OSM syntax](https://wiki.openstreetmap.org/wiki/Key:opening_hours).
- `lat` and `lon` are the point, or the center of a building or area.
- `lastEditedAt` and `osmVersion` show when the object was last changed in OSM. Old dates can mean outdated data.
- `tags` holds selected extra tags like cuisine, brand, operator, wheelchair access and social media links. Turn on Include all OSM tags to get every tag.
- A location that is not found, has no matching places or fails returns one free item with `error` set. An invalid tag filter line also returns a free error item, and the run continues with the valid filters.

The key-value store record `OUTPUT` holds one summary per location: the area Nominatim found, the search scope, places found and delivered, duplicates removed, whether the limit was reached, and errors.

Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Pricing

Pay per place: 0.001 USD per delivered place, so 1.00 USD per 1,000 places. Locations without results, invalid inputs and errors are free. Set Max results per location or the maximum charge in Apify to cap the cost of a run.

Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.

### Limits

- The data is as complete as OpenStreetMap is in your area. Big cities in Europe are well covered. Phone numbers, websites and especially emails are missing for many places.
- Results are not ranked. When the limit cuts a list, the Actor keeps the places Overpass returns first, ordered by OSM ID, which tends to favour older entries.
- Speed depends on the public Overpass server. A city usually takes 5 to 60 seconds. At busy times Overpass answers "at capacity". The Actor then waits and retries 3 times with growing pauses (15, 45, 90 s) and returns a free error item if the server stays busy.
- Whole large countries (bounding box over 1,000,000 km²) are rejected to protect the public server. Use states, regions or cities. Very large regions with common categories can hit the query timeout. Raise it or split the area.
- When Overpass has no area for a place, for example a place mapped only as a point, the Actor searches its bounding box from Nominatim, or 1 km around the point. Such results can include places just outside the boundary.
- Nominatim takes the best match for a name. Add the country or region to avoid places with the same name elsewhere. Check `resolvedName` in the summary.
- Up to 100 locations and 40 OSM tags per run, up to 5000 places per location.

### Data source, permitted use and legal

- **Data source:** [OpenStreetMap](https://www.openstreetmap.org), read through the public [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) at overpass-api.de. Place names are turned into areas with [Nominatim](https://nominatim.org) under its [usage policy](https://operations.osmfoundation.org/policies/nominatim/). This Actor is not affiliated with or endorsed by the OpenStreetMap Foundation or the operators of these services.
- **Licence and attribution:** OpenStreetMap data is © OpenStreetMap contributors and available under the [Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/). Every item carries the attribution "© OpenStreetMap contributors, ODbL" and a link to [openstreetmap.org/copyright](https://www.openstreetmap.org/copyright). When you use or publish the data, you must give this attribution. If you publicly use a database derived from it, you must offer that database under the ODbL as well (share-alike). Read the [OSMF licence page](https://osmfoundation.org/wiki/Licence) for details.
- **Snapshot:** Results show OpenStreetMap at the time of the run. We do not guarantee that they are complete, current or correct. Businesses close, move and change numbers.
- **For business use:** This Actor is offered to businesses only, not to consumers.
- **Personal data and outreach:** Business entries can contain names, phone numbers and emails of sole traders and other natural persons, which is personal data. You choose what to search and decide what happens with the results, so you are the controller and need your own legal basis, for example under the GDPR. Cold email and cold calls are restricted in many countries by anti-spam and unfair competition rules (for example the ePrivacy rules in the EU, § 7 UWG in Germany, § 174 TKG in Austria, PECR in the UK, CAN-SPAM in the US). In the EU, unsolicited marketing email usually needs prior consent, also to businesses in many member states. Check the rules before you contact anyone.
- **Your responsibility:** You choose the locations and filters and decide what happens with the results. If the results contain personal data, you are the controller and need your own legal basis.
- **No circumvention:** The Actor uses public, unauthenticated endpoints only. It does not bypass rate limits, blocks or access restrictions.
- **Request volume:** One Overpass query at a time with a check of the Overpass status page before each query, at most 1 Nominatim request per second with results cached within the run, exponential backoff on HTTP 429 and 5xx, and it stops when the services stay unavailable. Do not use it for bulk geocoding or to put excessive load on these community services.
- **Provider:** forgeloop, Markus Heiss, Austria. [Imprint](https://devhem.github.io/forgeloop-legal/imprint.html), [Privacy Notice](https://devhem.github.io/forgeloop-legal/privacy.html), [Terms of Use](https://devhem.github.io/forgeloop-legal/terms.html).

### Questions and issues

Open an issue on the Actor page.

# Actor input Schema

## `locations` (type: `array`):

City, district or region names, like "Graz, Austria" or "Kreuzberg, Berlin". Add the country to avoid a place with the same name elsewhere. Nominatim turns each name into its OSM boundary. You can also enter an OSM relation like "relation/34719". Whole large countries are rejected. Each location is searched on its own.

## `categories` (type: `array`):

Business types to find. Each maps to one or more OSM tags, shown in brackets. Combine them with free OSM tag filters below.

## `tagFilters` (type: `array`):

Extra OSM tags to search for, one per line. Formats: "shop=bicycle", "craft=\*" (any value), "cuisine=pizza|kebab" (one of several values), "amenity=restaurant\&cuisine=pizza" (all parts must match). See the OSM wiki Map features page for tags.

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

Keep only places with a website, contact:website or url tag.

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

Keep only places with a phone, contact:phone, mobile or contact:mobile tag.

## `onlyWithEmail` (type: `boolean`):

Keep only places with an email or contact:email tag. Few places in OSM have one.

## `maxResultsPerLocation` (type: `integer`):

Stop after this many places per location. Every place is one charged result, so this also caps the cost. 1 to 5000.

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

Search around a point instead of, or in addition to, the locations. Latitude like 47.0707.

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

Longitude of the center point, like 15.4395.

## `radiusKm` (type: `number`):

Radius around the center point in kilometres. 0.1 to 50.

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

Skip places without a name tag. They are rarely useful as leads.

## `includeAllTags` (type: `boolean`):

Add every OSM tag of the place under allTags. Without it, only the tags of interest are kept under tags.

## `queryTimeoutSecs` (type: `integer`):

Time limit for one Overpass query. Overpass runs queries with shorter limits first. Raise it only for large regions. 30 to 180.

## Actor input object example

```json
{
  "locations": [
    "Leoben, Austria"
  ],
  "categories": [
    "cafe",
    "bakery"
  ],
  "onlyWithWebsite": false,
  "onlyWithPhone": false,
  "onlyWithEmail": false,
  "maxResultsPerLocation": 50,
  "radiusKm": 2,
  "onlyNamed": true,
  "includeAllTags": false,
  "queryTimeoutSecs": 60
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "locations": [
        "Leoben, Austria"
    ],
    "categories": [
        "cafe",
        "bakery"
    ],
    "maxResultsPerLocation": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("forgeloop/osm-business-leads").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 = {
    "locations": ["Leoben, Austria"],
    "categories": [
        "cafe",
        "bakery",
    ],
    "maxResultsPerLocation": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("forgeloop/osm-business-leads").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 '{
  "locations": [
    "Leoben, Austria"
  ],
  "categories": [
    "cafe",
    "bakery"
  ],
  "maxResultsPerLocation": 50
}' |
apify call forgeloop/osm-business-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forgeloop/osm-business-leads"
        }
    }
}
```

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/6TVBHJKr7cMVV4zlC/builds/kQrrMaslShb1nWrEa/openapi.json
