API v2

Domain Activity API v2

https://api.codepunch.com/dnfeed/v2

Daily feeds of newly observed and no-longer-observed gTLD domains derived from public DNS and registry-related activity signals. The API also provides trademark, company-name, brand-name, and other keyword occurrence statistics, TLD information, and bulk ZIP downloads for pipeline ingestion.

This is a daily activity feed, not a full gTLD search database. Use this API when you want daily added/deleted domain data. If you need to search the broader indexed DNS/gTLD dataset for trademarks, company names, product names, suspicious terms, nameserver-hosted domain lists, DNS records, PTR, ASN, or observed subdomains, use the DNS API.

Authenticate using the common API v2 flow described in Authentication, then place the returned token in the request path. A legacy v1 API remains active at dnfeed.php for existing subscribers. New integrations should use v2. Existing v1 keys work on v2 without any changes.

List TLDs

GET /{token}/tlds

Returns supported TLDs with registry details, current domain counts, latest add/delete counts, and the last processed date. By default the endpoint returns TLDs processed recently; use listall=true to include the full known TLD list.

listall boolean optional

Set to true to include the full known TLD list instead of only recently processed/supported TLDs. Default false.

format enum optional

json (default) or txt. With txt, the returned data is reduced to a newline-separated TLD list.

Example

# Recently processed/supported TLDs
GET https://api.codepunch.com/dnfeed/v2/TOKEN/tlds

# Full known TLD list as plain text
GET https://api.codepunch.com/dnfeed/v2/TOKEN/tlds?listall=true&format=txt

Representative JSON response

{
  "status":  true,
  "records": 1136,
  "data": [
    {
      "tld":                  "com",
      "tld_ascii":            "com",
      "registry":             "Verisign",
      "registry_url":         "https://www.verisign.com/",
      "whois_server":         "whois.verisign-grs.com",
      "rdap_server":          "https://rdap.verisign.com/com/v1/",
      "domaincount":          158884998,
      "latest_add_count":     136409,
      "latest_delete_count":  113386,
      "last_processed":       "2023-08-29"
    }
  ]
}

Added Domains

GET /{token}/added

Returns domains newly observed in the daily gTLD activity data. If date is omitted, the API uses the current date with the default exact-date comparison.

date string optional

Date in yyyymmdd format. Omit to use the current date.

kw string optional

Domain-name keyword filter. Separate multiple patterns with | for OR matching. Supports the SQL-style % wildcard; URL-encode it as %25 in a literal URL. If a pattern contains no %, v2 applies its default prefix and hyphen-delimited matching behavior.

tlds string optional

Comma-separated list of TLDs. Example: com,net,org.

dcm enum optional

Date comparison mode: eq, lt, lte, gt, or gte. Default eq. The retained Domain Activity date window can vary from 14 to 45 days; 45 days is the possible upper limit.

idn integer optional

0 = non-IDN only, 1 = IDN only, 2 = all. Default 2.

format enum optional

json (default) or txt. With txt, the returned data is reduced to newline-separated fully qualified domain names.

sorton enum optional

date, domain, length, tld, or idn. Default date. Keep the same value across paginated calls.

sortorder enum optional

asc or desc. Default asc.

start integer optional

Starting result offset. Default 0.

limit integer optional

Records per request. Default 500, maximum 5000. Values below 0 or above 5000 fall back to 500.

dm enum optional

data (default) or stats. With stats, the API returns the matching-domain count without the domain rows.

Examples

# Current-date .com/.net domains containing "bank" or "login"
GET https://api.codepunch.com/dnfeed/v2/TOKEN/added?kw=%25bank%25%7C%25login%25&tlds=com,net&start=0&limit=500&sorton=date&sortorder=asc

# Count matching domains from a supplied date onward
GET https://api.codepunch.com/dnfeed/v2/TOKEN/added?date=YYYYMMDD&dcm=gte&kw=%25bank%25&dm=stats

# Text-format domain list
GET https://api.codepunch.com/dnfeed/v2/TOKEN/added?tlds=com&format=txt&limit=5000

Domain Activity is a recent-activity feed rather than a long-term archive. The retained date window can vary from 14 to 45 days. Applications that need longer historical coverage should collect and retain the daily feed in their own storage.

Representative JSON response

{
  "status":    true,
  "date":      "2023-08-23",
  "records":   210413,
  "source":    "added domains",
  "start":     0,
  "limit":     500,
  "sorton":    "date",
  "sortorder": "asc",
  "data": [
    {
      "domain": "albadigitalenterprises.scot",
      "name":   "albadigitalenterprises",
      "tld":    "scot",
      "length": 22,
      "idn":    0,
      "ipv4":   null,
      "date":   "2023-08-23"
    }
  ]
}

