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

# Website Email Extractor API

> Finds every email address a company publishes on its website (contact, press and team pages), with the page each was found on.

`POST /v1/data/email/role/run`

**Pricing:** $0.0095 per email ($9.50 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**domains** `string[]` *required*

Company website domains to read, without https\:// (for example stripe.com or basecamp.com). Each domain returns one row per email address found on its site.

**maxResults** `integer` (default: 50)

How many email addresses to return in total. Defaults to 50; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/email/role/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "domains": [
      "wikimediafoundation.org",
      "plausible.io",
      "ghost.org"
    ]
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/email/role/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "domains": [
        "wikimediafoundation.org",
        "plausible.io",
        "ghost.org"
    ]
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/email/role/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "domains": [
    "wikimediafoundation.org",
    "plausible.io",
    "ghost.org"
  ]
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one email, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `domain` | Domain | text |
| `email` | Email | text |
| `emailDomain` | Email Domain | text |
| `foundOn` | Found On | url |
| `foundAs` | Found As | text |
| `label` | Label | text |
| `siteName` | Site Name | text |
| `website` | Website | url |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "email/role",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "email": "hello@ghost.org",
      "website": "https://ghost.org/",
      "foundOn": "https://ghost.org/privacy/",
      "siteName": "Ghost - The Professional Publishing Platform",
      "emailDomain": "ghost.org",
      "foundAs": "mailto",
      "label": null,
      "domain": "ghost.org"
    }
  ]
}
```

## Related APIs

For named people at the company use [`companies/emails`](https://docs.mindcase.co/apis/companies/emails); for phones and social links the site publishes use [`leads/contacts`](https://docs.mindcase.co/apis/leads/contacts); to check deliverability use [`email/verify`](https://docs.mindcase.co/apis/email/verify).


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