API reference
DNS Lookup API
DNS records, email security audit (SPF, DMARC, DKIM) with a grade, and SSL certificate expiry.
- Host
dns-lookup-email-security-ssl-checker.p.rapidapi.com- Base path
/v1/dns- Auth
X-RapidAPI-Key,X-RapidAPI-Host- For agents
openapi.json·dns.md
Overview and pricing · Tutorial: SPF, DKIM & DMARC Checker · RapidAPI playground (opens in a new tab) ↗ · Apify actor (opens in a new tab) ↗
DNS Records
A, AAAA, MX, NS, TXT, CAA and other records of a domain.
Get DNS Records
GET /v1/dns/records
DNS records of a domain. Records with their TTL (and priority for MX), from public resolvers. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
domain required |
query | string |
Domain or hostname (or any URL of it). |
types |
query | string |
Comma-separated types. Default: A, AAAA, CNAME, MX, NS, TXT, SOA, CAA. Also SRV, PTR. |
curl -G "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/records" \
--data-urlencode "domain=github.com" \
--data-urlencode "types=A,MX,TXT" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: dns-lookup-email-security-ssl-checker.p.rapidapi.com"
import requests
url = "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/records"
params = {
"domain": "github.com",
"types": "A,MX,TXT"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/records?domain=github.com&types=A,MX,TXT", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
},
});
console.log(await res.json());
Email Security
SPF, DMARC, DKIM, MTA-STS and BIMI audit with a grade.
Audit Email Security
GET /v1/dns/email
Email security audit: SPF, DMARC, DKIM, MX, MTA-STS, BIMI, grade. Grade A-F and score 0-100, mail provider, each check (pass / warn / fail) with its explanation, and the fixes to make. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
domain required |
query | string |
Domain or hostname (or any URL of it). |
curl -G "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/email" \
--data-urlencode "domain=github.com" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: dns-lookup-email-security-ssl-checker.p.rapidapi.com"
import requests
url = "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/email"
params = {
"domain": "github.com"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/email?domain=github.com", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
},
});
console.log(await res.json());
SSL
SSL/TLS certificate details and expiry.
Get SSL Certificate
GET /v1/dns/ssl
SSL/TLS certificate of a website. Validity (trusted chain, name, dates) and the reason when invalid, issuer, names covered, validity dates and days remaining, key, signature, TLS version and cipher. 1 credit.
| Parameter | In | Type | Description |
|---|---|---|---|
domain required |
query | string |
Domain or hostname (or any URL of it). |
curl -G "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/ssl" \
--data-urlencode "domain=github.com" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: dns-lookup-email-security-ssl-checker.p.rapidapi.com"
import requests
url = "https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/ssl"
params = {
"domain": "github.com"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://dns-lookup-email-security-ssl-checker.p.rapidapi.com/v1/dns/ssl?domain=github.com", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "dns-lookup-email-security-ssl-checker.p.rapidapi.com",
},
});
console.log(await res.json());
Response (/email)
{
"domain": "github.com",
"grade": "C",
"score": 65,
"mx": [{ "value": "github-com.mail.protection.outlook.com", "ttl": 300, "priority": 0 }],
"provider": "Microsoft 365",
"mx_check": { "status": "pass", "message": "1 mail server(s)." },
"spf": {
"record": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com include:_netblocks.google.com ... ~all",
"all": "~all",
"includes": ["spf.protection.outlook.com", "_netblocks.google.com", "_netblocks2.google.com", "mail.zendesk.com", "_spf.salesforce.com", "servers.mcsv.net", "mktomail.com", "sendgrid.net"],
"lookups": 10,
"check": { "status": "warn", "message": "10 DNS lookups out of 10: one more sender breaks SPF." }
},
"dmarc": {
"record": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:dmarc@github.com; ruf=mailto:dmarc@github.com; fo=1",
"policy": "quarantine",
"subdomain_policy": "reject",
"pct": 100,
"rua": ["mailto:dmarc@github.com"],
"check": { "status": "pass", "message": "DMARC quarantines spoofed mail (p=quarantine)." }
},
"dkim": { "selectors_found": ["google", "selector1", "k1", "k2", "s1", "s2", "cm"], "check": { "status": "pass", "message": "DKIM key found (google, selector1, k1, k2, s1, s2, cm)." } },
"mta_sts": { "status": "warn", "message": "No MTA-STS: mail to this domain can be downgraded to plain text." },
"bimi": { "status": "warn", "message": "No BIMI logo." },
"recommendations": [
"Bring SPF below 10 DNS lookups: remove senders you no longer use or replace includes with their IP ranges.",
"Enable MTA-STS to enforce encrypted delivery."
]
}
A real response (20 Nov 2026); only the SPF record is shortened. Even github.com gets a C: 10 SPF lookups out of 10 allowed, and no MTA-STS.
Response (/ssl)
{
"domain": "expired.badssl.com",
"host": "expired.badssl.com:443",
"valid": false,
"error": "certificate has expired",
"issuer": "COMODO RSA Domain Validation Secure Server CA",
"names": ["*.badssl.com", "badssl.com"],
"valid_until": "2015-04-12T23:59:59Z",
"days_remaining": -4238,
"key": "RSA 2048",
"protocol": "TLSv1.2"
}
How the grade works
SPF up to 30 points, DMARC up to 35, DKIM up to 20, MTA-STS 10, BIMI 5. A ≥ 85, B ≥ 70, C ≥ 50, D ≥ 30, F below.
A null MX (0 ., RFC 7505) is read as "this domain accepts no mail": MTA-STS is then not needed, and neither is DKIM when SPF is v=spf1 -all (a parked domain done right). Recommendations follow what is published: a domain at p=none is told to move to quarantine, then reject.
Errors
| Status | code |
Meaning |
|---|---|---|
| 400 | invalid_domain, invalid_request |
Not a domain, or an unknown record type. |
| 400 | site_unreachable |
No TLS answer on port 443 (/ssl). |
| 429 | daily_limit_reached |
Daily safety limit of your plan; resets at 00:00 UTC. |
| 503 | dns_timeout |
The DNS servers did not answer. Retry. Not billed. |
Use it from an AI agent
Add this MCP server and the DNS Lookup, Email Security & SSL Checker actor becomes a tool your agent can call. Works in Claude, Cursor, VS Code and any MCP client; billed per event through Apify.
https://mcp.apify.com?tools=helenisapi/dns-email-security-ssl-checker
Prefer plain HTTP? Give your agent the OpenAPI document or the Markdown reference.