Skip to content

Domain lookup

POST /domain reads a domain's registration over RDAP (age, expiry, registrar, statuses) and sums up its DNS records, SPF, DMARC and disposable flag.

POSThttps://api.qelka.com/v1/domain

Find out when a domain was registered, when it expires and which registrar holds it, and see how it handles email: you get its registration from the registry, its main DNS records, its SPF and DMARC setup, and whether it is a disposable email domain. Each lookup costs 1 credit; lookups the registry could not answer, errors and test keys are never billed.

Request

Send a domain, a URL or an email address. The registration is read over RDAP (Registration Data Access Protocol), the protocol registries use to publish registration data.

domainstringRequired
A domain name, 1 to 320 characters. A URL (https://www.example.com/page) or an email address (jane@example.com) works too: its host is reduced to the registrable domain, so shop.example.co.uk is looked up as example.co.uk. Internationalized names are converted to punycode.
freshbooleanDefault false
true skips the 24-hour result cache.

Input that is not a domain name, such as localhost or a string with spaces, is a 422 unprocessable_input. The call waits for the registry's RDAP server, so every snippet sets a 30-second client timeout.

curl https://api.qelka.com/v1/domain \
  --max-time 30 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "cloudflare.com"}'
const response = await fetch('https://api.qelka.com/v1/domain', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ domain: 'cloudflare.com' }),
  signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/domain",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"domain": "cloudflare.com"},
    timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/domain');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(['domain' => 'cloudflare.com']),
    CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

func main() {
	payload, _ := json.Marshal(map[string]any{"domain": "cloudflare.com"})
	request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/domain", bytes.NewReader(payload))
	request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
	request.Header.Set("Content-Type", "application/json")

	client := &http.Client{Timeout: 30 * time.Second}
	response, err := client.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	var result map[string]any
	if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
		panic(err)
	}
	fmt.Println(result)
}
require 'json'
require 'net/http'

uri = URI('https://api.qelka.com/v1/domain')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ domain: 'cloudflare.com' })

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
  http.request(request)
end
result = JSON.parse(response.body)
puts result

Response

Every valid domain name gets a 200. Read status for the short answer and rdap.status to know whether registration is filled.

idstring
Identifier of this lookup: lkp_ followed by 26 characters.
objectstring
Always domain.
inputstring
The domain you sent, without surrounding spaces.
domainstring
The registrable domain that was looked up, in ASCII.
tldstring
Its top-level domain, such as com or uk.
statusstring
registered, not_registered or unknown.
rdapobject
What the registry's RDAP server answered.
rdap.statusstring
found, not_found, unsupported or error.
rdap.serverstring or null
The RDAP server the IANA bootstrap file names for the TLD. null when there is none, or when the bootstrap file could not be read.
registrationobject or null
The registration record. null unless rdap.status is found.
registration.created_atstring or null
Registration date, ISO 8601 in UTC.
registration.updated_atstring or null
Date of the last change, ISO 8601 in UTC.
registration.expires_atstring or null
Expiration date, ISO 8601 in UTC. Some registries do not publish it.
registration.age_daysinteger or null
Whole days between created_at and the lookup.
registration.expires_in_daysinteger or null
Whole days until expires_at, negative once it has passed.
registration.registrarobject or null
The registrar that holds the domain.
registration.registrar.namestring or null
Registrar name.
registration.registrar.iana_idstring or null
IANA Registrar ID, for registrars accredited by ICANN.
registration.statusesarray of strings
RDAP status values, lower case. RFC 8056 maps them to EPP status codes: client transfer prohibited is clientTransferProhibited.
registration.nameserversarray of strings
The nameservers the registry delegates the domain to.
registration.dnssecboolean or null
true when the registry says the delegation is signed with DNSSEC.
dnsobject
DNS records of the domain itself.
dns.statusstring
Status of the NS query: NOERROR, NXDOMAIN, SERVFAIL, REFUSED or TIMEOUT.
dns.aarray of strings
IPv4 addresses.
dns.aaaaarray of strings
IPv6 addresses.
dns.mxarray of objects
Mail exchangers, lowest priority first.
dns.mx.priorityinteger
MX priority.
dns.mx.exchangestring
Mail server host. A null MX (RFC 7505) appears as ..
dns.nsarray of strings
NS records as DNS answers them, lower case.
dns.txtobject
A summary of the TXT records.
dns.txt.recordsinteger
Number of TXT records at the domain.
dns.txt.spfstring or null
The SPF record, when there is exactly one.
dns.txt.verificationsarray of strings
Services whose domain verification token is in TXT, such as google (google-site-verification=) or microsoft (MS=). The others recognized: adobe, apple, atlassian, brave, cisco, docusign, dropbox, facebook, github, globalsign, hubspot, mail.ru, miro, onetrust, openai, slack, stripe, yandex and zoom.
emailobject
How the domain handles email.
email.mxboolean
true when the domain has at least one MX record other than a null MX.
email.null_mxboolean
true when the domain publishes a null MX: it accepts no email.
email.providerstring or null
Mail provider recognized from the MX hosts, as on MX lookup. null when none is recognized.
email.spfboolean
true when the domain publishes an SPF record.
email.spf_allstring or null
What the final all of the SPF record says: fail (-all), softfail (~all), neutral (?all) or pass (+all). null when there is no single SPF record or it has no all.
email.dmarcboolean
true when a DMARC record is published at _dmarc.{domain}.
email.dmarc_policystring or null
The DMARC policy: none, quarantine or reject.
email.disposableboolean
true when the domain, or a parent of it, is on the disposable email domain list.
credits_usedinteger
Credits debited for this call: 1 with a live key, 0 when rdap.status is error or with a test key.
cachedboolean
true when the answer came from the 24-hour cache.
Response
{
  "id": "lkp_01M875D1RE89KBPYC9QGDPVNSN",
  "object": "domain",
  "input": "cloudflare.com",
  "domain": "cloudflare.com",
  "tld": "com",
  "status": "registered",
  "rdap": { "status": "found", "server": "https://rdap.verisign.com/com/v1/" },
  "registration": {
    "created_at": "2009-02-17T22:07:54.000Z",
    "updated_at": "2024-01-09T16:45:28.000Z",
    "expires_at": "2033-02-17T22:07:54.000Z",
    "age_days": 6488,
    "expires_in_days": 2277,
    "registrar": { "name": "Cloudflare, Inc.", "iana_id": "1910" },
    "statuses": [
      "client delete prohibited",
      "client transfer prohibited",
      "client update prohibited",
      "server delete prohibited",
      "server transfer prohibited",
      "server update prohibited"
    ],
    "nameservers": ["ns3.cloudflare.com", "ns4.cloudflare.com", "ns5.cloudflare.com", "ns6.cloudflare.com", "ns7.cloudflare.com"],
    "dnssec": true
  },
  "dns": {
    "status": "NOERROR",
    "a": ["104.16.132.229", "104.16.133.229"],
    "aaaa": ["2606:4700::6810:84e5", "2606:4700::6810:85e5"],
    "mx": [
      { "priority": 5, "exchange": "mxa-canary.global.inbound.cf-emailsecurity.net" },
      { "priority": 5, "exchange": "mxb-canary.global.inbound.cf-emailsecurity.net" },
      { "priority": 10, "exchange": "mxa.global.inbound.cf-emailsecurity.net" },
      { "priority": 10, "exchange": "mxb.global.inbound.cf-emailsecurity.net" }
    ],
    "ns": ["ns3.cloudflare.com", "ns4.cloudflare.com", "ns5.cloudflare.com", "ns6.cloudflare.com", "ns7.cloudflare.com"],
    "txt": {
      "records": 29,
      "spf": "v=spf1 ip4:199.15.212.0/22 ip4:173.245.48.0/20 include:_spf.google.com include:spf1.mcsv.net include:spf.mandrillapp.com include:mail.zendesk.com include:stspg-customer.com include:_spf.salesforce.com -all",
      "verifications": ["apple", "atlassian", "cisco", "facebook", "google", "microsoft", "miro", "onetrust", "stripe"]
    }
  },
  "email": {
    "mx": true,
    "null_mx": false,
    "provider": null,
    "spf": true,
    "spf_all": "fail",
    "dmarc": true,
    "dmarc_policy": "reject",
    "disposable": false
  },
  "credits_used": 1,
  "cached": false
}

Read the status