records is the total number of rows matching the filters; data contains only the current page.

Deleted Domains

GET /{token}/deleted

Returns domains no longer observed in the daily gTLD activity data. It accepts the same date, kw, tlds, dcm, idn, format, sorton, sortorder, start, limit, and dm parameters as Added Domains.

# Deleted .com domains containing "paypal" from a supplied date onward
GET https://api.codepunch.com/dnfeed/v2/TOKEN/deleted?date=YYYYMMDD&dcm=gte&kw=%25paypal%25&tlds=com&start=0&limit=500

Keyword Statistics

GET /{token}/keywords

Returns keyword occurrence statistics across daily added or deleted domains, including how many domains start with, end with, contain in the middle, or contain the keyword anywhere. Stored keyword rows are at least four characters long and have more than two total occurrences. The keyword statistics dataset covers non-IDN domains.

Keyword statistics are not the same as domain-name keyword filtering. The kw parameter on this endpoint matches a stored keyword exactly; % wildcards are not used here. Use Added Domains or Deleted Domains when you want wildcard matching against domain names.

date string optional

Date in yyyymmdd format. Omit to use the current date.

kw string optional

Exact stored keyword to match. Required for a meaningful aggregate request. Ignored by topkw.

tlds string optional

Comma-separated TLD filter. In topkw mode only one TLD is used: the first supplied value, or com when omitted.

dcm enum optional

Date comparison mode: eq, lt, lte, gt, or gte. Default eq. topkw always uses an exact date.

source enum optional

added or deleted. Default added; any other value falls back to added.

dm enum optional

data (default), stats, topkw, or aggregate. stats returns the count of matching keyword-statistic rows. topkw returns the most frequent keywords for one TLD on one exact date. aggregate sums the four occurrence counts for an exact kw across the matching rows.

sorton enum optional

tld, on_date, keyword, all_count, start_count, end_count, or mid_count. Default all_count. In topkw mode only the four count fields are accepted.

sortorder enum optional

asc or desc. Default desc. topkw always uses descending order.

start integer optional

Starting result offset. Default 0. topkw always resets this to 0.

limit integer optional

Records per request. Default 500, maximum 5000. Values below 0 or above 5000 fall back to 500.

Examples

# Exact keyword statistics for "shop" in .com
GET https://api.codepunch.com/dnfeed/v2/TOKEN/keywords?date=YYYYMMDD&kw=shop&tlds=com

# Top 20 keywords in .net for one date
GET https://api.codepunch.com/dnfeed/v2/TOKEN/keywords?date=YYYYMMDD&dm=topkw&tlds=net&sorton=all_count&limit=20

# Aggregate "shop" across matching added-domain statistic rows
GET https://api.codepunch.com/dnfeed/v2/TOKEN/keywords?date=YYYYMMDD&dcm=gte&kw=shop&source=added&dm=aggregate

Representative data response

{
  "status": true,
  "date":   "2024-06-02",
  "records": 1,
  "data": [
    {
      "keyword":                           "shop",
      "tld":                               "com",
      "added_on_date":                     "2024-06-02",
      "domains_starting_with_word":       213,
      "domains_ending_with_word":         405,
      "domains_with_word_in_middle":      95,
      "domains_containing_word_anywhere": 713
    }
  ]
}

Daily ZIP

GET /{token}/dailyzip/

Downloads the full added or deleted domain list as a ZIP file. Use the normal undated download for the previous day's completed file, date for a specific dated file, or latest for the current day's partial file containing domains processed so far.

source enum optional

added or deleted. Default added.

date string optional

Date in yyyymmdd format. When supplied, downloads the matching dated added/deleted ZIP. Omit for the previous day's completed ZIP.

latest flag optional

Add &latest to the query string with no value to download the current day's partial ZIP. Use only when date is omitted.

Examples

# Previous day's completed added-domains ZIP
GET https://api.codepunch.com/dnfeed/v2/TOKEN/dailyzip/?source=added

# Deleted-domains ZIP for a specific date
GET https://api.codepunch.com/dnfeed/v2/TOKEN/dailyzip/?source=deleted&date=YYYYMMDD

# Current-day added domains processed so far
GET https://api.codepunch.com/dnfeed/v2/TOKEN/dailyzip/?source=added&latest

For ready-to-run downloads, see the Python CLI Tool. Its -zip, -zd, -latest, -s, and -o options cover the ZIP modes above.