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

> ## Agent Instructions
> Forager is a REST API for B2B people, company and job post data: contact lookups (phone numbers, personal emails, work emails), person, company and job post search, and bulk data feeds.
> Server: https://api-v2.forager.ai. Send the API key in the X-API-KEY header. Most paths include {account_id}. Read FORAGER_API_KEY and FORAGER_ACCOUNT_ID from the environment; never put the key in client-side code, logs or prompts.
> To add Forager to a project, follow https://www.forager.ai/docs/guides/agent-quickstart.md. To pick an endpoint, read https://www.forager.ai/docs/guides/choose-an-endpoint.md. For end-to-end builds, see https://www.forager.ai/docs/recipes/overview.md.
> Most requests spend credits. Do not guess costs; use https://www.forager.ai/docs/api-overview/credit-pricing.md and ask the user before spending credits.
> Use only endpoints and fields defined in https://www.forager.ai/docs/openapi.yaml. Forager has no MCP server for the API yet; the /mcp endpoint on this site searches the documentation only.

# Bulk work email lookup

> Find work emails for many people at once with the v2 asynchronous bulk lookup: submit a batch, then poll or use a webhook.

![Bulk work email lookup: submit a batch, poll until it completes, then read the results](https://mintcdn.com/forager/EGsWCxLOYv1Cb__c/images/illustrations/bulk-work-email-lookup-polling.svg?fit=max\&auto=format\&n=EGsWCxLOYv1Cb__c\&q=85\&s=deb39fe9ba7a99b0d3e0065d3e9f25b0)

Use the bulk endpoint for enrichment runs. The single lookup is rate limited for interactive use.

## How it works

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
sequenceDiagram
  participant App as Your app
  participant F as Forager API
  App->>F: POST bulk lookup (email_lookups, optional webhook_url)
  F-->>App: 202 batch_id, status_check_url
  loop until status is completed or failed
    App->>F: GET batch (free)
    F-->>App: status, results empty until completed
  end
  opt webhook_url was sent
    F--)App: POST results to webhook_url
  end
```

1. Submit a batch to [Bulk work email lookup](https://www.forager.ai/docs/openapi/work-emails/v2_datastorage_person_contacts_lookup_work_emails_bulk_create.md). You get back a `batch_id` and a `status_check_url`.
2. Poll [Bulk work email lookup status and results](https://www.forager.ai/docs/openapi/work-emails/v2_datastorage_person_contacts_lookup_work_emails_bulk_retrieve.md) until `status` is `completed`. Until then `results` is empty.
3. When complete, `results` holds one result per submitted lookup, in the order you submitted them.

Polling is free. Items already answered by Forager's cache are resolved immediately. Duplicates in the request collapse into one lookup. Your credit balance must cover the whole batch, otherwise the batch is rejected and nothing is charged.

## Submit a batch

Each item identifies a person in one of two ways:

* `first_name`, `last_name` and `domain` (a company domain such as `acme.com`), or
* `linkedin_public_identifier` alone.

Sending a domain and a LinkedIn identifier in the same item is refused.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api-v2.forager.ai/api/v2/$FORAGER_ACCOUNT_ID/datastorage/person_contacts_lookup/work_emails/bulk/" \
     -H "X-API-KEY: $FORAGER_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
           "email_lookups": [
             {"first_name": "John", "last_name": "Doe", "domain": "acme.com"},
             {"linkedin_public_identifier": "billgates"}
           ]
         }'
```

Set `FORAGER_API_KEY` and `FORAGER_ACCOUNT_ID` in your shell first, as in the [quickstart](https://www.forager.ai/docs/api-overview/send-your-first-request.md). See [Authentication](https://www.forager.ai/docs/api-overview/authentication.md).

## Poll the batch

Set `BATCH_ID` to the `batch_id` from the submit response, then poll:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
BATCH_ID="your-batch-id"

curl -X GET "https://api-v2.forager.ai/api/v2/$FORAGER_ACCOUNT_ID/datastorage/person_contacts_lookup/work_emails/bulk/$BATCH_ID/" \
     -H "X-API-KEY: $FORAGER_API_KEY"
```

## Skip polling with a webhook

Add an optional `webhook_url` (https) to the request body and Forager POSTs the results there when the batch completes. Put any secret used to authenticate the callback in the URL query string; it is never returned by the poll endpoints or written to logs.

## Single lookups

For one person, use [Single work email lookup](https://www.forager.ai/docs/openapi/work-emails/v2_datastorage_person_contacts_lookup_work_emails_create.md) and poll [Single work email lookup result](https://www.forager.ai/docs/openapi/work-emails/v2_datastorage_person_contacts_lookup_work_emails_retrieve.md). A work email lookup, single or in a batch, costs 5 credits, charged only when an address is found. See [API credits and pricing](https://www.forager.ai/docs/api-overview/credit-pricing.md).

See also [Errors and rate limits](https://www.forager.ai/docs/errors-and-rate-limits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.