Domain Data Feed v2

Subscribe Now

API v2

You can use the API v1 keys to access API v2 too. Please contact us if you need any assistance. Remember to include your current subscription details like the email address used for subscription or API key (not the API secret key).

Domain (gTLD) Data Feed API (v1)

This data feed is meant only for trademark and malware analysis. Use of this feed data for any marketing purposes is fully prohibited.

API URL

Requests to our Domain API are sent to the following URL:

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

Note that requests should be sent over https (secure socket) for security.

Authorization

To get started with the API you need to first send the access and secret keys. These are provided to you after purchase. After successful authentication you will receive a token key that can be used for further API calls.

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

xxxxxxx is your access key and yyyyyy is your secret key

If the authentication is successful, you should see...

OK: zzzzzzzzzz

Otherwise you will get...

Error: Access Denied

zzzzzzzz is the token you would use to make the rest of your API calls. You should make further calls only from the same IP address that was used for authorization.

Important: The generated token will often expire after a few hours, please create a new token when you start a new session.

Output Formats

Use the f parameter to specify the output format. The options are...

text,xml,raw and json

The default is json

Specifying the date

Use the d parameter to specify the date in yyyymmdd format (20171218, 20180123, etc.)

If the d parameter is absent, the current date will be applied. You can obtain the data for up to 30 previous days.

Specifying Keywords

Use the kw parameter to specify a keyword to search for. You can use % to find domains that start with, end with or contain keywords. For example,

&kw=apple%
&kw=%apple
&kw=%apple%

Important: Remember to URL encode the keywords that contain % (The % should be sent as %25).

Data Limits

The API will return only 2000 results at a time. You can use the start and limit parameters and multiple calls to obtain the full data.

https://api.codepunch.com/dnfeed.php?t=zzzzzzz&d=20171215&start=2000&limit=3000

The maximum allowable value for limit parameter is 5000. Use the m=stats parameter to obtain the total count first and the use multiple calls with different start values to obtain the full data.

Obtaining Domain Counts

You can use the m parameter set to stats obtain only the domain counts.

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

TLDs

Use z=xxx to restrict results to a specific TLD. TLD should be in ASCII encoded format and not UNICODE. For example...

https://api.codepunch.com/dnfeed.php?t=zzzzzz&d=20171217&z=com

https://api.codepunch.com/dnfeed.php?t=zzzzzz&d=20171217&z=net

https://api.codepunch.com/dnfeed.php?t=zzzzzz&d=20171217&z=xn--czru2d

International Domain Names

Use idn=n to restrict results based on IDN. For example...

https://api.codepunch.com/dnfeed.php?t=zzzzzz&d=20171217&idn=0

will return only non IDNs

https://api.codepunch.com/dnfeed.php?t=zzzzzz&d=20171217&idn=1

will return only IDNs

Latest ZIP files

Use c=latestzip to download the latest ZIP file containing the domain names.

https://api.codepunch.com/dnfeed.php?t=zzzzzz&c=latestzip&src=added

will return the added domains

https://api.codepunch.com/dnfeed.php?t=zzzzzz&c=latestzip&src=deleted

will return the deleted domains

Use d=YYYYmmdd to obtain the ZIP file for a specific date (up to 30 days prior). For example...

https://api.codepunch.com/dnfeed.php?t=zzzzzz&c=latestzip&src=added&d=20200712