DNS

Consulta DNS

Resolve um domínio contra três fontes ao mesmo tempo (os servidores autoritativos, o resolver do Google e o da Cloudflare) e diz se ele aparece em listas de bloqueio conhecidas.

DNS lookup

Resolves a domain against three sources at once (the authoritative servers, Google's resolver and Cloudflare's) and flags whether it shows up on known blocklists.

SYNC resposta na mesma chamada answers in the same call

Endpoint

Endpoint

GET /api/v1/dns/{domain} resolve um domínio resolves a domain

Parâmetros

Parameters

NomeNameOndeInDescriçãoDescription
domain path domínio válido, sem http:// (ex.: exemplo.com.br) a valid domain, without http:// (e.g. example.com)

Exemplo

Example

curl https://api.alicercelabs.com.br/api/v1/dns/exemplo.com.br \
          -H "Authorization: Bearer <token>"
{
          "success": true,
          "data": {
            "domain": "exemplo.com.br",
            "authoritative": {
              "servers": ["ns1.exemplo.com.br", "ns2.exemplo.com.br"],
              "records": [{ "type": "A", "value": "203.0.113.10" }]
            },
            "google": [{ "type": "A", "value": "203.0.113.10" }],
            "cloudflare": [{ "type": "A", "value": "203.0.113.10" }],
            "security": {
              "blocked_big": false,
              "blocked_nsfw": false
            }
          },
          "meta": { "elapsed_ms": 38, "request_id": "..." }
        }

Erros possíveis

Possible errors

StatusMotivoReason
400domínio inválidoinvalid domain
401token ausente ou inválidomissing or invalid token
429limite de taxa excedidorate limit exceeded
503erro ao resolver o domínio nas fontes upstreamupstream resolution failed

Usando o SDK

Using the SDK

Um método só: devolve os mesmos registros e a mesma checagem de blocklist do endpoint HTTP.

Just one method: returns the same records and blocklist check as the HTTP endpoint.

SDKs oficiais: Go · Python · JavaScript.

Official SDKs: Go · Python · JavaScript.

Consultar um domínio

Look up a domain

import (
	"context"
	"fmt"

	alicercelabs "github.com/alicercelabs/alicercesdk-go"
)

client := alicercelabs.New("alk_...")
ctx := context.Background()

res, err := client.DNS.Lookup(ctx, "google.com")
if err != nil {
	panic(err)
}
fmt.Println(res.Authoritative.Servers)
fmt.Println(res.Security.BlockedBig, res.Security.BlockedNSFW)
from alicercelabs import AlicerceLabs

client = AlicerceLabs(api_key="alk_...")

res = client.dns.lookup("google.com")
print(res["authoritative"]["servers"])
print(res["security"]["blocked_big"], res["security"]["blocked_nsfw"])
import { AlicerceLabs } from "alicercesdk-javascript";

const client = new AlicerceLabs("alk_...");

const res = await client.dns.lookup("google.com");
console.log(res.authoritative.servers);
console.log(res.security.blocked_big, res.security.blocked_nsfw);

Limites

Limits

100/dia · 4/hora sem token, por IP chamador; com uma API key (gerada no painel), 1.000/dia · 41/hora. As listas de bloqueio (blocked_big/blocked_nsfw) são atualizadas periodicamente. A checagem não faz nenhuma chamada externa extra.

100/day · 4/hour without a token, per calling IP; with an API key (generated in the panel), 1,000/day · 41/hour. Blocklists (blocked_big/blocked_nsfw) are updated periodically. The check makes no extra outbound call.