> ## Documentation Index
> Fetch the complete documentation index at: https://docs.databar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrich a list of leads

> Pull company data, emails, and phone numbers for a batch of leads using the Databar API.

This walkthrough shows how to take a list of leads (names + companies) and enrich them with contact information using the Databar API.

## What you will do

1. Search for an enrichment that finds emails by name and company
2. Run it in bulk for your entire list
3. Poll for results

## Prerequisites

* A Databar API key ([get one here](https://databar.ai))
* A list of leads with at least a name and company

## Step 1: Find the right enrichment

Search for enrichments that match your use case:

```bash theme={null}
curl "https://api.databar.ai/v1/enrichments/?q=email%20finder" \
  -H "x-apikey: YOUR_API_KEY"
```

Look through the results for an enrichment that accepts `name` and `company` (or similar) as input parameters. Note the `id` and check the `price` field.

<Info>
  Use [Get enrichment details](/api-reference/endpoint/enrichments-get) to see all required and optional parameters before running.
</Info>

## Step 2: Run in bulk

Once you have the enrichment ID, run it against your full list:

```bash theme={null}
curl -X POST "https://api.databar.ai/v1/enrichments/ENRICHMENT_ID/bulk-run" \
  -H "x-apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "params": [
      {"full_name": "Sarah Chen", "company": "Stripe"},
      {"full_name": "James Lee", "company": "Notion"},
      {"full_name": "Maria Garcia", "company": "Figma"}
    ]
  }'
```

You will receive a `task_id` in the response.

## Step 3: Poll for results

Check the task status until it completes:

```bash theme={null}
curl "https://api.databar.ai/v1/tasks/YOUR_TASK_ID" \
  -H "x-apikey: YOUR_API_KEY"
```

When `status` is `completed`, the `data` field contains your enriched results with emails, phone numbers, LinkedIn profiles, and other fields depending on the provider.

<Warning>
  Task data is stored for **24 hours**. Make sure to retrieve and save your results before they expire.
</Warning>

## With the Python SDK

The SDK handles polling automatically:

```python theme={null}
from databar import DatabarClient

client = DatabarClient()

leads = [
    {"full_name": "Sarah Chen", "company": "Stripe"},
    {"full_name": "James Lee", "company": "Notion"},
    {"full_name": "Maria Garcia", "company": "Figma"},
]

results = client.run_enrichment_bulk_sync(ENRICHMENT_ID, leads)
for r in results:
    print(r)
```

## Next steps

<CardGroup cols={2}>
  <Card title="Waterfall email finder" icon="water" href="/guides/waterfall-email-finder">
    Maximize email coverage by trying multiple providers.
  </Card>

  <Card title="Table enrichment pipeline" icon="table" href="/guides/table-enrichment-pipeline">
    Store and enrich data in a Databar table for ongoing workflows.
  </Card>
</CardGroup>
