What is it?
The Diwigo DNS API returns the DNS records of a domain: A, AAAA, CNAME, MX, NS, TXT (SPF, DMARC), SOA and CAA.
It answers with JSON and is included in the free plan: 10,000 requests per API key and per month.
Example request
GET https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX
Parameters
| Parameter | Description |
|---|---|
key | Your API key (required) |
dns | Domain name |
type | A, AAAA, CNAME, MX, NS, TXT, SOA, CAA or ALL (default ALL) |
Code examples
cURL
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX"
JavaScript
const res = await fetch("https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX");
const data = await res.json();
console.log(data);
PHP
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX");
$data = json_decode($response, true);
print_r($data);
Python
import requests
response = requests.get("https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX")
print(response.json())
Use cases
- Check mail settings (MX, SPF, DMARC)
- Verify a domain before connecting it
- Debug DNS changes
DNS lookup: questions and answers
What does the DNS lookup API do?
The Diwigo DNS API returns the DNS records of a domain: A, AAAA, CNAME, MX, NS, TXT (SPF, DMARC), SOA and CAA.
How do I call the DNS lookup API?
Send a GET request to https://landing.diwigo.com/api/?key=YOUR_API_KEY&dns=diwigo.com&type=MX with your own API key instead of YOUR_API_KEY. It answers with JSON.
Is the DNS lookup API free?
Yes, it is included in the free plan: 10,000 requests per API key and per calendar month, shared by all Diwigo endpoints. Higher limits are available on request.