Deprecated

Domain Activity API v1

The v1 API remains active for existing subscribers. New integrations should use API v2, which provides a richer feature set and a more consistent response schema. Existing v1 keys also work with v2.

Deprecated Still Active v1 Keys Work on v2
View v2 Docs

Recommended for new integrations

This API version is deprecated. It continues to function and existing integrations are not affected. However, no new features will be added to v1. If you are starting a new integration, use the v2 API. Your existing v1 API key and secret will work with v2 without any changes.

API Endpoint

GET https://api.codepunch.com/dnfeed.php

All requests are made to this single endpoint using query string parameters. All requests must use HTTPS.

Authentication

Authentication is a two-step process. First exchange your API key and secret for a session token, then use that token in subsequent calls.

Step 1: Get a token

https://api.codepunch.com/dnfeed.php?c=auth&k=YOUR_API_KEY&s=YOUR_API_SECRET

On success the response is a plain text token:

OK: zzzzzzzzzzzzzzzzzz

Error: Access Denied

The token is valid as long as your IP address does not change. Generate a new token at the start of each session. Do not make more than one auth request per second.

Step 2: Use the token

Pass the token as the t parameter in all subsequent requests:

https://api.codepunch.com/dnfeed.php?t=YOUR_TOKEN&d=20240101&kw=apple%25

Parameters

Parameter Values Description
t string Your session token (required on all calls after auth)
d yyyymmdd Date to query. Defaults to current date if omitted. Up to 30 days prior.
kw string Keyword filter. Use % for wildcard: apple% starts with, %apple ends with, %apple% contains. URL encode % as %25.
f json, text, xml, raw Output format. Default json.
m stats Set to stats to return domain counts only, without the full domain list.
start integer Starting index for pagination. Default 0.
limit integer Records per page. Default 2000, maximum 5000.
z string Restrict results to a specific TLD. Use ASCII format (e.g. com, net).
idn 0, 1 IDN filter. 0 returns non-IDN only, 1 returns IDN only. Omit for all.
c auth, latestzip Command. Use auth for authentication, latestzip to download a ZIP file.
src added, deleted Used with c=latestzip. Specifies whether to download added or deleted domains.

Example Requests

Get domain counts for a date

https://api.codepunch.com/dnfeed.php?t=TOKEN&d=20171217&m=stats

Get .com domains containing "apple"

https://api.codepunch.com/dnfeed.php?t=TOKEN&d=20171217&kw=%25apple%25&z=com

Paginated results

# Page 1
https://api.codepunch.com/dnfeed.php?t=TOKEN&d=20171215&start=0&limit=2000

# Page 2
https://api.codepunch.com/dnfeed.php?t=TOKEN&d=20171215&start=2000&limit=2000

Download latest ZIP

# Added domains
https://api.codepunch.com/dnfeed.php?t=TOKEN&c=latestzip&src=added

# Deleted domains
https://api.codepunch.com/dnfeed.php?t=TOKEN&c=latestzip&src=deleted

# Specific date
https://api.codepunch.com/dnfeed.php?t=TOKEN&c=latestzip&src=added&d=20200712