Skip to main content
GET
/
dns
/
v2
/
lookup
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
response = client.dns.lookup()
print(response)
[
  {
    "content": [
      "<string>"
    ],
    "name": "<string>",
    "ttl": 123,
    "type": "<string>"
  }
]

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

name
string

Domain name

request_server
enum<string>

Server that will be used as resolver

Available options:
authoritative_dns,
google,
cloudflare,
open_dns,
quad9,
gcore

Response

LookupResponse

content
string[]
name
string
ttl
integer<int32>
type
string