Skip to main content

Python client for the DomainKits REST API. Search expiring, newly registered, aged, active, deleted and marketplace domains, plus WHOIS, DNS, Certificate Transparency and trends.

Project description

domainkits

Python client for the DomainKits REST API.

DomainKits is one API with a shared key across every endpoint. This package covers all of them, six domain search types, WHOIS, DNS, reverse nameserver, Certificate Transparency, safety, trends and bulk download, with automatic paging and structured quota errors. No dependencies.

Requirements

The REST API is for Premium and Platinum accounts; unauthenticated requests are rejected with 401. Keys start with dk_ and come from domainkits.com.

Install

pip install domainkits

Usage

import os
from domainkits import DomainKits

dk = DomainKits(os.environ["DOMAINKITS_API_KEY"])

result = dk.expired.list(
    keyword="clinic",
    tld="com",
    length="5-10",
    no_number=True,
    no_hyphen=True,
)

print(f"{result['total']} matches")
for d in result["data"]:
    print(d["domain"], d["age"], d["status"])

Paging

A single request returns at most 500 results. paginate walks the whole result set for you:

for domain in dk.expired.paginate(keyword="clinic", tld="com"):
    print(domain["domain"])

It stops when the result set is exhausted. Break out of the loop whenever you have enough; no further requests are made.

Export

export pulls up to 50,000 rows as CSV in one request:

csv = dk.expired.export(tld="com", status="pending_delete")

This runs on a separate, much smaller quota, 10 per day and 100 per month on Premium, 3 and 9 during the trial. It is for occasional bulk pulls, not for a scheduled job. The export also returns fewer columns than paged mode: registered_date is the year only, and age is omitted.

50,000 is a cap, not a promise of completeness. Browsing .com matched 4,847,613 expiring domains on 27 July 2026, so an unfiltered export returns the first 50,000. Narrow the query if you need the result set to fit.

Search types

Attribute What it searches
dk.expired Domains in the deletion cycle: expired, redemption, pending delete
dk.nrds Newly registered domains, last 60 days
dk.aged Domains with 5 to 20+ years of registration history
dk.active Currently registered domains
dk.deleted Dropped domains (requires keyword)
dk.market Domains listed for sale on marketplaces

Each has list, paginate and export. Filters are passed as keyword arguments and match the REST parameter names: an expired result carries status, an NRD result carries expiry_date, a market result carries marketplace.

Other endpoints

dk.whois("example.com")
dk.dns("example.com")
dk.safety("example.com")
dk.ns_reverse("ns1.example.com", tld="com")
dk.tld_check("yourbrand")
dk.typosquat("example.com")
dk.ip_lookup("8.8.8.8")
dk.registrar("godaddy")
dk.status_guide("clientHold")
dk.monitor_changes(tld="com", reason="transfer")
dk.ct_subdomains("example.com")
dk.ct_certs(domain="example.com")
dk.ct_search("example")
dk.tld_trends("newly", tld="com")
dk.keyword_trends("hot")
dk.usage()
dk.search_status()

Coverage

gTLDs only for the domain search endpoints. The index covers generic TLDs: .com, .net, .org, .info, .biz, .xyz, .online, .site, .top, .club, .live, .app, .dev and others. Country-code TLDs are not indexed: a query for .de, .io, .co or .us returns an empty result set, not an error.

whois, dns, safety, ip_lookup and the Certificate Transparency endpoints work on any domain, ccTLDs included.

No PII. Responses contain no personal data. WHOIS results are limited to registrar, dates, status codes and nameservers; registrant names, emails, addresses and phone numbers are not returned.

Errors

from domainkits import DomainKits, DomainKitsError, RateLimitError, AuthError

try:
    dk.expired.export(tld="com")
except RateLimitError as error:
    print(f"Quota exhausted. Retry in {error.retry_after_ms}ms")
    print(error.rate_limit)
except AuthError:
    print("Key rejected, check your plan tier")
except DomainKitsError as error:
    print(error.status, error)

Every error carries the x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset values as a parsed rate_limit object. RateLimitError.retry_after_ms tells you how long until the window resets.

429 and 5xx responses are retried automatically, twice by default, waiting until the rate-limit window resets when that is under two minutes. Set max_retries=0 to handle it yourself.

Options

dk = DomainKits(
    api_key=os.environ["DOMAINKITS_API_KEY"],
    timeout=60.0,
    max_retries=2,
    base_url="https://premium-api.domainkits.com/api/v1",
)

Quotas

Call usage() for the live picture on your account; every endpoint reports its own per-minute, daily and monthly allowance alongside what you have already spent.

Daily quotas reset at 00:00 UTC, monthly quotas on the 1st. Current limits: domainkits.com/dev/api-docs.

Resources

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

domainkits-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

domainkits-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file domainkits-0.1.0.tar.gz.

File metadata

  • Download URL: domainkits-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for domainkits-0.1.0.tar.gz
Algorithm Hash digest
SHA256 037aced1d3b3f3be70717b4e1656bd1c662f073be63ee5bceb5f9c1c8cdf59ef
MD5 683653ae1d90ab227c5fa93f3539e1bf
BLAKE2b-256 f3ff37a02174fdf81d3fed971363922a1887293ee6c59a86f349c65d390c0420

See more details on using hashes here.

File details

Details for the file domainkits-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: domainkits-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for domainkits-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75120f080f74c9ed95fc79a0dffce8d1ae637e3063e1f0c33da7b77e21b24f4e
MD5 df52d6687e2453e13ee37970bf5b5598
BLAKE2b-256 09eed91956f7b41d574895c8d4a3ae9a476fdf03be1d610ed734b1406fb4f49e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page