Skip to content
MtrXTools

MtrXTools API

Every MtrXTools check is available as a free JSON API: no key, no sign-up. Use it in scripts, monitoring, chat bots and internal tools. Each endpoint is a GET with query parameters, the same ones the tool pages use.

Quick start

curl
curl 'https://www.mtrxtools.com/api/v1/dns-lookup?q=github.com&type=MX'
JavaScript
const res = await fetch('https://www.mtrxtools.com/api/v1/dns-lookup?q=github.com&type=MX');
const body = await res.json();
if (!body.ok) throw new Error(body.error);
console.log(body.data);
Response
{
  "ok": true,
  "ms": 41,
  "data": { ... }
}

Errors return { "ok": false, "error": "..." } with an HTTP status: 400 for bad input, 403 for targets that are not allowed (private and internal addresses are never contacted), 422 when the input can't be checked, 429 when rate limited, and 502 to 504 when the target or an upstream service fails.

MCP server for AI assistants

The same checks are available to AI assistants and agents through the Model Context Protocol: 28 read-only tools, from DNS lookups and certificate checks to BGP routes and error explanations. It is a remote server over Streamable HTTP, with no key or sign-up, at

Server URL
https://www.mtrxtools.com/api/mcp
Claude Code
claude mcp add --transport http mtrxtools https://www.mtrxtools.com/api/mcp
JSON config (Cursor, VS Code and others)
{
  "mcpServers": {
    "mtrxtools": { "url": "https://www.mtrxtools.com/api/mcp" }
  }
}
Clients that only run local (stdio) servers
npx -y mcp-remote https://www.mtrxtools.com/api/mcp

In Claude on the web or desktop, add it as a custom connector with the server URL. Tool calls count against the same per-IP rate limits as the API below, private and internal addresses are refused, and each result includes a link to the MtrXTools page for the same check. Tools: dns_lookup, reverse_dns, dns_report, dns_propagation, ssl_checker, http_headers, csp_evaluator, cookie_inspector, cors_tester, revocation_check, security_txt, ct_search, hsts_preload, website_health, email_auth, mta_sts, bimi, blocklists, rpki, asn_explorer, rdap, whois, ip_info, cloud_ip, port_check, ping, ntp_test, explain_error.

Rate limits and fair use

  • 40 requests a minute per IP address for heavy checks: SSL/TLS, HTTP headers, website health, port check and ping. A full website health report (section=all) counts as 8.
  • 60 requests a minute for everything else. IPv6 clients are counted per /64.
  • Every response has RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers; a 429 also has Retry-After.
  • Use it for your own diagnostics and integrations. Don't use it to scan networks you don't own. Clients that cause excessive load may be blocked.
  • Inputs and results are not stored. CORS is open, so browser apps on any site can call it.

Versioning

Paths start with /api/v1. Within v1 the parameters and the ok/data/error envelope stay stable; objects inside data may gain new fields, so ignore ones you don't know. Breaking changes will get a new version. The machine-readable description is at /api/v1/openapi.json (OpenAPI 3.1), and /api/v1 lists the endpoints.

Endpoints

DNS lookup

GET /api/v1/dns-lookup

Query DNS records from a public resolver or straight from the domain's authoritative nameservers, with TTLs and flags.

qrequiredDomain name.
typeRecord type. ALL returns the common types.Values: ALL, A, AAAA, CNAME, MX, NS, TXT, SOA, CAA, SRV, PTR, DS, DNSKEY, TLSA, NAPTR, SSHFP (default A)
resolverResolver to ask, or authoritative to skip caches.Values: cloudflare, google, quad9, opendns, authoritative (default cloudflare)
dnssecSet to 1 to request DNSSEC records and signatures.Values: 1

Reverse DNS

GET /api/v1/reverse-dns

Find the PTR hostname for an IPv4 or IPv6 address and check that it resolves back to the same address.

qrequiredIPv4 or IPv6 address.
resolverResolver to ask.Values: cloudflare, google, quad9, opendns (default cloudflare)

DNS health report

GET /api/v1/dns-report

A graded report on how a zone is delegated and served: the parent's NS set, glue and DS against the zone's own, every nameserver asked directly (authoritative answer, SOA serial, TCP, open recursion, network and AS), SOA timers, MX and CAA sanity, and the DNSSEC chain from DS to DNSKEY with signature expiry.

qrequiredDomain. A name inside a zone is checked as that zone.

DNS propagation

GET /api/v1/dns-propagation

Ask 22 resolvers on five continents and the zone's own nameservers, group the answers, and return when each stale cached copy expires, plus the parent zone's delegation.

