Skip to main content

Identify Email Type API

Written by Kadri - RichAPI Support Team

POST /identify_email_type • Credits: 0.5 credits per call

The Identify Email Type API classifies one email address without a network lookup. Send a POST request with the address in the email parameter. The response names the mailbox provider, gives a guessed name, and sets three type flags: is_likely_personal_email, is_likely_company_email and is_likely_education_email. Each call costs 0.5 credits.

What does the Identify Email Type API do?

The Identify Email Type API answers one question about an email address: which kind of mailbox does the domain run? It answers that question before you spend a credit on a deliverability check. RichAPI runs the classification locally against two fixed lists. The first list holds 168 personal mailbox domains, from Gmail and Outlook to national ISPs and throwaway mail hosts. The second list holds 20 education top-level domains, such as .edu and .ac.uk. A domain that matches neither list counts as a company domain. The API sends no SMTP probe and no DNS query.

Which endpoint does the Identify Email Type API use?

  • Method: POST

  • URL: https://api.richapi.ai/api/v1/identify_email_type

  • Authentication: x-api-key header

  • Response: Synchronous JSON

  • Credits: 0.5 credits per call

How to send an Identify Email Type request

  1. Copy your API key from the RichAPI dashboard.

  2. Set the email parameter to the address that you want to classify.

  3. Send a POST request to https://api.richapi.ai/api/v1/identify_email_type.

  4. Send the API key in the x-api-key header.

  5. Set the Content-Type header to application/json.

  6. Read the three type flags from the response.

  7. Route the address with the type table in this article.

cURL

curl -X POST https://api.richapi.ai/api/v1/identify_email_type   
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"email": "[email protected]"
}'

Python

import requests

response = requests.post(
"https://api.richapi.ai/api/v1/identify_email_type",
headers={"x-api-key": "YOUR_API_KEY"},
json={"email": "[email protected]"},
timeout=60,
)
response.raise_for_status()
print(response.json())

Node.js

const response = await fetch("https://api.richapi.ai/api/v1/identify_email_type", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "[email protected]",
}),
});

const data = await response.json();
console.log(data);

Which parameters does the Identify Email Type API accept?

Parameter

Type

Required

Default

Description

email

string

Yes

""

The email address to classify, for example [email protected].

The Identify Email Type API accepts one parameter. It classifies one address per call.

Which email types does the Identify Email Type API return?

The Identify Email Type API returns three type flags. Each flag is a boolean. The table names the rule that sets each flag to true.

Type flag

What triggers it

Example address

is_likely_personal_email

The domain matches one of the 168 domains in the personal mailbox list. The list holds the six named providers, general webmail hosts, national ISPs, and 10 throwaway mail hosts.

is_likely_education_email

The domain ends with one of the 20 education top-level domains, such as .edu, .ac.uk, .edu.au and .ac.in.

is_likely_company_email

The domain is in neither list. This flag is the fallback, and it needs no match.

Exactly one of the three flags is true in every response. No domain in the personal list ends with an education top-level domain, so the two list tests never both pass.

CAUTION: The classification reads the domain only. A company domain that a person uses for private mail still returns is_likely_company_email: true.

Which email types does the API not return?

The Identify Email Type API returns no role-based flag and no disposable flag.

  • A role address such as [email protected] returns is_likely_company_email: true, because acme.com is in neither list. Test the username field yourself against your own list of role names.

  • The 10 throwaway mail domains, such as mailinator.com and yopmail.com, sit inside the personal list. So [email protected] returns is_likely_personal_email: true and email_provider: "Other". For a dedicated disposable-domain flag, use the Email Verifier API, which returns a disposable field.

Which providers does the Identify Email Type API name?

The email_provider field holds one of eight values. RichAPI tests the six named provider lists first. It tests the education top-level domains only after all six provider tests fail.

email_provider

What triggers it

Example address

Gmail

The domain is gmail.com or googlemail.com.

Hotmail/Outlook

The domain is one of 11 Microsoft mailbox domains, such as outlook.com, hotmail.com and live.com.

