- About the IPQS APIs
- Proxy & VPN Detection API
- Email Verification API
- Phone Number Validation API
- Malicious URL Scanner API
- Device Fingerprint API
- Mobile Device Fingerprinting SDK
- Gaming Fraud Detection SDK
- Dark Web Leak API
- Malware File Scanner API
- Request List API
- Fraud Reporting API
- Account Management APIs
- Bulk Validation CSV
- Allowlist Blocklist APIs
- Plugins Platforms Integrations
- IP Reputation Database
- IP Address Abuse Feed
- Email Verification Database
-
Custom Integrations
- Getting Started
- Authentication
- Refresh Secret
- IP & Proxy Checks
- Email Verification Checks
- Phone Number Validity Checks
- Device Tracker
- List Device Trackers
- Device Tracker Statistics
- Login Tokens
- Overview Statistics
- Recent Proxy Statistics
- Recent Email Statistics
- Fraud Reporting
- Retrieve Requests by ID
- Country List API Documentation
- Release Notes
About
Improve email deliverability and inbox rates with the IPQS spam trap detection API. We built the email verification service to cleanse email marketing lists from harmful honeypots that can hurt sender scores, IP addresses, and domain reputations. Detecting spam traps can greatly improve deliverability rates and significantly reduce the chance of being blocklisted by RBLs, ESPs, and mail providers.
This email hygiene service works best with the email verification API to validate emails with bounce testing. The ultimate goal is to prevent spam traps and invalid accounts from entering your email marketing lists, as this ensures you can successfully inbox on popular services like gmail.com, yahoo.com, aol.com, and hotmail.com.
Spam Trap & Container API for Email Marketing
In addition to identifying honeypots, the spam trap detection API can also identify frequent complainers who are sensitive to marketing messages. These accounts may be overly aggressive in reporting emails as spam. This service is an extension of the Email Verification API. Our spam trap database and complainer lists are updated daily with millions of new low-reputation email addresses.
Get an accurate understanding of your email deliverability with our email spam check tool that can analyze all aspects of your email. This quick test will verify that your email content and headers have valid SPF, DKIM, and PTR records for your email domain. It also analyzes the content for any possible issues that could cause blocklisting or bounced messages.
Request URLs
You can use the following URLs to submit email addresses to the Email Verification API. Replace USER_EMAIL_HERE with the email address to analyze.
JSON
https://www.ipqualityscore.com/api/json/email/YOUR_API_KEY_HERE/USER_EMAIL_HERE
XML
https://www.ipqualityscore.com/api/xml/email/YOUR_API_KEY_HERE/USER_EMAIL_HERE
Example Responses
Success Responses
This is an example success response in JSON format.
{
"valid": true,
"deliverability": "high",
"catch_all": false,
"honeypot": false,
"spam_trap_score": "none",
"frequent_complainer": false,
"suggested_domain": "N/A",
"first_seen": {
"human": "3 months ago",
"timestamp": 1568061634,
"iso": "2019-09-09T16:40:34-04:00"
},
"domain_age": {
"human": "3 months ago",
"timestamp": 1568061634,
"iso": "2019-09-09T16:40:34-04:00"
},
"success": true,
"sanitized_email": "validated@example.com",
"request_id": "4JAer3sX6rF3PO"
}
This is an example success response in XML format.
<result>
<valid>true</valid>
<deliverability>high</deliverability>
<catch_all>false</catch_all>
<honeypot>false</honeypot>
<frequent_complainer>false</frequent_complainer>
<spam_trap_score>none</spam_trap_score>
<first_seen>
<human>3 months ago</human>
<timestamp>1568061634</timestamp>
<iso>2019-09-09T16:40:34-04:00</iso>
</first_seen>
<domain_age>
<human>3 months ago</human>
<timestamp>1568061634</timestamp>
<iso>2019-09-09T16:40:34-04:00</iso>
</domain_age>
<sanitized_email>validated@example.com</sanitized_email>
<success>true</success>
<request_id>4JAer3sX6rF3PT</request_id>
</result>
Error Responses
Example errors that you may encounter when accessing our API due to an exhausted credit balance or an invalid email address.
{
"success":false,
"message":"You have insufficient credits to make this query. Please contact IPQualityScore support if this error persists.",
"request_id":"4OTORR352FU0p"
}
{
"success":false,
"message":"Invalid email address. Please check the email and try again.",
"request_id":"4OTORR4EWpl0m"
}
Response Field Definitions
Any time the spam trap email address API returns spam_trap_score as high, it is likely that the email address is an active spam trap. You should not send marketing messages to this user. Confidence scores as "medium" can also be removed at your own preference. The API results can also indicate frequent_complainer as true, indicating that the email address has recently been involved in many reports against marketing messages.
| Field | Description | Possible Values |
|---|---|---|
| valid | Does this email address appear valid? | boolean |
| deliverability | How likely the email is to be delivered to the user and arrive in their mailbox. Values can be "high", "medium", or "low". | string |
| catch_all | Is this email likely to be a "catch-all" where the mail server verifies all emails tested against it as valid? It is difficult to determine whether the address is valid in these scenarios since the email server will not confirm the account's status. | boolean |
| honeypot | Is this email believed to be a "honeypot" or "SPAM trap"? Bulk mail sent to these emails increases your risk of being blocklisted by large ISPs & ending up in the spam folder. | boolean |
| spam_trap_score | Confidence level of the email address being an active SPAM trap. Values can be "high", "medium", "low", or "none". We recommend scrubbing emails with "high" or "medium" statuses. Avoid "low" emails whenever possible for any promotional mailings. | string |
| frequent_complainer | Indicates if this email frequently unsubscribes from marketing lists or reports email as SPAM. | boolean |
| suggested_domain | Indicates if this email's domain should be corrected to a popular mail service. This field is useful for catching user typos. For example, an email address with "gmai.com" would display a suggested domain of "gmail.com". This feature supports all major mail service providers. The default value is "N/A". | string |
| first_seen | An object containing fields related to when IPQS first saw the email address. | |
| domain_age | An object containing fields related to when the domain was first registered. | |
| sanitized_email | Sanitized email address with all aliases and masking removed, such as multiple periods for Gmail.com. | string |
| request_id | A unique identifier for this request that can be used to look up the request details or send a postback conversion notice. | string |
| success | Was the request successful? | boolean |
| message | A generic status message, either "success" or an error notice. | string |
| errors | An array of errors that occurred while attempting to process this request. | array of strings |
first_seen fields
| Field | Description | Possible Values |
|---|---|---|
| human | A human description of how long it's been since IPQS first analyzed this email address. (Ex: 3 months ago) | string or null |
| timestamp | The unix time since epoch when this email was first analyzed by IPQS. (Ex: 1568061634) | integer |
| iso | The time this email was first analyzed by IPQS in ISO8601 format (Ex: 2019-09-09T16:40:34-04:00) | string |
domain_age fields
| Field | Description | Possible Values |
|---|---|---|
| human | A human description of when this domain was registered. (Ex: 3 months ago) | string or null |
| timestamp | The unix time since epoch when this domain was first registered. (Ex: 1568061634) | integer |
| iso | The time this domain was registered in ISO8601 format (Ex: 2019-09-09T16:40:34-04:00) | string |
// Your API Key.
$key = 'YOUR_API_KEY_HERE';
// The email you wish to validate.
$email = 'noreply@ipqualityscore.com';
/*
* Set the maximum number of seconds to wait for a reply
* from an email service provider. If speed is not a concern
* or you want higher accuracy we recommend setting this in
* the 20 - 40 second range in some cases. Any results which
* experience a connection timeout will return the "timed_out"
* variable as true. Default value is 7 seconds.
*/
$timeout = 1;
/*
* If speed is your major concern set this to true,
* but results will be less accurate.
*/
$fast = 'false';
// Create parameters array.
$parameters = array(
'timeout' => $timeout,
'fast' => $fast
);
// Format our parameters.
$formatted_parameters = http_build_query($parameters);
// Create our API URL.
$url = sprintf(
'https://www.ipqualityscore.com/api/json/email/%s/%s?%s',
$key,
$email,
$formatted_parameters
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
$json = curl_exec($curl);
curl_close($curl);
// Decode the result into an array.
$result = json_decode($json, true);
// Check to see if our query was successful.
if(isset($result['success']) && $result['success'] === true){
*- Example 1: Flag high confidence spam traps and frequent complainer addresses
*
* if(
* ($result['spam_trap_score'] === "high" || $result['frequent_complainer'] === true)
* ){
* echo "Email is likely to cause deliverability issues for your sending domain and IP address.";
* } else {
* echo "Email is clean.";
* }
*/
}
import json
import requests
# You may need to install Requests pip
# python -m pip install requests
class IPQS:
key = "YOUR_API_KEY_HERE"
def email_validation_api(self, email: str, vars: dict={}) -> dict:
url = "https://www.ipqualityscore.com/api/json/email/%s/%s" % (self.key, email)
x = requests.get(url, params = vars)
return (json.loads(x.text))
if __name__ == "__main__":
#The email you wish to validate.
email = 'noreply@ipqualityscore.com'
"""
Set the maximum number of seconds to wait for a reply
from an email service provider. If speed is not a concern
or you want higher accuracy we recommend setting this in
the 20 - 40 second range in some cases. Any results which
experience a connection timeout will return the "timed_out"
variable as true. Default value is 7 seconds.
"""
timeout = 1
"""
If speed is your major concern set this to true,
but results will be less accurate.
"""
fast = 'false'
#custom feilds
additional_params = {
'timeout' : timeout,
'fast' : fast
}
ipqs = IPQS()
result = ipqs.email_validation_api(email, additional_params)
# Check to see if our query was successful.
if 'success' in result and result['success']:
#Example 1: Flag disposable and abusive emails
if result['spam_trap_score'] == "high" or result['frequent_complainer'] == True:
print('Email is likely to cause deliverability issues for your sending domain and IP address.')
else:
print('Email is clean.')