1. Services
  2. Domain

Domain lookup API

One call for a domain's registrar, created and expiry dates, DNS records, SPF and DMARC, and whether it is a disposable mail domain.

GET /v1/domain2 creditsAbout $0.002

Try it

GET/v1/domain
curl 'https://api.apifor.dev/v1/domain?name=example.com' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "name": "example.com",
    "registered": true,
    "registration": {
      "status": "ok",
      "queried": "example.com",
      "server": "rdap.verisign.com",
      "registrar": "RESERVED-Internet Assigned Numbers Authority",
      "registrar_iana_id": "376",
      "created": "1995-08-14T04:00:00Z",
      "updated": "2026-08-14T08:01:43Z",
      "expires": "2027-08-13T04:00:00Z",
      "statuses": [
        "client delete prohibited",
        "client transfer prohibited"
      ],
      "nameservers": [
        "elliott.ns.cloudflare.com",
        "hera.ns.cloudflare.com"
      ],
      "dnssec": true
    },
    "dns": {
      "resolved": true,
      "status": "ok",
      "a": [
        "172.66.147.243",
        "104.20.23.154"
      ],
      "aaaa": [
        "2606:4700:10::ac42:93f3",
        "2606:4700:10::6814:179a"
      ],
      "mx": [],
      "ns": [
        "elliott.ns.cloudflare.com",
        "hera.ns.cloudflare.com"
      ],
      "txt": [
        "v=spf1 -all",
        "_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9"
      ],
      "caa": []
    },
    "email": {
      "accepts_mail": false,
      "null_mx": true,
      "spf": {
        "present": true,
        "valid": true,
        "record": "v=spf1 -all",
        "all": "fail",
        "includes": [],
        "mechanisms": [
          "-all"
        ],
        "dns_lookups": 0,
        "warnings": []
      },
      "dmarc": {
        "present": true,
        "valid": true,
        "record": "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s",
        "policy": "reject",
        "subdomain_policy": "reject",
        "pct": 100,
        "rua": [],
        "ruf": [],
        "adkim": "s",
        "aspf": "s"
      },
      "dkim": null,
      "dkim_note": "DKIM keys live under selectors that cannot be listed from DNS, so they are not checked."
    },
    "disposable": false,
    "tls": null,
    "tls_note": "Certificate details are not exposed to Cloudflare Workers fetch, so TLS expiry is not reported.",
    "checked_at": "2026-11-28T15:30:44.480Z",
    "cached": false
  }
}

A real response from our OpenAPI file, with long lists and strings shortened.

Endpoints and price

EndpointCreditsAbout
GET /v1/domain2 credits$0.002

USD at Starter pack prices ($5 for 5,000 credits). Calls that fail before work starts are refunded.

Limits

  • No DKIM and no TLS certificate data.
  • Registrant contacts are never returned.
  • Results are cached for up to 24 hours. checked_at shows when.

Questions

Does it show who owns the domain?

No. We return the registrar, dates, status and nameservers, never registrant contact details.

Can I pass a subdomain?

Yes. We read DNS for the name you send and walk up to the registered domain for RDAP.

How fresh is it?

Up to 24 hours old, or 1 hour when a source answered only partly. The cached and checked_at fields tell you.

Other services