# OSM Local Business Lead Finder (`hereditary_model/osm-lead-finder`) Actor

Vertical-specific, contact-enriched lead lists from OpenStreetMap instead of Google Maps. No per-listing scraping fees.

- **URL**: https://apify.com/hereditary\_model/osm-lead-finder.md
- **Developed by:** [Aaron Marxsen](https://apify.com/hereditary_model) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 qualified leads

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## OSM Local Business Lead Finder

Same idea as a Google Maps lead scraper — pick a trade, pick a location, get back a deduplicated, contact-enriched, scored lead list — built on OpenStreetMap instead. No Google Maps actor dependency, no per-listing scraping fee baked into your cost.

### What it does

1. Expands your vertical into the OSM tags operators in that trade actually get mapped under (`craft=electrician`, `shop=car_repair`, `office=lawyer`, and so on).
2. Queries OpenStreetMap's Overpass API for matching businesses within your radius of each location.
3. Collapses duplicates — the same shop tagged under two overlapping categories, or picked up at the edge of two adjacent location searches, becomes one row.
4. Optionally visits each business website to pull email addresses and social profiles.
5. Scores every row 0–100 on completeness and contactability, and flags the specific gaps that make a business worth pitching.
6. Drops anything failing your filters **before** billing.

### A note on data quality

OpenStreetMap has no rating or review count — that's the one thing a Google Maps-based scraper has that this doesn't. What it has instead: no cost pass-through for the underlying map data, and often better coverage of small independent trades in areas volunteer mappers have paid attention to. `opportunitySignals` here are about listing completeness (no website, no phone, sparse tagging) rather than reputation.

#### Opportunity signals

- `no_website` — no site listed on the map at all
- `no_phone` — no contact number
- `missing_hours` — no posted hours
- `sparse_listing` — fewer than 4 tags total, usually means a placeholder pin nobody's finished mapping
- `possible_chain` — name suggests a corporate entity, deprioritize for local outreach

### Input

Only `locations` is required, as coordinates — see below for why.

```json
{
  "vertical": "contractors",
  "locations": ["35.5951,-82.5515"],
  "radiusMeters": 6000,
  "maxLeads": 200,
  "enrichContacts": true
}
```

#### Why coordinates instead of a city name

OpenStreetMap's free geocoder (Nominatim) blocks automated traffic from cloud/datacenter IPs outright, including Apify's — it's not a rate limit, it's a standing policy. Rather than ship a step that silently fails on shared infrastructure, this Actor asks for `lat,lon` directly. Right-click any point on openstreetmap.org or Google Maps to copy coordinates in seconds.

### Pricing

Pay per event. You're billed for qualified leads returned and for leads with a resolved email, not for the underlying map query.

### Performance note

Overpass is free, community-run infrastructure. Most queries return in 10–20 seconds; under load they can take noticeably longer or briefly fail. This Actor retries across two independent Overpass endpoints automatically and moves on to the next location rather than failing the whole run.

# Actor input Schema

## `vertical` (type: `string`):

Which kind of business to search for. Ignored if you supply your own OSM tags.

## `customTags` (type: `array`):

Overrides the vertical preset. Each entry is key=value, for example shop=bakery. Uses OpenStreetMap's tagging scheme.

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

Coordinates to search around, one per line, as "lat,lon" — for example 35.5951,-82.5515 for Asheville, NC. Right-click any point on openstreetmap.org or Google Maps to copy coordinates.

## `radiusMeters` (type: `integer`):

How far from each location's center point to search.

## `maxLeads` (type: `integer`):

Hard ceiling on billable rows returned.

## `enrichContacts` (type: `boolean`):

Visits each business site to pull email addresses and social profiles.

## `enrichmentActorId` (type: `string`):

Actor used for website contact extraction.

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

Drop any row that doesn't have a phone number, before billing.

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

Drop any row that doesn't have a website, before billing.

## `requireEmail` (type: `boolean`):

Drop any row that doesn't have an enriched email address, before billing.

## `minQualityScore` (type: `integer`):

0 to 100. Rows below this are dropped and never billed.

## `requesterEmail` (type: `string`):

OpenStreetMap's Overpass service requests a real contact in the request User-Agent for automated access. Used only in that header, never stored or shared.

## Actor input object example

```json
{
  "vertical": "contractors",
  "customTags": [],
  "locations": [
    "35.5951,-82.5515"
  ],
  "radiusMeters": 6000,
  "maxLeads": 200,
  "enrichContacts": true,
  "enrichmentActorId": "vdrmota/contact-info-scraper",
  "requirePhone": false,
  "requireWebsite": false,
  "requireEmail": false,
  "minQualityScore": 0,
  "requesterEmail": ""
}
```

# Actor output Schema

## `leads` (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": [
        "35.5951,-82.5515"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hereditary_model/osm-lead-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 = { "locations": ["35.5951,-82.5515"] }

# Run the Actor and wait for it to finish
run = client.actor("hereditary_model/osm-lead-finder").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": [
    "35.5951,-82.5515"
  ]
}' |
apify call hereditary_model/osm-lead-finder --silent --output-dataset

```

## MCP server setup

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

```

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/jdDkFsMA7krGM9wES/builds/WtX1zRbGyqu39gS1e/openapi.json
