API method email_check
In order to use EMAIL_CHECK method, you have to buy a separate license — BlackList API. Our prices are here: https://cleantalk.org/price-database-api
You can purchase it here on your billing page: https://cleantalk.org/my/bill/api
Method's response is information about the existence of an email address.
Note: our servers count each record that you request for checking. If you made 1 multiple records request, in your CleanTalk dashboard you will see a few checks (as many as there were records in the request).
Call Requires GET Parameters:
- method_name — should be 'email_check'
- auth_key — Database API key. To obtain a key please get an account here: https://cleantalk.org/register?platform=api
Optional GET Parameters:
- email — email address to check
- email_<SHA256> - email SHA256 hash. Please note that it's impossible to restore the email address from the hash so check will be successful only if this hash already exists in our Databases.
Example request:
https://api.cleantalk.org/?method_name=email_check&auth_key=123456&email=stop_email@example.com
API returns JSON string, for example:
{"data":{"stop_email@example.com":{"result":"EXISTS"}}}
Example request with hash:
https://api.cleantalk.org/?method_name=email_check&auth_key=pe4ugy3uta3e&email=email_08c2495014d7f072fbe0bc10a909fa9dca83c17f2452b93afbfef6fe7c663631
Responses Explanation:
data — array with checked records, which contains them in the following format: "record":{array of check results}.
An array of check results may contain the next fields:
- EXISTS — address exists,
- NOT_EXISTS — address not exists,
- MX_FAIL, MX_ERROR — сannot obtain information about e-mail or domain.
- FAIL — for SHA256 email hash. There is no such hash in Databases or wrong record format.
Multiple Records Check:
You can submit multiple records to test per 1 call, to do that use POST options:
- emails — string with records to check separated by ','.
Example:
wget -O- --post-data='emails=stop_email@example.com,s@cleantalk.org' https://api.cleantalk.org/?method_name=email_check&auth_key=123456
Response:
{"data":{"s@cleantalk.org":{"result":"NOT_EXISTS"},"stop_email@example.com":{"result":"EXISTS"}}}
To see the results if you checking a few addresses it may be helpful output to file:
wget -O results.txt --post-data='emails=stop_email@example.com,s@cleantalk.org' https://api.cleantalk.org/?method_name=email_check&auth_key=123456
Restrictions:
If you get calls limit, API returns error notice. Example:
{"error_message":"Calls limit exceeded.","error_no":10}
The current calls limit is 100 per 60 seconds.
If you get data elements limit in the email_check method, API returns error notice. Example:
{"error_message":"Received 101 records to check, maximum 100 records check perl call.","error_no":8}
The current data elements limit is 100.
The recommended timeout is no more than 180 seconds.
Notice: if data are sent in the request, then the request may be implemented a little longer.
Method EMAIL_CHECK should be used exclusively checking of e-mails existence. For other purposes you could use other methods:
- check_message (requires Standard Anti-Spam Licence) — API spam filter to check posts and comments.
- check_newuser (requires Standard Anti-Spam Licence) — Registration check.
- send_feedback (requires Standard Anti-Spam Licence) — Send feedback to CleanTalk.
- spam_check (requires Database API Licence) — Bulk IP and e-mail check for spam activity.
- backlinks_check (requires Database API Licence) — Mass check for backlinks in spam comments.
- Universal Anti-Spam plugin - this plugin can be installed on any custom websites or CMS.
You can ask us any question concerning the CleanTalk Anti-Spam via:
It would also be interesting
- CleanTalk Anti-Spam check_newuser API MethodCleanTalk Anti-Spam "check_newuser" API method description This method is the best to filter spam signups,...
- CleanTalk Anti-Spam check_message API MethodCleanTalk Anti-Spam "check_message" API method description This method is the best to use on forms that...
- IP to country online APIMethod description Get Country Code by IP Address. The API "ip_info()" returns a 2-letter country code...