Skip to main content

DNS Lookup API

DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.

Build Status Code Climate Prod Ready

This is a Python API Wrapper for the DNS Lookup API


Installation

pip install apiverve-dnslookup

Configuration

Before using the dnslookup API client, you have to setup your account and obtain your API Key.
You can get it by signing up at https://apiverve.com


Usage

The DNS Lookup API documentation is found here: https://docs.apiverve.com/api/dnslookup.
You can find parameters, example responses, and status codes documented here.

Setup

# Import the client module
from apiverve_dnslookup.apiClient import DnslookupAPIClient

# Initialize the client with your APIVerve API key
api = DnslookupAPIClient("[YOUR_API_KEY]")

Perform Request

Using the API client, you can perform requests to the API.

Define Query
query = { "domain": "myspace.com" }
Simple Request
# Make a request to the API
result = api.execute(query)

# Print the result
print(result)
Example Response
{
  "status": "ok",
  "error": null,
  "data": {
    "domain": "myspace.com",
    "records": {
      "A": [
        "34.111.176.156"
      ],
      "NS": [
        "ns-cloud-a2.googledomains.com",
        "ns-cloud-a1.googledomains.com",
        "ns-cloud-a3.googledomains.com",
        "ns-cloud-a4.googledomains.com"
      ],
      "SOA": {
        "nsname": "ns-cloud-a1.googledomains.com",
        "hostmaster": "cloud-dns-hostmaster.google.com",
        "serial": 2,
        "refresh": 21600,
        "retry": 3600,
        "expire": 259200,
        "minttl": 300
      },
      "MX": [
        {
          "exchange": "us-smtp-inbound-1.mimecast.com",
          "priority": 10
        },
        {
          "exchange": "us-smtp-inbound-2.mimecast.com",
          "priority": 10
        }
      ],
      "TXT": [
        [
          "cj65vjpq0s1v9u7vfo020c6rel"
        ],
        [
          "google-site-verification=q0iWqpcfOBclAJaCeWh83v62QQ4uCgbWObQ08p37qgU"
        ],
        [
          "qpdYoeakhlmAxsnmxgAVFmJgUSibqb/y+Eu6GGn8pdmLf+mFGIB3jhRAxIC5KObsPMES9MW2c+oOrpOo/lCQVw=="
        ],
        [
          "oZ19a+EOIwWVDPJ7POj14UAGBfzk9xcJMmsTUAMUy7H82sDuVCxvw9rZqdg3znFrdTH04+49zd1djhEAt0ooiA=="
        ],
        [
          "v=spf1 mx ip4:63.208.226.34 ip4:204.16.32.0/22 ip4:67.134.143.0/24 ip4:216.205.243.0/24 ip4:34.85.156.5/32 ip4:35.245.108.108/32 ip4:34.86.129.193/32 ip4:34.86.134.94/32 ip4:34.85.222.234/32 ip4:34.86.176.234/32 ip4:34.86.125.212/32 ip4:34.85.224.60/32 ip4:34.86.160.49/32 ip4:35.245.64.166/32 ip4:35.188.226.11/32 ip4:34.86.208.228/32 ip4:34.85.216.144/32 ip4:35.221.22.153/32 ip4:34.86.137.108/32 ip4:34.86.51.35/32 ip4:34.150.221.40/32 ip4:34.85.216.70/32 ip4:34.86.37.191/32 ip4:34.85.214.215/32 ip4:35.236.234.82/32 ip4:34.86.161.241/32 ip4:216.32.181.16 ip4:216.178.32.0/20 ip4:168.235.224.0/24 include:_netblocks.mimecast.com -all"
        ],
        [
          "google-site-verification=eu-3gW1JePvsGRRCaEvH17YUOTFJNofm4lnz2Pk0LTc"
        ],
        [
          "cr40m536tje9on1slld9bi81bg"
        ],
        [
          "al4upe6q5cl13sg4srvfivflvg"
        ],
        [
          "MS=ms89904786"
        ]
      ]
    }
  }
}

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


Legal

All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the The MIT License (MIT)

Copyright (©) 2024 APIVerve, and Evlar LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for apiverve-dnslookup 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apiverve-dnslookup 1.1.2
File Size Uploaded
apiverve_dnslookup-1.1.2.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apiverve-dnslookup 1.1.2
File Interpreter ABI Platform
apiverve_dnslookup-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / apiverve_dnslookup-1.1.2.tar.gz

Download URL apiverve_dnslookup-1.1.2.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3779bd46e0d80d375a0c281d4e9d35a75e053894352be62339d3d3b7dbdf39b9
BLAKE2b-256 checksum
How to use checksums
4ebb63b76164d0e88ddc442dd188383dbb6b3cef770fe458c45ed6ff58f4c6c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / apiverve_dnslookup-1.1.2-py3-none-any.whl

Download URL apiverve_dnslookup-1.1.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdd6868d52fc976ebf7968430e37c6dbe016a7271efcbda432ac497e824c3d23
BLAKE2b-256 checksum
How to use checksums
83d64e9e90e911e260a623951d4cfce37b63ac9b15de98ca03af303979cdec3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

1.2.0

2 release files

1.1.14

2 release files

1.1.7

2 release files

1.1.5

2 release files

1.1.4

2 release files

This release

1.1.2 This release

2 release files

1.0.11

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page