LabStack Docs
Login Signup

Domain DNS

Lookup DNS record of a domain name

Request

GET https://domain.labstack.com/api/v1/:type/:domain

Parameter Description Type Required Default
type DNS record type e.g. A String Yes
domain Domain name String Yes
curl \
  -X GET https://domain.labstack.com/api/v1/A/twilio.com \
  -H 'Authorization: Bearer <API_KEY>'
c := labstack.NewClient("<API_KEY>")
s := c.Domain()
res, err := s.DNS(&domain.DNSRequest{
  Type: "A",
  Domain: "twilio.com",
})
if err != nil {
  fmt.Println(err)
}
Client client = new Client("<API_KEY>");
DomainService service = client.domain();
try {
  DNSRequest request = DNSRequest.builder().type("A").domain("twilio.com").build();
  DNSResponse response = service.dns(request);
} catch (LabStackException e) {
  e.printStackTrace();
}
const client = new Client("<API_KEY>")
const service = client.domain();
try {
  const response = await service.dns({
    type: "A",
    domain: "twilio.com"
  });
} catch (error) {
  console.error(error);
}
client = Client("<API_KEY>")
service = client.domain()
try:
  response = service.dns({
    "type": "A",
    "domain": "twilio.com"
  })
except LabStackError as e:
  print(e)

Response

{
  "records": [
    {
      "domain": "twilio.com.",
      "type": "A",
      "server": "",
      "A": "3.210.161.252",
      "AAAA": "",
      "CNAME": "",
      "MX": "",
      "NS": "",
      "PTR": "",
      "serial": 0,
      "refresh": 0,
      "retry": 0,
      "expire": 0,
      "priority": 0,
      "weight": 0,
      "port": 0,
      "target": "",
      "TXT": null,
      "ttl": 55,
      "class": "IN",
      "SPF": null
    }
  ]
}