Dns Lookup Actor
Pricing
from $0.01 / 1,000 results
Dns Lookup Actor
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
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
6 days ago
Last modified
Categories
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 nametype: Record typevalue: Record valuettl: Time to live
Usage
- Set input in
storage/key_value_stores/default/INPUT.json - Run locally:
apify run - 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:
- Go to Actor creation page
- 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.
-
Log in to Apify. You will need to provide your Apify API Token to complete this action.
$apify login -
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: