DNS Tools API

About

API Version: 1.5

The DNS Tools API allows you to look up DNS records for a given hostname.

The DNS Lookup tool currently supports these record types:

  • A (Host records)
  • CNAME (Canonical Name records)
  • MX (Mail Exchanger records)
  • NS (Name Server records)
  • SOA (Start of Authority records)
  • TXT (Text records)

Endpoints

GET
https://networkcalc.com/api/dns/lookup/{hostname}
DNS. Look up DNS records for a hostname, domain name, or IP address on the public Internet.

Parameters

{hostname}

The hostname, domain name, or IP address to look up.

Example: https://networkcalc.com/api/dns/lookup/example.com

Response Format

DNSResponse

Response Codes

200
OK - Success.
400
NO_HOST_SPECIFIED - The {hostname} parameter was not specified.
400
INVALID_HOST - The {hostname} parmaeter is not valid.
400
NO_RECORDS - The hostname is valid, but the query returned no results.
400
INVALID_STRING - The request format is incorrect. It should be a string.
400
FAILED_TO_VALIDATE - An error occurred while validating. Verify the request and try again.
400
NO_SPF_RECORD - An SPF record was not supplied in the body or there was no published SPF record found for {hostname}.
GET
https://networkcalc.com/api/dns/whois/{hostname}
WHOIS. Get the WHOIS registration information for a website's hostname, domain, or IP address.

Parameters

{hostname}

The hostname, domain name, or IP address to look up.

Example: https://networkcalc.com/api/dns/whois/example.com

Response Format

WHOISResponse

Response Codes

200
OK - Success.
400
NO_HOST_SPECIFIED - The {hostname} parameter was not specified.
400
INVALID_HOST - The {hostname} parmaeter is not valid.
400
NO_RECORDS - The hostname is valid, but the query returned no results.
400
INVALID_STRING - The request format is incorrect. It should be a string.
400
FAILED_TO_VALIDATE - An error occurred while validating. Verify the request and try again.
400
NO_SPF_RECORD - An SPF record was not supplied in the body or there was no published SPF record found for {hostname}.
POST
https://networkcalc.com/api/dns/spf/{hostname}
SPF. Look up the published SPF record for a domain or validate the syntax of a to-be-published SPF record.

Parameters

{hostname}

The hostname, domain name, or IP address to look up.

Example: https://networkcalc.com/api/dns/spf/example.com

Request Body

Response Format

SPFResponse

Response Codes

200
OK - Success.
400
NO_HOST_SPECIFIED - The {hostname} parameter was not specified.
400
INVALID_HOST - The {hostname} parmaeter is not valid.
400
NO_RECORDS - The hostname is valid, but the query returned no results.
400
INVALID_STRING - The request format is incorrect. It should be a string.
400
FAILED_TO_VALIDATE - An error occurred while validating. Verify the request and try again.
400
NO_SPF_RECORD - An SPF record was not supplied in the body or there was no published SPF record found for {hostname}.

Response Formats

DNSResponse

WHOISResponse