A ready-to-use lead scraper that extracts local business data from Google Maps using browser-use and the Kernel platform.
This template creates an AI-powered web scraper that:
- Navigates to Google Maps
- Searches for businesses by type and location
- Scrolls through results to load more listings
- Extracts structured lead data (name, phone, address, website, rating, reviews)
- Returns clean JSON ready for your CRM or outreach tools
uv synccp .env.example .env
# Edit .env and add your OpenAI API keykernel deploy main.py -e OPENAI_API_KEY=$OPENAI_API_KEYkernel run lead-scraper scrape-leads \
--data '{"query": "restaurants", "location": "Austin, TX", "max_results": 10}'Input Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string | ✅ | - | Business type to search (e.g., "plumbers", "gyms") |
location |
string | ✅ | - | Geographic location (e.g., "Miami, FL") |
max_results |
integer | ❌ | 20 | Maximum leads to scrape (1-50) |
Example Output:
{
"leads": [
{
"name": "Joe's Pizza",
"phone": "(512) 555-0123",
"address": "123 Main St, Austin, TX 78701",
"website": "https://joespizza.com",
"rating": 4.5,
"review_count": 234,
"category": "Pizza restaurant"
}
],
"total_found": 1,
"query": "pizza restaurants",
"location": "Austin, TX"
}- Sales Teams: Build targeted prospect lists for cold outreach
- Marketing Agencies: Find local businesses needing marketing services
- Service Providers: Identify potential B2B clients in your area
- Market Research: Analyze competitor density and ratings by location
Edit the SCRAPER_PROMPT in main.py to customize what data the AI extracts:
SCRAPER_PROMPT = """
Navigate to Google Maps and search for {query} in {location}.
# Add your custom extraction instructions here
"""- Update
BusinessLeadmodel inmodels.py - Modify the prompt to extract the new fields
- Redeploy with
kernel deploy main.py
| Issue | Solution |
|---|---|
| No results found | Try a broader search query or different location |
| Timeout errors | Reduce max_results or check your network |
| Rate limiting | Add delays between requests in production |