docs > APIs

Public API

dnstwister exposes a public API that you can use to perform dnstwister-related queries. This API is a self-documenting.

This API is stable and you are welcome to consume it in your project as long as you don't abuse it.

JSON search exports

When you perform a search on dnstwister you can choose to download a CSV or JSON export of the results from the links on the search page.

The format for these URLs is: https://dnstwister.report/search/[domain as hex]/json

The public-facing API provides a convenient function to convert a domain to a hex representation.

Subscriber API

Paid-tier subscribers have access to two API endpoints that expose information across their portfolio of subscriptions.

deltas.json

deltas.json contains all the delta reports (used to generate alert emails) for your subscribed domain portfolio. Each subscribed domain's delta report is updated approximately every 24 hours.

Example partial API response:

[
  {
    "delta": {
      "deleted": [
        {
          "domain_ascii": "excample.com",
          "domain_unicode": "excample.com"
        },
        ...
      ],
      "new": [
        {
          "domain_ascii": "exsample.com",
          "domain_unicode": "exsample.com",
          "mx_record_exists": false,
          "ip": "216.157.88.23",
        },
        ...
      ],
      "new_mx_only": [],
      "updated": [
        {
          "domain_ascii": "exalple.com",
          "domain_unicode": "exalple.com",
          "mx_record_exists": true,
          "new_ip": "192.187.111.219",
          "old_ip": "81.17.18.196"
        },
        ...
      ]
    },
    "subscribed_domain_ascii": "example.com",
    "subscribed_domain_unicode": "example.com",
    "updated_utc": "2020-11-28T18:47:46Z"
  },
  ...
]

resolved.json

resolved.json contains all the currently resolved dnstwister matches across your subscribed portfolio. Each subscribed domain's resolution report is updated approximately every 24 hours.

Example partial API response:

[
   {
    "resolved": [
      {
        "domain_ascii": "eample.com",
        "domain_unicode": "eample.com",
        "ip": "69.172.201.208",
        "mx_record_exists": true
      },
      {
        "domain_ascii": "examle.com",
        "domain_unicode": "examle.com",
        "ip": null,
        "mx_record_exists": true
      },
      {
        "domain_ascii": "exampe.com",
        "domain_unicode": "exampe.com",
        "ip": "72.52.179.174",
        "mx_record_exists": false
      },
      ...
    ],
    "subscribed_domain_ascii": "example.com",
    "subscribed_domain_unicode": "example.com",
    "updated_utc": "2020-11-28T18:47:46Z"
  },
  ...
]