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.
You can ask us any question concerning the CleanTalk Anti-Spam via:
It would also be interesting
- Anti-Spam API, Libraries, ClassesBuilt-in Libraries PHP Perl 5 Python 2/3 .NET 4.5 (C#) YII Framework YII 2 Framework Ruby ...
- CleanTalk Anti-Spam monitoring_services_get API MethodCleanTalk Anti-Spam "monitoring_services_get" API method description This method returns list of resources...
- CleanTalk Anti-Spam monitoring_services_add API MethodCleanTalk Anti-Spam "monitoring_services_add" API method description This method is used to add new URLs...