Yahoo

The domain is one of 10 Yahoo domains, such as yahoo.com and yahoo.co.uk.

iCloud

The domain is icloud.com, me.com or mac.com.

Proton Mail

The domain is protonmail.com, protonmail.ch, pm.me or proton.me.

Yandex

The domain is yandex.com, yandex.ru or ya.ru.

Education

No provider list matched, and the domain ends with an education top-level domain.

Other

No provider list matched, and the domain is not an education domain.

Each named provider also sets its own boolean field. The address [email protected] sets is_gmail to true and email_provider to Gmail.

What does the Identify Email Type API return?

The following block is an example response for the address [email protected].

{
"guessed_name": "John Doe",
"address": "[email protected]",
"username": "john.doe",
"domain": "acme.com",
"email_provider": "Other",
"is_gmail": false,
"is_hotmail": false,
"is_yahoo": false,
"is_icloud": false,
"is_proton": false,
"is_yandex": false,
"is_likely_education_email": false,
"is_likely_personal_email": false,
"is_likely_company_email": true
}

What does each Identify Email Type response field mean?

Field

Type

Description

guessed_name

string

The person name that RichAPI reads from the username, for example John Doe. The value is an empty string for a username with no letters.

address

string

The full address in lower case, for example [email protected].

username

string

The part of the address before the @, in lower case, for example john.doe.

domain

string

The part of the address after the @, in lower case, for example acme.com.

email_provider

string

One of Gmail, Hotmail/Outlook, Yahoo, iCloud, Proton Mail, Yandex, Education or Other.

is_gmail

boolean

true for the domains gmail.com and googlemail.com.

is_hotmail

boolean

true for the 11 Microsoft mailbox domains, such as outlook.com and live.com.

is_yahoo

boolean

true for the 10 Yahoo domains, such as yahoo.com and yahoo.co.uk.

is_icloud

boolean

true for the domains icloud.com, me.com and mac.com.

is_proton

boolean

true for the domains protonmail.com, protonmail.ch, pm.me and proton.me.

is_yandex

boolean

true for the domains yandex.com, yandex.ru and ya.ru.

is_likely_education_email

boolean

true for a domain that ends with one of the 20 education top-level domains.

is_likely_personal_email

boolean

true for the 168 domains in the personal mailbox list.

is_likely_company_email

boolean

true for a domain that is in neither the personal list nor the education list.

How does the Identify Email Type API guess a name?

The Identify Email Type API builds guessed_name from the username alone. It converts the whole address to lower case first. It replaces each ., _, - and + with a space. It removes every digit. It then puts each word into title case. The username j_smith2 gives the guessed name J Smith. The username info gives the guessed name Info, because the rule reads no dictionary of person names.

How much does the Identify Email Type API cost?

The Identify Email Type API costs 0.5 credits per call. At $0.02 a credit, the rate on the 1,000 and 5,000 credit packs, one call costs $0.01. Larger packs cost less per credit. RichAPI charges credits on a 2xx response only. A 400 validation error costs no credit.

Calls

Credits

Cost

1

0.5

$0.01

100

50

$1.00

1,000

500

$10.00

10,000

5,000

$100.00

Identify Email Type or Email Verifier: which one do you need?

The Identify Email Type API and the Email Verifier API answer different questions at different prices. The Identify Email Type API sorts a list. The Email Verifier API protects a send.

Item

Identify Email Type

Email Verifier

Cost per address

0.5 credits, that is $0.01

2 credits, that is $0.04

Method

Local match against two domain lists

Live deliverability check across a provider waterfall

Network call to a provider

None

Yes

Question it answers

Which kind of mailbox does this domain run?

Does this mailbox accept mail?

Returns a disposable flag

No

Yes

Returns an MX record flag

No

Yes

Speed

Milliseconds

Up to 25 seconds

Correct choice for

Segment, route or score a raw list

The last check before a campaign send

Neither API replaces the other. A company domain with a dead mailbox still returns is_likely_company_email: true.

How to filter a list before you verify it

The filter-then-verify pattern classifies a whole list at 0.5 credits per address, then verifies only the addresses that earn 2 credits.

  1. Send one Identify Email Type call for each address in the list.

  2. Read is_likely_company_email from each response.

  3. Drop every address whose is_likely_company_email is false.

  4. Send one Email Verifier call for each remaining address.

  5. Send mail only to the addresses that Email Verifier marks valid.

The table shows the arithmetic for a list of 1,000 addresses. In this list 400 addresses are personal or education, and 600 are company addresses.

Plan

Calls

Credits

Cost

Verify all 1,000 addresses, no filter

1,000 Email Verifier

2,000

$40.00

Step 1: classify all 1,000 addresses

1,000 Identify Email Type

500

$10.00

Step 2: verify the 600 company addresses

600 Email Verifier

1,200

$24.00

Filter-then-verify total

1,600

1,700

$34.00

The filter saves 300 credits, that is $6.00, on this list.

Know the break-even point before you adopt the pattern. Each dropped address saves 2 credits. The classification of 1,000 addresses costs 500 credits. So the filter pays only after it drops more than 250 of the 1,000 addresses. If your list is more than 75 percent company addresses, verify it without the filter.

CAUTION: The filter drops personal and education addresses with no deliverability check. If your campaign targets consumers or students, do not filter on is_likely_company_email.

Which errors does the Identify Email Type API return?

Status

Meaning

What to do

400

The request body is missing, the body is not valid JSON, or the email value failed validation.

Read the error field in the response. Send one address in the email parameter.

401

The API key is missing, wrong or revoked.

Send a valid key in the x-api-key header.

402

The organization has no credits left, or the team reached its monthly spend limit.

Buy credits in the RichAPI dashboard.

403

This API key has no access to this endpoint (Endpoint not available on your plan).

Call GET /api/v1/my-endpoints to see the endpoints that this key can use. Contact support for access.

405

The request used a method other than POST.

Send the request again with POST.

429

Too many requests.

Wait, then send the request again.

500

The API failed.

Send the request again. If the failure repeats, contact support.

A 400 response holds one of three validation messages in the error field.

error message

Cause

A valid email address is required

The email value is empty, or the value holds no @ character.

Email address cannot contain spaces

The email value holds a space inside the address.

Email address cannot contain multiple @ symbols

The email value holds more than one @ character.

Frequently asked questions

Does the Identify Email Type API check whether the mailbox exists?

No. The Identify Email Type API matches the domain against two fixed lists and sends no SMTP probe and no DNS query. To check whether a mailbox accepts mail, use the Email Verifier API at 2 credits per address.

Does the Identify Email Type API return a role-based flag?

No. The Identify Email Type API returns three type flags: is_likely_personal_email, is_likely_company_email and is_likely_education_email. A role address such as [email protected] returns is_likely_company_email: true, so test the username field against your own list of role names.

Does the Identify Email Type API detect disposable email addresses?

Not as a separate type. The 10 throwaway mail domains in the personal list, such as mailinator.com and yopmail.com, return is_likely_personal_email: true. For a dedicated disposable field, use the Email Verifier API.

How much does the Identify Email Type API cost per address?

The Identify Email Type API costs 0.5 credits per address, that is $0.01 at $0.02 per credit on the 1,000 and 5,000 credit packs. A list of 1,000 addresses costs 500 credits, that is $10.00. RichAPI charges no credit for a 400 validation error.

Can the Identify Email Type API classify more than one address per call?

No. The Identify Email Type API accepts one email parameter and classifies one address per call. To classify a list, send one call per address.

Which addresses count as company addresses?

An address counts as a company address after both list tests fail. Its domain is in neither the 168-domain personal list nor the 20 education top-level domains. The is_likely_company_email flag is the fallback of the classification, so any unknown domain returns true.

Is the Identify Email Type API synchronous?

Yes. The Identify Email Type API returns the full classification in the same HTTP response. There is no job identifier and there is no polling step.

Related articles

Did this answer your question?