# DNS Lookup API

Use our DNS record API to retrieve A, AAAA, MX, TXT, and other records to troubleshoot propagation issues and verify domain configurations.

### Integrate with your stack

Python  
  
NodeJS  
  
Go  
  
PHP  
  
Java  
  
Ruby  
  
cURL

```python
import requests

url = "https://api.geekflare.com/dnsrecord"
payload = {"url": "example.com", "types": ["A", "MX"]}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)
```

## Why Geekflare DNS API

### Record Support

Query all major DNS record types including A, AAAA, CNAME, MX, TXT, NS, SOA, and CAA in a single request.

### Email Security Verification

Validate email configuration by retrieving SPF, DKIM, and DMARC policies stored within TXT records.

### Targeted Record Queries

Filter your request to retrieve specific record types (e.g., just MX or TXT) instead of fetching the entire DNS zone.

### Real-Time Data

We query authoritative nameservers directly to ensure you get the latest data without stale caching issues.

### JSON Output

Receive structured JSON responses that make it easy to integrate DNS data into your monitoring tools.

### High Availability

Built on a redundant Google Cloud infra to ensure your DNS queries are resolved quickly.

## DNS Checker API pricing

### Free

$0/mo  
500 Credits/mo  
Lookup ~500 Domains  
1 Request per second

### Starter

$9/mo  
5K Credits/mo  
Lookup ~5000 Domains  
5 Requests per second

### Growth

Most Popular  
$49/mo  
100K Credits/mo  
Lookup ~100K Domains  
25 Requests per second

### Business

$249/mo  
1M Credits/mo  
Lookup ~1M Domains  
50 Requests per second

## Other Geekflare API services

### Web Scraping API

Extract HTML, Markdown, or JSON from dynamic web pages with automatic CAPTCHA solving.

### Site Load Time API

Check how much time your site takes to load including DNS, Connect, TLS, and TTFB metrics.

### TLS Scanner API

Analyze SSL/TLS certificates for validity, issuer details, and expiration dates.

### Broken Link Checker API

Find dead internal and external links on a webpage.

### URL Redirection Checker API

Track redirect chains and analyze HTTP status codes to verify URL routing behavior.

## Frequently Asked Questions

### Is the DNS data cached?

No. We perform a live query at the time of your request to ensure you are seeing the current state of the DNS records.

### How much does a DNS Lookup cost?

A DNS lookup consumes **1 credit** per request.

### Can I check DNS records for a specific subdomain?

Yes, you can provide the full hostname (e.g., `app.example.com` or `mail.example.com`) to retrieve records specific to that subdomain.

### What types of DNS records can I retrieve?

With our DNS record API, you can retrieve all standard DNS record types like A, AAAA, CNAME, MX, TXT, NS, SOA, and PTR records.

### Can I integrate a Domain Lookup API into my application?

Yes, Geekflare Domain lookup API is developer-friendly REST API. You can integrate it into any custom application, SaaS dashboard, or backend script using standard HTTPS requests in your preferred programming language. Additionally, if you want to automate workflows, our DNS API connects seamlessly to no-code platforms like Zapier and Make to trigger automated domain monitoring and alerts.

## Ready to query DNS records?

Join thousands of developers using Geekflare API to retrieve real-time DNS data.
