# Build a Lead Generation Agent

A lead generation agent takes a request like _"Marketing directors at French
SaaS companies with 50 to 200 employees"_ and returns a list of matching people
with verified professional emails. Evaboot provides every step: building the
Sales Navigator search, extracting the leads, and finding their emails.

## How it works

1. **Describe the audience.** The search builder maps the description onto real
   Sales Navigator filters (title, seniority, industry, headcount, region,
   revenue) and returns a search URL.
2. **Check the budget.** Your quota and credit balance tell you how many leads
   you can export today.
3. **Export the search.** Evaboot extracts every lead behind the URL and finds a
   verified email for each one where it exists.
4. **Use the results.** Read them from the API, send them to a connected CRM, or
   hand them back to the user.

## With an AI assistant (MCP)

Connect your assistant to `https://mcp.evaboot.com/mcp`. The **MCP** page of the
Evaboot app gives the steps for each assistant (also on the
[MCP Server](/mcp-server) page):

![The MCP page in the Evaboot app, with Claude selected](/use-cases/mcp-connect.png)

Then ask in plain language:

> "Find 100 marketing directors at French SaaS companies with 50 to 200
> employees and export them with emails."

The assistant chains the tools itself:

| Step | Tool |
| --- | --- |
| Build the search | `build_sn_search_from_prompt` |
| Check quota and credits | `get_daily_export_quota` |
| Export the leads | `export_sn_search_or_list` with `max_results` |
| Wait for results | `get_export` |
| Send them to a CRM | `push_export` |

Nothing else to deploy. This works in Claude, ChatGPT, Grok, Cursor and any
MCP client.

## With the API

The same flow from your own code. Every request takes
`Authorization: Bearer YOUR_API_KEY`.

```python
import time
import requests

API = "https://api.evaboot.com/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

# 1. Description to Sales Navigator search URL (free, synchronous)
search = requests.post(
    f"{API}/search-builder/",
    headers=HEADERS,
    json={
        "description": "Marketing directors at French SaaS companies, 50-200 employees",
        "search_type": "LEAD",
    },
).json()
print(search["filters_used"])

# 2. Launch the extraction (1 credit per lead, email included)
job = requests.post(
    f"{API}/extractions/url/",
    headers=HEADERS,
    json={"linkedin_url": search["url"], "search_name": "FR SaaS marketing directors"},
).json()

# 3. Poll until done: 202 while running, 200 when finished
while True:
    r = requests.get(f"{API}/extractions/{job['extraction_id']}/", headers=HEADERS)
    if r.status_code == 200:
        break
    time.sleep(30)

leads = r.json()["prospects"]
```

Instead of polling, pass a `webhook_url` to `POST /v1/extractions/url/` and
Evaboot POSTs the same results to it when the export finishes.

## Tips

- **Be specific in the description.** Title, seniority, industry, headcount,
  location and revenue all map to filters. `filters_used` shows what was
  understood, so you can check it before spending credits.
- **One export returns at most 2,500 leads** (1,000 companies), a Sales
  Navigator limit. Through MCP, the agent can split a larger audience into
  several searches after asking you.
- **Already have a list?** Skip the search builder and pass a lead or account
  list URL straight to the extraction.

Next: keep the list fresh automatically with an
[Automated Lead Engine](/use-cases/automated-lead-engine).
