# Local Business Leads — Google Maps Alternative (OpenStreetMap) (`codepal/local-business-leads-osm`) Actor

Find businesses by type and place like on Google Maps: name, category, address, coordinates, phone, website, opening hours, plus emails and social links from their websites. Open data, no proxies, no login.

- **URL**: https://apify.com/codepal/local-business-leads-osm.md
- **Developed by:** [Jared Keanche](https://apify.com/codepal) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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 Leads — Google Maps Alternative (OpenStreetMap)

Find businesses by **type and place**, just like searching Google Maps: "dentist in Nairobi", "hotel in Lisbon", "plumber in Austin". You get name, category, full address, coordinates, phone, website, opening hours and a lead score. It can also visit each business website to add **emails and social profiles**.

Built on OpenStreetMap open data: **no proxies, no login, no blocking**, and you may reuse the data commercially with attribution.

### What you get per place

`title, categoryName, categories, address, street, neighborhood, city, postalCode, state, countryCode, location {lat, lng}, phone, phoneUnformatted, website, email, emails[], phones[], facebook, instagram, linkedin, twitter, socials{}, openingHours[{day, hours}], openingHoursRaw, leadScore, rank, url (OpenStreetMap), googleMapsUrl, placeId, brand, cuisine, wheelchairAccessible`

Field names match the most popular Google Maps scrapers, so existing sheets, CRMs and Zapier/Make flows work unchanged.

### How to use

1. **Search terms:** `restaurant`, `pharmacy`, `car repair`, or a name like `Java House`. 150+ common categories are recognised; anything else is searched by name.
2. **Location:** a city, district or country. Or use coordinates + radius, or a bounding box.
3. Click **Start** and export to Excel, CSV, JSON, Google Sheets or your CRM.

### Why choose it

- **Fast and reliable:** open APIs with automatic failover across several servers; large areas are split into tiles automatically.
- **Best leads first:** places with a phone, website and opening hours are ranked to the top.
- **Emails included:** contact and about pages are read, emails on the business's own domain are ranked first, and share buttons and junk are filtered out.
- **Low cost:** no browser and no residential proxies.

### Pricing

| Event | Price |
|---|---|
| Place saved | $0.001 ($1 per 1,000) |
| Website checked for emails & socials (only when reachable) | $0.002 |

### Good to know

- OpenStreetMap has no reviews, star ratings or photos. Coverage is excellent in Europe and most cities, and growing elsewhere.
- Please keep the `attribution` field ("© OpenStreetMap contributors, ODbL") when you publish the data.
- Contact data is collected from public business websites. Follow GDPR, the Kenya Data Protection Act and anti-spam laws when you use it for outreach.

# Actor input Schema

## `searchStringsArray` (type: `array`):

Business types or names, e.g. <code>restaurant</code>, <code>dentist</code>, <code>hardware store</code>, <code>Java House</code>. 150+ common categories are matched to OpenStreetMap tags; anything else is searched by name.

## `locationQuery` (type: `string`):

City, district, county or country, e.g. <code>Westlands, Nairobi, Kenya</code> or <code>Berlin, Germany</code>. Searches the whole administrative area.

## `maxCrawledPlacesPerSearch` (type: `integer`):

The most complete listings (with phone, website, hours) come first. 0 = no limit.

## `scrapeContacts` (type: `boolean`):

Visits each business's website (home page + up to 2 contact/about pages) and adds emails, extra phone numbers and Facebook, Instagram, LinkedIn, X, YouTube, TikTok and WhatsApp links.

## `skipClosedPlaces` (type: `boolean`):

Leave out places marked as disused, abandoned or closed.

## `requireWebsite` (type: `boolean`):

Useful for web-design, SEO and digital-marketing outreach.

## `requirePhone` (type: `boolean`):

Useful for call and SMS/WhatsApp campaigns.

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

Optional. Search a circle around the location's centre instead of the whole administrative area. Also used with custom coordinates (default 5 km).

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

Optional centre point, e.g. <code>-1.2864</code>. Use with Longitude and Radius.

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

Optional centre point, e.g. <code>36.8172</code>.

## `boundingBox` (type: `string`):

Optional rectangle <code>south,west,north,east</code>, e.g. <code>-1.33,36.70,-1.20,36.95</code>. Overrides other area settings.

## `maxPagesPerSite` (type: `integer`):

Website pages read per business when finding contacts.

## `includeRawTags` (type: `boolean`):

Adds the raw <code>osmTags</code> object (cuisine, payment methods, accessibility, brand IDs and more).

## `overpassUrls` (type: `array`):

Optional. Your own Overpass endpoints. By default several public servers are used with automatic failover.

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

Not needed in most cases: map data comes from open APIs and business websites rarely block. Turn on only if many websites show as unreachable.

## Actor input object example

```json
{
  "searchStringsArray": [
    "restaurant"
  ],
  "locationQuery": "Nairobi, Kenya",
  "maxCrawledPlacesPerSearch": 50,
  "scrapeContacts": true,
  "skipClosedPlaces": true,
  "requireWebsite": false,
  "requirePhone": false,
  "maxPagesPerSite": 3,
  "includeRawTags": false,
  "overpassUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `leads` (type: `string`):

One row per business: name, category, address, coordinates, phone, website, emails, social profiles, opening hours, lead score.

## `summary` (type: `string`):

Places found per search term, filters applied, contact-enrichment results and data attribution.

# 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 = {
    "searchStringsArray": [
        "restaurant"
    ],
    "locationQuery": "Nairobi, Kenya",
    "maxCrawledPlacesPerSearch": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("codepal/local-business-leads-osm").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 = {
    "searchStringsArray": ["restaurant"],
    "locationQuery": "Nairobi, Kenya",
    "maxCrawledPlacesPerSearch": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("codepal/local-business-leads-osm").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 '{
  "searchStringsArray": [
    "restaurant"
  ],
  "locationQuery": "Nairobi, Kenya",
  "maxCrawledPlacesPerSearch": 50
}' |
apify call codepal/local-business-leads-osm --silent --output-dataset

```

## MCP server setup

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

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/JL0Q0I4sCq0w6H7HI/builds/4748nv1JRHzXvM6Dx/openapi.json
