# DNS Checker API

### **About**

It offers developers, network administrators, and cybersecurity professionals a straightforward means to retrieve various DNS records associated with a domain name.

By leveraging the DNS Checker API, users can obtain detailed insights into a domain's DNS configuration, including A (IPv4 address), AAAA (IPv6 address), HTTPS, MX (Mail Exchange), NS (Name Server), SOA (Start of Authority), TXT (Text), HINFO (Host Information) and many other records.

The API returns the DNS records in a structured JSON format, allowing for easy integration into applications, scripts, and tools. Each record type is accompanied by its corresponding values, enabling users to quickly interpret and utilize the information as needed.

Whether it's verifying DNS configurations, diagnosing network issues, conducting security assessments, or monitoring DNS changes over time, the DNS Checker API offers versatile functionality to address a wide range of use cases effectively.

With its user-friendly interface and comprehensive data coverage, the DNS Checker API serves as a valuable resource for enhancing DNS management and analysis tasks.

#### Developer Portal:[ ](https://api.market/store/magicapi/dnschecker)<https://api.market/store/magicapi/dnschecker>

### Curl Requests and Responses

**Process the API**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/magicapi/dnschecker/dnschecker' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "domain": "api.market"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY',
    'Content-Type': 'application/json',
}

json_data = {
    'domain': 'api.market',
}

response = requests.post('https://api.magicapi.dev/api/v1/magicapi/dnschecker/dnschecker', headers=headers, json=json_data)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/magicapi/dnschecker/dnschecker');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'accept: application/json',
    'x-magicapi-key: API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n  \"domain\": \"api.market\"\n}");

$response = curl_exec($ch);

curl_close($ch);
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.magicapi.dev/api/v1/magicapi/dnschecker/dnschecker',
  {
    'domain': 'api.market'
  },
  {
    headers: {
      'accept': 'application/json',
      'x-magicapi-key': 'API_KEY',
      'Content-Type': 'application/json'
    }
  }
);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch('https://api.magicapi.dev/api/v1/magicapi/dnschecker/dnschecker', {
  method: 'POST',
  headers: {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'domain': 'api.market'
  })
});
```

{% endtab %}
{% endtabs %}

#### The response would be like this <a href="#the-response-would-be-like-this" id="the-response-would-be-like-this"></a>

```json
[
    {
        "record_type": "A",
        "value": [
            "172.67.194.239",
            "104.21.90.42"
        ]
    },
    {
        "record_type": "AAAA",
        "value": [
            "2606:4700:3035::6815:5a2a",
            "2606:4700:3034::ac43:c2ef"
        ]
    },
    {
        "record_type": "HTTPS",
        "value": [
            "1 . alpn=\"h3,h2\" ipv4hint=\"104.21.90.42,172.67.194.239\" ipv6hint=\"2606:4700:3034::ac43:c2ef,2606:4700:3035::6815:5a2a\""
        ]
    },
    {
        "record_type": "MX",
        "value": [
            "0 api-market.mail.protection.outlook.com."
        ]
    },
    {
        "record_type": "NS",
        "value": [
            "lee.ns.cloudflare.com.",
            "roxy.ns.cloudflare.com."
        ]
    },
    {
        "record_type": "SOA",
        "value": [
            "lee.ns.cloudflare.com. dns.cloudflare.com. 2336594289 10000 2400 604800 1800"
        ]
    },
    {
        "record_type": "TXT",
        "value": [
            "\"v=spf1 include:spf.protection.outlook.com -all\"",
            "\"MS=ms30007217\"",
            "\"google-site-verification=W-7F4ksUW4DMk3-PRLpk940D6-5HD1WseH4EtpywD_c\""
        ]
    },
    {
        "record_type": "HINFO",
        "value": [
            "RFC8482 "
        ]
    }
]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.api.market/api-product-docs/magicapi/dns-checker-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