qrequiredDomain name.
typeRecord type.Values: A, AAAA, CNAME, MX, NS, TXT, CAA (default A)
expectThe value you are waiting for (an IP, hostname or TXT fragment). Without it, resolvers are compared with what the nameservers serve.

SSL/TLS checker

GET /api/v1/ssl-checker

Read the certificate chain a server sends, check expiry, hostname match, trust and key, test TLS 1.0 to 1.3, and grade it.

qrequiredHostname, URL or host:port. Implicit TLS only (no STARTTLS).
portPort, if not given in q.Default: 443
ciphersSet to 1 to scan instead: the cipher suites accepted on each protocol (each marked safe or unsafe), protocol details read from ordinary handshakes, and known attacks inferred from them. Takes a few seconds, up to about 25.Values: 1

HTTP headers

GET /api/v1/http-headers

Follow every redirect, return each hop's status, headers and timing, and grade the security headers of the final page.

qrequiredURL or hostname.

CSP evaluator

GET /api/v1/csp-evaluator

Evaluate the Content-Security-Policy of a URL (headers, report-only and <meta> policies, with the page fetched twice to check nonces change) or of a policy passed directly. Returns each policy parsed into directives and sources with risk notes, checks for inline scripts, wildcards, bypassable allowlists, plugins, base-uri, framing, reporting and syntax mistakes, and an overall verdict.

qrequiredA URL or domain, or the policy itself (starting with a directive such as script-src).

CORS tester

GET /api/v1/cors-tester

Send the CORS preflight a browser would send for a cross-origin request from the given origin (when one is needed), then a GET with that Origin, and check both responses the way the browser does: Access-Control-Allow-Origin, -Methods, -Headers, -Credentials, -Max-Age, Vary and exposed headers. Requests that could change data are never sent; only their preflight is. Returns each exchange's headers and checks, an allowed or blocked verdict and equivalent curl commands.

qrequiredThe URL of the API endpoint.
originThe origin of the page making the request. Default https://example.com.
methodThe request method. Default GET.Values: GET, HEAD, POST, PUT, PATCH, DELETE
headersRequest header names the page sets, comma-separated.
credentialsSet to 1 for a request with cookies or HTTP authentication (fetch credentials: 'include').Values: 1

OCSP / revocation check

GET /api/v1/revocation-check

Check whether the certificate a server presents has been revoked: the stapled OCSP response, a query to the CA's OCSP responder and a download of its CRL (up to 10 MB), each with status, this and next update, timings and signature verification against the issuer, plus Must-Staple and an overall verdict (good, revoked or unknown).

qrequiredHostname, URL or host:port. Implicit TLS only (no STARTTLS).
portPort, if not given in q. Default 443.

security.txt validator

GET /api/v1/security-txt

Find a domain's security.txt (/.well-known/security.txt, or the legacy /security.txt), following redirects, and validate it against RFC 9116: Content-Type, the required Contact and Expires fields, HTTPS addresses, Canonical, Encryption, Preferred-Languages, OpenPGP signing, unknown fields and stray lines. Returns the parsed fields, the file, checks and a corrected file.

qrequiredDomain or URL.

HSTS preload checker

GET /api/v1/hsts-preload

Check each hstspreload.org requirement for a domain (trusted certificate, HTTP redirecting to HTTPS on the same host, one Strict-Transport-Security header with max-age of at least a year, includeSubDomains and preload, HTTPS on www), with the redirect hops, the domain's preload list status and hstspreload.org's own errors and warnings.

qrequiredDomain or URL. A subdomain is checked as its registrable domain.

Website health

GET /api/v1/website-health

A graded site report: DNS, every A/AAAA address, the http/https and www/apex redirect matrix, TLS, accepted cipher suites, headers, domain expiry and content basics.

qrequiredDomain or URL.
sectionall returns every section and the overall grade in one response (counts as 9 requests against the rate limit). A single section returns just that part; ciphers lists the cipher suites accepted on each protocol, each marked safe or unsafe, plus protocol details read from ordinary handshakes (renegotiation, downgrade protection, compression, ALPN, resumption, stapling, named groups, DH parameters) and known attacks inferred from them. Without it, only the resolved target and section list are returned.Values: all, dns, nodes, entry, tls, ciphers, domain, content, edge

SPF, DKIM & DMARC

GET /api/v1/email-auth

Check SPF (with the DNS lookup count), find DKIM keys, read the DMARC policy, MTA-STS, TLS-RPT and BIMI, and grade the setup.

qrequiredDomain or email address.
selectorsExtra DKIM selectors to try, comma-separated, e.g. s1,mail2026. Common ones are always tried.

