Dns Lookup Actor avatar
Dns Lookup Actor
Under maintenance

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Dns Lookup Actor

Dns Lookup Actor

Under maintenance

An Apify Actor that performs DNS lookups for given domain names and record types, with optional custom DNS server support.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Balasai Sigireddy

Balasai Sigireddy

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

6 days ago

Last modified

Share

An Apify Actor that performs DNS lookups for given domain names and record types, with optional custom DNS server support.

Included features

  • DNS Record Lookup: Query various DNS record types (A, AAAA, MX, CNAME, TXT, NS, SOA, PTR, SRV, CAA, DS, DNSKEY)
  • Custom DNS Server: Optionally specify a DNS server (e.g., 8.8.8.8) for lookups
  • Structured Output: Results stored in Apify dataset with name, type, value, and TTL
  • Error Handling: Graceful handling of NXDOMAIN, no answers, and other DNS errors
  • Apify Integration: Built with Apify SDK for seamless cloud deployment

Input

  • domain (string, required): The domain name to lookup (e.g., example.com)
  • record_type (string, optional): DNS record type, default "A"
  • dns_server (string, optional): Custom DNS server IP address

Output

Dataset containing objects with:

  • name: Domain name
  • type: Record type
  • value: Record value
  • ttl: Time to live

Usage

  1. Set input in storage/key_value_stores/default/INPUT.json
  2. Run locally: apify run
  3. View results in storage/datasets/default/

Example

Input:

{
"domain": "google.com",
"record_type": "A",
"dns_server": "8.8.8.8"
}

Output:

{
"name": "google.com",
"type": "A",
"value": "142.250.195.78",
"ttl": 190
}

Deploy to Apify

Connect Git repository to Apify

If you've created a Git repository for the project, you can easily connect to Apify:

  1. Go to Actor creation page
  2. Click on Link Git Repository button

Push project on your local machine to Apify

You can also deploy the project on your local machine to Apify without the need for the Git repository.

  1. Log in to Apify. You will need to provide your Apify API Token to complete this action.

    $apify login
  2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under Actors -> My Actors.

    $apify push

Documentation reference

To learn more about Apify and Actors, take a look at the following resources: