B2B lead generation API for Google Maps and LinkedIn leads
Find local businesses on Google Maps and decision makers on LinkedIn, add their emails and verify them, from an agent over MCP or one API call.
Build lead lists from your own code or from an AI agent. Search Google Maps for local businesses, find companies and people on LinkedIn, pull emails and phones from their websites, and check every address before you send. Each step is a data tool with JSON in, JSON out and a price per result, paid from the same prepaid key as your models. Selling to local businesses? Start with the Google Maps leads scraper. Selling to companies? Start with LinkedIn for B2B lead generation.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Build a B2B lead list for me: find businesses on Google Maps and decision makers on LinkedIn, add their emails and verify them. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the industry, the location, the roles you want and the columns of the CSV>How it works
Pick a source
For local businesses, Google Maps leads returns places together with the emails, phones and social links found on their websites, in one run. For companies and people, use LinkedIn company search, LinkedIn people search or LinkedIn company employees.
Run it with a cap
Send the tool's
inputand amax_resultscap toPOST /v1/tools/{id}/run. The cap sets the most the run can cost before it starts.Enrich and verify
Send websites to website contacts, LinkedIn profile URLs to the email finder, and every address to email verification.
Scrape Google Maps leads with one request
This run finds dental practices in Miami that have a website, and reads each website for contact details:
curl https://lovelyrouter.com/v1/tools/google-maps-leads/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"searchTerms": ["dentist", "dental clinic"],
"location": "Miami, FL, USA",
"maxResults": 100,
"websiteFilter": "withWebsite"
},
"max_results": 100
}'The response has the run's status, its cost in charge_usd, and the businesses in items: each a Google Maps place with the emails, phones and social links found on its website. websiteFilter keeps only places withWebsite, or only those withoutWebsite if you sell websites. A run still going after 60 seconds returns 202 and a poll path; Run a tool shows the loop.
Tip
A nearby search finds about 60 places per search term. To cover a broad category, pass several related terms in searchTerms: the results are merged and deduplicated, and max_results covers them all.
Let your agent build the list
Connect the MCP server to Claude Code:
claude mcp add --transport http lovely-tools https://lovelyrouter.com/mcp \
--header "Authorization: Bearer $LOVELY_API_KEY"Then ask: "Find dental clinics in Miami that have a website. Get their emails, verify every address, and give me a CSV with name, website, email and verification result. Plan with suggest_tools first, set max_results on every run, and show me the estimated cost before you start."
The tools
Local businesses from Google Maps plus the emails, phones and social links found on their websites. Built for local lead lists.
Find local businesses on Google Maps by keyword and location: name, address, phone, website, rating, review count, opening hours, coordinates.
Crawl websites and extract emails, phone numbers and social profile links. One result = one website (up to 5 of its pages crawled, contacts merged).
Search LinkedIn companies by keyword, location and size: name, industry, size, URL.
LinkedIn company pages: description, industry, size, headquarters, website, followers.
Employees of LinkedIn companies, filterable by job title, location and keyword: name, headline, position, profile URL.
Search LinkedIn people by keyword, location, company and title. One call returns up to 25 short profiles.
Work email address for LinkedIn profile URLs.
Check whether email addresses are deliverable: syntax, domain, MX records and mailbox status.
| Tool | Main inputs | What comes back |
|---|---|---|
google-maps-leads | searchTerms, location, radius, websiteFilter | Businesses plus the emails, phones and social links on their websites |
google-maps-places | searchTerms, location, minRating, openNow | Name, address, phone, website, rating, review count, opening hours, coordinates |
website-contacts | startUrls, maxDepth, sameDomain | Emails, phone numbers and social profile links, merged per website (up to 5 pages each) |
linkedin-company-search | searchQuery, locations, companySize | Name, industry, size, LinkedIn URL |
linkedin-company | companies (URLs) or searches (names) | Description, industry, size, headquarters, website, followers |
linkedin-company-employees | companies, jobTitles, locations | Name, headline, position, profile URL |
linkedin-people-search | searchQuery, locations, currentCompanies, currentJobTitles | Up to 25 short profiles per call |
linkedin-email-finder | linkedinUrls | The work email for each profile |
email-verify | emails | Syntax, domain, MX records and mailbox status |
Recipes
Run google-maps-places with "minRating": 4.5, then pass each place's website to website-contacts as startUrls with "maxDepth": 1.
Run linkedin-company-search with "searchQuery": "fintech", "locations": ["United Kingdom"] and "companySize": ["11-50"]. Feed the company URLs to linkedin-company-employees with "jobTitles": ["Head of Growth"], then the profile URLs to linkedin-email-finder. Write "United Kingdom", not "UK": LinkedIn can read "UK" as Ukraine.
One linkedin-people-search call with "searchQuery": "founder" and "locations": ["San Francisco"] returns up to 25 profiles and is billed once, per call.
Send them to linkedin-company as searches to get each company's industry, size, headquarters and website.
Use the data responsibly
Lead tools return public business information, and some of it is personal data: names, job titles, work emails. You are responsible for using it lawfully, including having a lawful basis under privacy laws such as the GDPR and CCPA, honoring people's requests, and not sending unsolicited bulk messages. Read the Acceptable Use Policy before you build an outreach list.
What you pay
Each tool has a per-result fee, a per-call fee, or both; the cards above show today's prices. Most lead tools bill per place, company, profile, website or email. People search bills per call, and one call returns up to 25 profiles. Starting a run holds its maximum cost, the per-call fee plus the per-result fee times max_results, and settles to what it returned. A run that fails pays only for the results it delivered before it ended, so a failed run with no results costs nothing. There is no subscription: you top up one prepaid balance that also pays for models. See pricing.
Frequently asked questions
Can I get emails from Google Maps listings?+
Yes. The google-maps-leads tool finds businesses on Google Maps and reads their websites for emails, phones and social links in the same run. To enrich places you already have, send their websites to the website-contacts tool, which works as a lead enrichment API.
How many leads can one Google Maps run return?+
Up to the max_results cap you set, at most 200 places per run. A nearby search finds about 60 places per search term, so pass several related terms to cover a broad category.
How do I check that an email address is real?+
Run the email-verify tool on your list. It checks each address's syntax, domain, MX records and mailbox status, and bills per email.
Can my AI agent build a lead list on its own?+
Yes. Connect the MCP server to Claude Code, Cursor or another MCP client, and the agent plans with suggest_tools, reads input schemas with get_tool and runs tools with run_tool. Give it an API key with a spend limit so a run that would go past it is refused before anything is charged.
Is collecting leads this way legal?+
That depends on where you and the people in your list are and how you use the data. You are responsible for using results lawfully, and the Acceptable Use Policy sets out what the tools may not be used for.
Next, see social listening to hear what prospects talk about, recruiting data for hiring signals, or Find the right tool to plan a multi-step job with costs.