API reference / Email verification
Look up an email domain
Written and maintained by The ProspectAPIs team
GET/v1/email/domain/:domain
GET /v1/email/domain/:domain is the ProspectAPIs operation emailDomain, in the Email verification group of the REST API. What DNS, our lists and our own recent checks know about a domain; no mail server is contacted. Free, 300 lookups an hour per account. Cost: free, 300 an hour per account. Send your API key as a Bearer token in the Authorization header.
How this fits with the rest of the email verification API, with worked examples, is in the email verification guide.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| domain required | path | string |
Responses
| Status | Meaning |
|---|---|
| 200 | The domain. |
| 400 | The request was invalid (e.g. a bad filter or input); nothing was charged. |
| 401 | The API key is missing or invalid. |
| 429 | 300 lookups an hour reached; Retry-After. |
Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.
200 response fields
The domain. The body is a EmailDomainInfo.
| Field | Type | Description |
|---|---|---|
| domain | string | |
| exists | boolean or null | |
| accepts_mail | boolean or null | |
| null_mx | boolean | |
| mx | array of object | |
| mx[].preference | integer or null | |
| mx[].host | string | |
| mail_provider | string or null | |
| spf | boolean or null | |
| dmarc | string or null: reject, quarantine, none, missing, | |
| disposable | boolean | |
| free_provider | boolean | |
| parked | boolean | |
| catch_all | boolean or null | Measured by our own check recently, else null; never guessed. |
| catch_all_checked_at | string or null | |
| domain_age_days | integer or null | |
| new_domain | boolean | |
| did_you_mean | string or null | |
| dns_answered | boolean | |
| checked_at | string (date-time) |
Code samples
Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.
curl https://api.prospectapis.com/v1/email/domain/acme.com \
-H "Authorization: Bearer $PROSPECTAPIS_KEY"const res = await fetch("https://api.prospectapis.com/v1/email/domain/acme.com", {
headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);import os, requests
res = requests.get(
"https://api.prospectapis.com/v1/email/domain/acme.com",
headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)Billing
This call is free: it never spends credits, so you can call it as often as the rate limit allows. Metered calls on the same key report your balance after each response in X-Credits-Remaining, and GET /v1/account shows it at any time.
Related
The email verification guide covers this area end to end. Previous operation: Find an email address. Next operation: What a score means. Every operation, grouped by area, is on the API reference index.
Create a free account to get a key, then run the samples above with your own values.
Was this page helpful?