status What it means What to do
registered The registry has a record of the domain, or the domain is delegated in DNS (it has NS records). Read age, expiry and registrar in registration when rdap.status is found.
not_registered The registry's RDAP server answered that it has no record of the name, and DNS shows no delegation. Do not treat it as a working domain. The name may be free to register, or reserved by the registry.
unknown Neither RDAP nor DNS tells. Look at rdap.status: on error, try again later.
rdap.status What it means Billed
found The registry's RDAP server returned the domain, and registration is filled. Yes
not_found The RDAP server answered that the domain does not exist. Yes
unsupported The TLD has no RDAP server in the IANA bootstrap file, as for .de. registration is null; dns and email are filled as usual. Yes
error The RDAP server did not answer in time or answered with an error, or the bootstrap file could not be read. registration is null. No

An error answer is not cached: send the same request again later. Answers whose NS query got SERVFAIL, REFUSED or TIMEOUT are billed but not cached either, so the next request asks DNS again.

How the lookup works

  1. The host is taken from the input and reduced to its registrable domain, with a list of multi-label public suffixes such as co.uk and com.au.
  2. The RDAP server of the TLD is read from the IANA bootstrap file (RFC 9224), kept one day.
  3. The domain is requested from that server (GET {server}domain/{domain}, RFC 9082), and the events, entities, status, nameservers and secure DNS members of the answer (RFC 9083) are read.
  4. In parallel, A, AAAA, MX, NS and TXT records are resolved over DNS over HTTPS, the DMARC record is read at _dmarc.{domain}, and the domain is checked against the disposable list.

What the API keeps

The response holds the registrar, never the registrant: registries redact registrant contacts in public RDAP answers, and the API does not ask for them. The request log keeps the registrable domain in clear, because it identifies an organization, not a person.

Look up the domain of an email address

Send the address as it is: the API keeps the host and reduces it to the registrable domain. Test keys return a sample registration for any valid domain, without calling RDAP or DNS. With a test key in QELKA_API_KEY, this request returns:

curl https://api.qelka.com/v1/domain \
  --max-time 30 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "jane@shop.example.co.uk"}'
const response = await fetch('https://api.qelka.com/v1/domain', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ domain: 'jane@shop.example.co.uk' }),
  signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/domain",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"domain": "jane@shop.example.co.uk"},
    timeout=30,
)
result = response.json()
print(result)
Response
{
  "id": "lkp_01M8714KE3VGXNBG6S8NNTN89W",
  "object": "domain",
  "input": "jane@shop.example.co.uk",
  "domain": "example.co.uk",
  "tld": "uk",
  "status": "registered",
  "rdap": { "status": "found", "server": "https://rdap.example.test/" },
  "registration": {
    "created_at": "2010-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z",
    "expires_at": "2030-01-01T00:00:00.000Z",
    "age_days": 6000,
    "expires_in_days": 1000,
    "registrar": { "name": "Example Registrar, Inc.", "iana_id": "9999" },
    "statuses": ["client transfer prohibited"],
    "nameservers": ["ns1.example.co.uk", "ns2.example.co.uk"],
    "dnssec": false
  },
  "dns": {
    "status": "NOERROR",
    "a": ["192.0.2.10"],
    "aaaa": ["2001:db8::10"],
    "mx": [{ "priority": 10, "exchange": "mx.example.co.uk" }],
    "ns": ["ns1.example.co.uk", "ns2.example.co.uk"],
    "txt": { "records": 2, "spf": "v=spf1 -all", "verifications": ["google"] }
  },
  "email": {
    "mx": true,
    "null_mx": false,
    "provider": null,
    "spf": true,
    "spf_all": "fail",
    "dmarc": true,
    "dmarc_policy": "reject",
    "disposable": false
  },
  "credits_used": 0,
  "cached": false
}

Errors

Status Type When
400 invalid_request domain is missing, empty or longer than 320 characters, the body is not a JSON object, or it has a field the request table does not list
401 invalid_api_key The key is missing, unknown or revoked
402 insufficient_credits Your balance is less than 1 credit (live keys only)
403 forbidden The key is restricted to other endpoints
405 invalid_request The method is not POST
422 unprocessable_input The input is not a domain name, a URL or an email address with a valid domain, such as localhost or a string with spaces
429 rate_limited Too many requests: wait Retry-After seconds
500 internal_error Unexpected error on our side: retry with backoff

No error is billed. When the registry does not answer, the API does not return an error: it answers 200 with rdap.status: "error" and credits_used: 0.