# Local Gap Leads Actor (`fine_lingo/local-gap-leads-actor`) Actor

LocalGap is an Apify Actor and promotional platform designed for agencies to scrape, analyze, and surface high-intent local business leads. It evaluates local market presence, scoring gaps in competitor visibility and digital footprint to turn raw scraping data into actionable client opportunities.

- **URL**: https://apify.com/fine_lingo/local-gap-leads-actor.md
- **Developed by:** [Nick Davies](https://apify.com/fine_lingo) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## LocalGap Business Lead Finder (Apify Actor)

An Apify-ready actor that discovers local businesses using OpenStreetMap's Nominatim geocoder and Overpass API, then adds heuristic digital-opportunity scores.

### Input

- `location` (required): city, state, country, ZIP code, or place.
- `category`: `all`, `restaurant`, `plumber`, `dentist`, `electrician`, `beauty`, `auto`, `gym`, or `real_estate`.
- `radiusKm`: 1–50; defaults to 10.
- `maxResults`: 1–2000; defaults to 300.
- `includeRawTags`: include raw OSM tags in each output record.

### Output

The actor writes one JSON record per business to the default dataset. Fields include business name, category, address, phone, email, website, social links when listed in OSM, coordinates, source URL, digital gaps, and an opportunity score from 0 to 100. A run summary is saved as the `OUTPUT` key-value-store record.

### Import into Apify

1. Download and unzip `localgap-apify-actor.zip`.
2. In Apify Console, create a new Actor.
3. Choose **Develop locally** / upload source (or use the Apify CLI to push this folder).
4. Upload the contents of this folder, including the `.actor` directory, `src`, `package.json`, and `Dockerfile`.
5. Build the Actor.
6. Open **Input**, enter a location such as `Corona, California, USA`, choose a category and run.

#### Apify CLI alternative

Install the Apify CLI, authenticate with `apify login`, then run `apify push` from this project directory.

### Important limitations

- Data comes from OpenStreetMap, not a commercial business directory. Coverage and contact fields vary significantly by location.
- An absent website/email/social field means OSM did not provide it; it does not prove the business lacks that feature.
- The score is a prioritization heuristic, not a verified quality or purchase-intent score.
- This actor does not scrape private data, bypass access controls, or guarantee email discovery.
- Nominatim and Overpass are public community services with usage policies and rate limits. Avoid high-frequency or very large concurrent runs. For production scale, use a contracted geocoding/business-data provider or a self-hosted OSM/Overpass stack.
- Verify business details and comply with applicable privacy, telemarketing, and email-marketing rules before outreach.

### Local test

Requires Node.js 20+:

```bash
npm install
## Provide an Apify input JSON via the Apify platform, or run in an Apify local environment.
npm start
```

# Actor input Schema

## `searchQueries` (type: `array`):

Niche keywords for lead discovery.

## `maxResultsPerQuery` (type: `integer`):

Keep this low for automated testing to avoid timeouts.

## Actor input object example

```json
{
  "searchQueries": [
    "coffee shops in austin tx"
  ],
  "maxResultsPerQuery": 5
}
```

# Actor output Schema

## `datasetId` (type: `string`):

ID of the dataset containing lead results.

# 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 = {
    "searchQueries": [
        "coffee shops in austin tx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fine_lingo/local-gap-leads-actor").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 = { "searchQueries": ["coffee shops in austin tx"] }

# Run the Actor and wait for it to finish
run = client.actor("fine_lingo/local-gap-leads-actor").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 '{
  "searchQueries": [
    "coffee shops in austin tx"
  ]
}' |
apify call fine_lingo/local-gap-leads-actor --silent --output-dataset

```

## MCP server setup

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

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/v7hMyFgV1dS8IAp8g/builds/mtmkj9dL3aFdE7BfW/openapi.json
