Maps Lead API

API Reference

The Lead Scraper API allows you to programmatically find and extract business data from Google Maps. It supports natural language prompts, AI enrichment, and automated lead filtering.

Base URL

http://localhost:8000

Authentication

Authenticate your requests by including your API key in the X-API-Key request header. Keep this key secure.

sk-ygpIWQ35PVcyTlDi0BecTRmNV1tJBv4WS-4x6w

Start Scraping POST /api/scrape

Creates a new scraping job based on a search query or a natural language prompt.

query
string (optional)
The direct search string for Google Maps (e.g. "hotels in Bali").
prompt
string (optional)
Natural language description (e.g. "doctors in Jakarta with rating > 4.5").
max_results
integer (default: 100)
Target number of leads to collect.
filters
object (optional)
Manual override for filters like no_website, min_rating, etc.
cURL
Python
Node.js
PHP
curl -X POST "http://localhost:8000/api/scrape" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Plumbers in Austin",
    "max_results": 50
  }'
import requests

url = "http://localhost:8000/api/scrape"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "query": "Plumbers in Austin",
    "max_results": 50
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const axios = require('axios');

const startScrape = async () => {
  const url = 'http://localhost:8000/api/scrape';
  const config = {
    headers: { 'X-API-Key': 'YOUR_API_KEY' }
  };
  const body = {
    query: 'Plumbers in Austin',
    max_results: 50
  };

  const { data } = await axios.post(url, body, config);
  console.log(data);
};

startScrape();
<?php
$url = "http://localhost:8000/api/scrape";
$headers = [
    "X-API-Key: YOUR_API_KEY",
    "Content-Type: application/json"
];
$data = json_encode([
    "query" => "Plumbers in Austin",
    "max_results" => 50
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
echo $response;

Analyze Prompt POST /api/parse-prompt

Uses AI to extract structured configuration from a natural language string. Useful for pre-validating filters.

cURL
curl -X POST "http://localhost:8000/api/parse-prompt" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"prompt": "unclaimed restaurants in Jakarta"}'

List History GET /api/jobs

Returns a list of recent scraping jobs and their current status.

Copied to clipboard