MTA-STS & TLS-RPT

GET /api/v1/mta-sts

Check the _mta-sts record, fetch and validate the policy file (certificate, redirects, content type, syntax), match its mx patterns against the domain's MX hosts, and read the TLS-RPT record and its report destinations.

qrequiredDomain or email address.

BIMI checker

GET /api/v1/bimi

Check the BIMI record (at the domain or its organisational domain), fetch the logo and check it against the SVG Tiny PS profile, fetch and verify the mark certificate (BIMI usage, domain, expiry, chain, mark type, whether its embedded logo matches), and confirm DMARC enforcement. Includes the logo as a data: URI.

qrequiredDomain or email address.
selectorBIMI selector, for senders that set a BIMI-Selector header. Defaults to "default".

Blocklist check

GET /api/v1/blocklists

Check an IP address against 13 DNS blocklists, or a domain against 3 domain blocklists plus its mail servers' and website's addresses against the IP lists. Each result is listed, clean, or not verified when a list doesn't confirm its own test entry.

qrequiredIPv4 or IPv6 address, domain, or email address.

RPKI validity

GET /api/v1/rpki

RPKI route origin validation (valid, invalid_asn, invalid_length or unknown) for the routes covering an IP address or a domain's addresses, a prefix, or every prefix an AS announces, with the deciding ROAs, RIS visibility, and ROAs whose maxLength is longer than announced. Data from RIPEstat.

qrequiredIP address, prefix, AS number (AS13335) or domain.
asnValidate against this origin AS instead of the one seen in BGP, to test a planned announcement (IP or prefix only).

ASN & prefix explorer

GET /api/v1/asn-explorer

What the global routing table says about an AS number or a prefix (or the route covering an IP address or domain), from RIPEstat. For an AS: holder and registry, announced IPv4 and IPv6 prefixes, upstream and downstream neighbours with names, and prefixes missing from the IRR. For a prefix: origins with their IRR route objects, visibility across RIS peers, upstreams and sample AS paths from collectors worldwide, covering and more-specific routes, a week of update activity and the origin history. With checks for single upstreams, missing IRR objects, multiple origins, foreign more-specifics, over-specific prefixes and flapping.

qrequiredAS number (AS13335 or 13335), prefix, IP address or domain.

RDAP lookup

GET /api/v1/rdap

Registration data over RDAP: registrar, dates, status, nameservers and abuse contacts for a domain, IP address or range, or AS number.

qrequiredDomain, IP address, CIDR or AS number.

WHOIS

GET /api/v1/whois

Query WHOIS servers directly, following referrals from IANA to the registry and registrar, and return each raw response.

qrequiredDomain or IP address.

IP info

GET /api/v1/ip-info

Network, AS number, approximate location, address type and reverse DNS for an IP address. Hostnames are resolved first.

qrequiredIP address or hostname.

Cloud IP owner

GET /api/v1/cloud-ip

Which cloud, CDN or crawler owns an address, from each provider's published ranges, with service and region. Verifies Googlebot and Bingbot.

qrequiredUp to 20 IP addresses or hostnames, separated by commas or spaces.

What's my IP

GET /api/v1/my-ip

The public IP address the request came from, with its network and approximate location. For scripts, /api/v1/my-ip/ipv4, /api/v1/my-ip/ipv6 and /api/v1/my-ip/ip return just the address as plain text (add ?format=json for {"ip": "..."}). A server sees only the family a request arrives over, so /ipv4 and /ipv6 answer 422 with a hint when the connection used the other one; force it with curl -4 or curl -6.

Port check

GET /api/v1/port-check

Whether TCP ports are open, closed or filtered, with connect times and the banner a service sends first. Up to 20 ports.

qrequiredHostname or IP address.
presetPort set to test when ports is empty.Values: common, web, mail, remote, db (default common)
portsPorts and ranges, comma-separated (max 20).

Ping (TCP)

GET /api/v1/ping

Round-trip time to a host from timed TCP handshakes: min, average, max, jitter and loss. Works where ICMP is blocked.

qrequiredHostname, IP address or host:port.
portTCP port, if not given in q.Default: 443
countAttempts, 1 to 10.Default: 5

NTP test

GET /api/v1/ntp-test

Query an NTP server over UDP 123: clock offset, delay, stratum, reference, leap status and root distance, over several samples.

qrequiredNTP server hostname or IP address.

Error explainer

GET /api/v1/explain-error

Match an error message or log line against MtrXTools's error library: what it means, causes, fixes, and the check that confirms it.

textrequiredError message or log line, up to 4,000 characters.