> For the complete documentation index see https://domscan.net/llms.txt. Markdown versions of every docs page are available by appending .md to the page URL.

Source: https://domscan.net/pt/docs/whois-lookup

# Consulta WHOIS

API da DomScan: Obtenha informações de WHOIS para um domínio incluindo registador, datas e estado.

Obtenha informações de WHOIS para um domínio incluindo registador, datas e estado.

**Nota de privacidade:** As informações de contato podem ser ocultadas por causa do GDPR e de outras regulamentações de privacidade. A API detecta quando serviços de privacidade ou proxy estão em uso e retorna um objeto `privacy` com detalhes da detecção.

GET /v1/whois 2 Créditos

#### Parâmetros de consulta

| Parâmetro | Tipo | Descrição |
| --- | --- | --- |
| domain obrigatório | string | Nome de domínio completo (por exemplo, example.com) |

#### Campos da resposta

| Campo | Tipo | Descrição |
| --- | --- | --- |
| `registered` | boolean | Indica se o domínio está registrado |
| `registrar` | string | Nome do registrador |
| `created_date` | string | Data de criação no formato ISO 8601 |
| `expiry_date` | string | Data de vencimento no formato ISO 8601 |
| `status` | array | Códigos de status EPP |
| `nameservers` | array | Servidores de nomes autorizados |
| `contacts` | object | Registrante, administrador, técnico, contatos de faturamento |
| `privacy` | object | Detecção de proteção de privacidade |

#### Exemplo de requisição

```bash
curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/whois?domain=github.com"
```

```javascript
const domscanFetch = (url, options = {}) =>
  fetch(url, {
    ...options,
    headers: { ...options.headers, "X-API-Key": "your-api-key" },
  });

const response = await domscanFetch(
  "https://domscan.net/v1/whois?domain=github.com"
);
const data = await response.json();

console.log(`Registrar: ${data.registrar}`);
console.log(`Created: ${data.created_date}`);
console.log(`Expires: ${data.expiry_date}`);
console.log(`Nameservers: ${data.nameservers.join(', ')}`);

// Check for privacy protection
if (data.privacy.is_private) {
  console.log(`Privacy service: ${data.privacy.privacy_service}`);
}
```

```python
import requests

domscan = requests.Session()
domscan.headers.update({"X-API-Key": "your-api-key"})

from datetime import datetime

response = domscan.get(
    "https://domscan.net/v1/whois",
    params={"domain": "github.com"}
)
data = response.json()

# Calculate days until expiration
expiry = datetime.fromisoformat(data['expiry_date'].replace('Z', '+00:00'))
days_left = (expiry - datetime.now(expiry.tzinfo)).days

print(f"Registrar: {data['registrar']}")
print(f"Expires in {days_left} days")
print(f"Privacy protected: {data['privacy']['is_private']}")
```

```go
package main

import (
  "encoding/json"
  "fmt"
  "net/http"
  "os"
)

func domscanGet(url string) (*http.Response, error) {
  request, err := http.NewRequest(http.MethodGet, url, nil)
  if err != nil {
    return nil, err
  }
  request.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
  return http.DefaultClient.Do(request)
}

func main() {
  resp, _ := domscanGet("https://domscan.net/v1/whois?domain=github.com")
  defer resp.Body.Close()

  var data map[string]interface{}
  json.NewDecoder(resp.Body).Decode(&data)

  fmt.Printf("Registrar: %s\n", data["registrar"])
  fmt.Printf("Created: %s\n", data["created_date"])
  fmt.Printf("Expires: %s\n", data["expiry_date"])
}
```

```ruby
require 'net/http'
require 'json'
require 'date'

uri = URI("https://domscan.net/v1/whois?domain=github.com")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
data = JSON.parse(response.body)

expiry = DateTime.parse(data['expiry_date'])
days_left = (expiry - DateTime.now).to_i

puts "Registrar: #{data['registrar']}"
puts "Expires in #{days_left} days"
```

#### Exemplo de resposta

```json
{
                "domain": "example.com",
                "registered": true,
                "registrar": "RESERVED-Internet Assigned Numbers Authority",
                "registrar_url": "https://www.iana.org",
                "registrar_iana_id": "376",
                "created_date": "1995-08-14T04:00:00Z",
                "updated_date": "2023-08-14T07:01:38Z",
                "expiry_date": "2024-08-13T04:00:00Z",
                "status": ["clientDeleteProhibited", "serverUpdateProhibited"],
                "nameservers": ["a.iana-servers.net", "b.iana-servers.net"],
                "dnssec": true,
                "contacts": {
                "registrant": {
                "name": "REDACTED FOR PRIVACY",
                "organization": "Internet Assigned Numbers Authority",
                "email": null,
                "phone": null,
                "address": {
                "country": "US"
                },
                "role": "registrant"
                },
                "admin": { "name": "Domain Administrator", "email": "admin@example.org" },
                "tech": { "name": "Technical Contact", "email": "tech@example.org" },
                "billing": null
                },
                "privacy": {
                "is_private": false,
                "privacy_service": null,
                "detected_patterns": []
                },
                "summary": {
                "has_registrant": true,
                "has_admin": true,
                "has_tech": true,
                "has_billing": false,
                "contact_count": 3,
                "is_privacy_protected": false
                },
                "raw_rdap_link": "https://rdap.verisign.com/com/v1/domain/example.com",
                "checked_at": "2025-01-07T10:30:00Z",
                "query_time_ms": 145
                }
```

POST /v1/whois/bulk 2/domain

Consulta WHOIS em lote para vários domínios (máximo de 20 por requisição).

#### Corpo da requisição

```json
{
                "domains": ["example.com", "google.com", "github.com"]
                }
```

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `results[]` | object[] |
| `results[]` | object |
| `results[].domain` | string |
| `results[].registered` | boolean \| null |
| `results[].available` | boolean \| null |
| `results[].availability_reason` | string |
| `results[].registrar` | string \| null |
| `results[].registrar_url` | string \| null |
| `results[].registrar_iana_id` | string \| null |
| `results[].created_date` | string \| null |
| `results[].updated_date` | string \| null |
| `results[].expiry_date` | string \| null |
| `results[].domain_age_days` | integer \| null |
| `results[].domain_age_years` | integer \| null |
| `results[].is_newly_registered` | boolean |
| `results[].days_until_expiry` | integer \| null |
| `results[].transfer_locked` | boolean |
| `results[].nameservers[]` | string[] |
| `results[].status[]` | string[] |
| `results[].dnssec` | boolean |
| `results[].contacts` | object |
| `results[].contacts.registrant` | object |
| `results[].contacts.registrant.name` | string \| null |
| `results[].contacts.registrant.organization` | string \| null |
| `results[].contacts.registrant.email` | string \| null |
| `results[].contacts.registrant.phone` | string \| null |
| `results[].contacts.registrant.fax` | string \| null |
| `results[].contacts.registrant.address` | object |
| `results[].contacts.registrant.address.street` | string \| null |
| `results[].contacts.registrant.address.city` | string \| null |
| `results[].contacts.registrant.address.state` | string \| null |
| `results[].contacts.registrant.address.postal_code` | string \| null |
| `results[].contacts.registrant.address.country` | string \| null |
| `results[].contacts.registrant.role` | string |
| `results[].contacts.admin` | object |
| `results[].contacts.admin.name` | string \| null |
| `results[].contacts.admin.organization` | string \| null |
| `results[].contacts.admin.email` | string \| null |
| `results[].contacts.admin.phone` | string \| null |
| `results[].contacts.admin.fax` | string \| null |
| `results[].contacts.admin.address` | object |
| `results[].contacts.admin.address.street` | string \| null |
| `results[].contacts.admin.address.city` | string \| null |
| `results[].contacts.admin.address.state` | string \| null |
| `results[].contacts.admin.address.postal_code` | string \| null |
| `results[].contacts.admin.address.country` | string \| null |
| `results[].contacts.admin.role` | string |
| `results[].contacts.tech` | object |
| `results[].contacts.tech.name` | string \| null |
| `results[].contacts.tech.organization` | string \| null |
| `results[].contacts.tech.email` | string \| null |
| `results[].contacts.tech.phone` | string \| null |
| `results[].contacts.tech.fax` | string \| null |
| `results[].contacts.tech.address` | object |
| `results[].contacts.tech.address.street` | string \| null |
| `results[].contacts.tech.address.city` | string \| null |
| `results[].contacts.tech.address.state` | string \| null |
| `results[].contacts.tech.address.postal_code` | string \| null |
| `results[].contacts.tech.address.country` | string \| null |
| `results[].contacts.tech.role` | string |
| `results[].contacts.billing` | object |
| `results[].contacts.billing.name` | string \| null |
| `results[].contacts.billing.organization` | string \| null |
| `results[].contacts.billing.email` | string \| null |
| `results[].contacts.billing.phone` | string \| null |
| `results[].contacts.billing.fax` | string \| null |
| `results[].contacts.billing.address` | object |
| `results[].contacts.billing.address.street` | string \| null |
| `results[].contacts.billing.address.city` | string \| null |
| `results[].contacts.billing.address.state` | string \| null |
| `results[].contacts.billing.address.postal_code` | string \| null |
| `results[].contacts.billing.address.country` | string \| null |
| `results[].contacts.billing.role` | string |
| `results[].privacy` | object |
| `results[].privacy.is_private` | boolean |
| `results[].privacy.privacy_service` | string \| null |
| `results[].privacy.detected_patterns[]` | string[] |
| `results[].raw_rdap_link` | string \| null |
| `results[].raw_whois` | string \| null |
| `results[].abuse_contact` | object \| null |
| `results[].registry_domain_id` | string \| null |
| `results[].registrar_whois_server` | string \| null |
| `results[].traditional_contacts` | object |
| `results[].nameserver_ips[]` | object[] |
| `results[].nameserver_ips[]` | object |
| `results[].nameserver_ips[].name` | string |
| `results[].nameserver_ips[].ipv4` | string \| null |
| `results[].nameserver_ips[].ipv6` | string \| null |
| `results[].checked_at` | string |
| `results[].query_time_ms` | integer |
| `results[].summary` | object |
| `results[].edge_summary` | object |
| `results[].edge_summary.relay_configured` | boolean |
| `results[].edge_summary.data_sources[]` | string[] |
| `results[].edge_summary.authoritative_source` | string |
| `results[].edge_summary.relay_whois_used` | boolean |
| `results[].edge_summary.raw_whois_available` | boolean |
| `results[].edge_summary.parse_error_count` | integer \| null |
| `results[].edge_summary.registered` | boolean \| null |
| `results[].edge_summary.available` | boolean \| null |
| `results[].edge_summary.registration_age_days` | integer \| null |
| `results[].edge_summary.days_until_expiry` | integer \| null |
| `results[].edge_summary.expires_within_30_days` | boolean \| null |
| `results[].edge_summary.transfer_locked` | boolean \| null |
| `results[].edge_summary.privacy_protected` | boolean \| null |
| `results[].edge_summary.dnssec` | boolean \| null |
| `results[].edge_summary.nameserver_count` | integer |
| `results[].edge_summary.contact_roles_available[]` | string[] |
| `results[].edge_summary.abuse_contact_available` | boolean |
| `results[].edge_summary.registrar_whois_server` | string \| null |
| `results[].meta` | object |
| `total` | integer |
| `successful` | integer |
| `failed` | integer |
| `query_time_ms` | integer |
| `meta` | object |
| `meta.served_by` | string |
| `meta.total` | integer |
| `meta.successful` | integer |
| `meta.duration_ms` | integer |

#### Exemplo de resposta

```json
{
  "results": [
    {
      "domain": "example.com",
      "registered": false,
      "available": true,
      "availability_reason": "closed_registry",
      "registrar": "example",
      "registrar_url": "https://example.com",
      "registrar_iana_id": "example",
      "created_date": "2026-08-27T12:00:00Z",
      "updated_date": "2026-08-27T12:00:00Z",
      "expiry_date": "2026-08-27T12:00:00Z",
      "domain_age_days": 1,
      "domain_age_years": 1,
      "is_newly_registered": false,
      "days_until_expiry": 1,
      "transfer_locked": false,
      "nameservers": [
        "example"
      ],
      "status": [
        "available"
      ],
      "dnssec": false,
      "contacts": {
        "registrant": {
          "name": "example",
          "organization": "example",
          "email": "user@example.com",
          "phone": "+34612345678",
          "fax": "example",
          "address": {
            "street": "example",
            "city": "example",
            "state": "example",
            "postal_code": "example",
            "country": "US"
          },
          "role": "example"
        },
        "admin": {
          "name": "example",
          "organization": "example",
          "email": "user@example.com",
          "phone": "+34612345678",
          "fax": "example",
          "address": {
            "street": "example",
            "city": "example",
            "state": "example",
            "postal_code": "example",
            "country": "US"
          },
          "role": "example"
        },
        "tech": {
          "name": "example",
          "organization": "example",
          "email": "user@example.com",
          "phone": "+34612345678",
          "fax": "example",
          "address": {
            "street": "example",
            "city": "example",
            "state": "example",
            "postal_code": "example",
            "country": "US"
          },
          "role": "example"
        },
        "billing": {
          "name": "example",
          "organization": "example",
          "email": "user@example.com",
          "phone": "+34612345678",
          "fax": "example",
          "address": {
            "street": "example",
            "city": "example",
            "state": "example",
            "postal_code": "example",
            "country": "US"
          },
          "role": "example"
        }
      },
      "privacy": {
        "is_private": false,
        "privacy_service": "example",
        "detected_patterns": [
          "example"
        ]
      },
      "raw_rdap_link": "example",
      "raw_whois": "example",
      "abuse_contact": {},
      "registry_domain_id": "example",
      "registrar_whois_server": "example",
      "traditional_contacts": {},
      "nameserver_ips": [
        {
          "name": "example",
          "ipv4": "192.0.2.1",
          "ipv6": "2001:db8::1"
        }
      ],
      "checked_at": "2026-08-27T12:00:00Z",
      "query_time_ms": 1,
      "summary": {},
      "edge_summary": {
        "relay_configured": false,
        "data_sources": [
          "rdap"
        ],
        "authoritative_source": "rdap",
        "relay_whois_used": false,
        "raw_whois_available": true,
        "parse_error_count": 1,
        "registered": false,
        "available": true,
        "registration_age_days": 1,
        "days_until_expiry": 1,
        "expires_within_30_days": false,
        "transfer_locked": false,
        "privacy_protected": false,
        "dnssec": false,
        "nameserver_count": 1,
        "contact_roles_available": [
          "example"
        ],
        "abuse_contact_available": true,
        "registrar_whois_server": "example"
      },
      "meta": {}
    }
  ],
  "total": 1,
  "successful": 1,
  "failed": 1,
  "query_time_ms": 1,
  "meta": {
    "served_by": "example",
    "total": 1,
    "successful": 1,
    "duration_ms": 1
  }
}
```

GET /v1/rdap Créditos: 2

#### Parâmetros de consulta

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| query | string | opcional |
| type | string Valores permitidos `domain`, `ip`, `autnum` | opcional |
| domain | string | opcional |

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `query` | string |
| `type` | string |
| `status` | string |
| `rdap` | object |
| `rdap.objectClassName` | string |
| `rdap.handle` | string |
| `rdap.name` | string |
| `rdap.startAddress` | string |
| `rdap.endAddress` | string |
| `rdap.ipVersion` | string |

#### Exemplo de requisição

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/rdap?query=example.com"

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/rdap?type=ip&query=8.8.8.8"

curl -G -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/rdap" \
  --data "type=ip" \
  --data-urlencode "query=2001:4860:4860::8888/128"

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/rdap?type=autnum&query=AS174"
```

#### Exemplo de resposta

```json
{
  "query": "8.8.8.8",
  "type": "ip",
  "status": "found",
  "rdap": {
    "objectClassName": "ip network",
    "handle": "NET-8-8-8-0-2",
    "name": "LVLT-GOGL-8-8-8",
    "startAddress": "8.8.8.0",
    "endAddress": "8.8.8.255",
    "ipVersion": "v4"
  }
}
```

#### Códigos de status HTTP

- `200` OK
- `400` Pedido inválido
- `401` Não autorizado
- `402` Pagamento necessário
- `429` Demasiados pedidos

POST /v1/rdap/bulk Créditos: 2/item

#### Parâmetros de consulta

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| dry_run | string Valores permitidos `true` | opcional |

#### Parâmetros do corpo

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| queries | string[] | obrigatório |
| type | string Valores permitidos `domain`, `ip`, `autnum` Padrão `domain` | opcional |

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `results[]` | unknown[] |
| `meta` | object |
| `meta.total` | integer |
| `meta.succeeded` | integer |
| `meta.failed` | integer |
| `meta.max_items` | integer |
| `meta.credits_per_item` | integer |
| `meta.duration_ms` | integer |

#### Exemplo de requisição

```bash
curl -X POST "https://domscan.net/v1/rdap/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "queries": [
    "example.com",
    "cloudflare.com"
  ],
  "type": "domain"
}'
```

```javascript
const response = await fetch("https://domscan.net/v1/rdap/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "queries": [
      "example.com",
      "cloudflare.com"
    ],
    "type": "domain"
  }),
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.post(
    "https://domscan.net/v1/rdap/bulk",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "queries": [
            "example.com",
            "cloudflare.com",
        ],
        "type": "domain",
    },
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "queries": [
	    "example.com",
	    "cloudflare.com"
	  ],
	  "type": "domain"
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/rdap/bulk", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/rdap/bulk")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "queries" => [
    "example.com",
    "cloudflare.com"
  ],
  "type" => "domain"
})

#### Exemplo de resposta

```json
{
  "results": [
    {
      "input": "example",
      "data": {}
    }
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "max_items": 10,
    "credits_per_item": 1,
    "duration_ms": 1
  }
}
```

#### Códigos de status HTTP

- `200` OK
- `400` Pedido inválido
- `401` Não autorizado
- `402` Pagamento necessário
- `409` HTTP 409
- `422` HTTP 422
- `429` Demasiados pedidos

GET /v1/whois/history Créditos: 3

#### Parâmetros de consulta

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| domain | string | obrigatório |
| limit | integer Padrão `50` | opcional |
| cursor | string | opcional |

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `has_more` | boolean |
| `next_cursor` | string \| null |
| `domain` | string |
| `total_snapshots` | integer |
| `first_seen` | string \| null |
| `last_seen` | string \| null |
| `snapshots[]` | object[] |
| `snapshots[]` | object |
| `snapshots[].id` | integer |
| `snapshots[].domain` | string |
| `snapshots[].registrar` | string \| null |
| `snapshots[].registrar_iana_id` | string \| null |
| `snapshots[].created_date` | string \| null |
| `snapshots[].expiry_date` | string \| null |
| `snapshots[].updated_date` | string \| null |
| `snapshots[].status[]` | string[] |
| `snapshots[].nameservers[]` | string[] |
| `snapshots[].dnssec` | boolean |
| `snapshots[].transfer_locked` | boolean |
| `snapshots[].privacy_protected` | boolean |
| `snapshots[].snapshot_date` | string |
| `snapshots[].changes_from_previous[]` | object[] |
| `snapshots[].changes_from_previous[]` | object |
| `snapshots[].changes_from_previous[].field` | string |
| `snapshots[].changes_from_previous[].old_value` | string \| null |
| `snapshots[].changes_from_previous[].new_value` | string \| null |
| `snapshots[].created_at` | string |
| `summary` | object |
| `summary.registrar_changes` | integer |
| `summary.nameserver_changes` | integer |
| `summary.expiry_extensions` | integer |
| `summary.privacy_toggles` | integer |
| `summary.status_changes` | integer |
| `lifecycle_drift_summary` | object |
| `lifecycle_drift_summary.drift_detected` | boolean |
| `lifecycle_drift_summary.change_event_count` | integer |
| `lifecycle_drift_summary.latest_change_date` | string \| null |
| `lifecycle_drift_summary.registrar_changed` | boolean |
| `lifecycle_drift_summary.nameservers_changed` | boolean |
| `lifecycle_drift_summary.expiry_extended` | boolean |
| `lifecycle_drift_summary.status_changed` | boolean |
| `lifecycle_drift_summary.privacy_changed` | boolean |
| `lifecycle_drift_summary.transfer_lock_changed` | boolean |
| `lifecycle_drift_summary.dnssec_changed` | boolean |
| `lifecycle_drift_summary.expiry_extension_days_total` | integer |
| `lifecycle_drift_summary.latest_changes[]` | object[] |
| `lifecycle_drift_summary.latest_changes[]` | object |
| `lifecycle_drift_summary.latest_changes[].field` | string |
| `lifecycle_drift_summary.latest_changes[].old_value` | string \| null |
| `lifecycle_drift_summary.latest_changes[].new_value` | string \| null |
| `lifecycle_drift_summary.current_snapshot` | object |
| `lifecycle_drift_summary.current_snapshot.registrar` | string \| null |
| `lifecycle_drift_summary.current_snapshot.expiry_date` | string \| null |
| `lifecycle_drift_summary.current_snapshot.nameservers[]` | string[] |
| `lifecycle_drift_summary.current_snapshot.status[]` | string[] |
| `lifecycle_drift_summary.current_snapshot.privacy_protected` | boolean |
| `lifecycle_drift_summary.previous_snapshot` | object |
| `lifecycle_drift_summary.previous_snapshot.registrar` | string \| null |
| `lifecycle_drift_summary.previous_snapshot.expiry_date` | string \| null |
| `lifecycle_drift_summary.previous_snapshot.nameservers[]` | string[] |
| `lifecycle_drift_summary.previous_snapshot.status[]` | string[] |
| `lifecycle_drift_summary.previous_snapshot.privacy_protected` | boolean |

#### Exemplo de requisição

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/whois/history?domain=example.com&limit=50"
```

```javascript
const response = await fetch("https://domscan.net/v1/whois/history?domain=example.com&limit=50", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/whois/history?domain=example.com&limit=50",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/whois/history?domain=example.com&limit=50", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/whois/history?domain=example.com&limit=50")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

#### Exemplo de resposta

```json
{
  "domain": "example.com",
  "total_snapshots": 1,
  "first_seen": "2026-07-09",
  "last_seen": "2026-07-09",
  "snapshots": [
    {
      "id": 42,
      "domain": "example.com",
      "registrar": "Example Registrar, Inc.",
      "registrar_iana_id": "9999",
      "created_date": "1995-08-14T04:00:00Z",
      "expiry_date": "2027-08-13T04:00:00Z",
      "updated_date": "2026-06-01T12:00:00Z",
      "status": [
        "client transfer prohibited"
      ],
      "nameservers": [
        "a.iana-servers.net",
        "b.iana-servers.net"
      ],
      "dnssec": true,
      "transfer_locked": true,
      "privacy_protected": true,
      "snapshot_date": "2026-07-09",
      "changes_from_previous": [
        {
          "field": "nameservers",
          "old_value": "ns1.example.net, ns2.example.net",
          "new_value": "a.iana-servers.net, b.iana-servers.net"
        }
      ],
      "created_at": "2026-07-09T10:15:30Z"
    }
  ],
  "summary": {
    "registrar_changes": 1,
    "nameserver_changes": 1,
    "expiry_extensions": 1,
    "privacy_toggles": 1,
    "status_changes": 1
  },
  "lifecycle_drift_summary": {
    "drift_detected": false,
    "change_event_count": 1,
    "latest_change_date": "2026-08-27T12:00:00Z",
    "registrar_changed": false,
    "nameservers_changed": false,
    "expiry_extended": false,
    "status_changed": false,
    "privacy_changed": false,
    "transfer_lock_changed": false,
    "dnssec_changed": false,
    "expiry_extension_days_total": 1,
    "latest_changes": [
      {
        "field": "example",
        "old_value": "example",
        "new_value": "example"
      }
    ],
    "current_snapshot": {
      "registrar": "example",
      "expiry_date": "2026-08-27T12:00:00Z",
      "nameservers": [
        "example"
      ],
      "status": [
        "available"
      ],
      "privacy_protected": false
    },
    "previous_snapshot": {
      "registrar": "example",
      "expiry_date": "2026-08-27T12:00:00Z",
      "nameservers": [
        "example"
      ],
      "status": [
        "available"
      ],
      "privacy_protected": false
    }
  },
  "has_more": false,
  "next_cursor": "example"
}
```

#### Códigos de status HTTP

- `200` OK
- `400` Pedido inválido
- `401` Não autorizado
- `402` Pagamento necessário
- `429` Demasiados pedidos

GET /v2/whois Créditos: 3

#### Parâmetros de consulta

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| domain | string | obrigatório |

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `domain` | string |
| `registered` | boolean \| null |
| `available` | boolean \| null |
| `availability_reason` | string |
| `registrar` | string \| null |
| `registrar_url` | string \| null |
| `registrar_iana_id` | string \| null |
| `created_date` | string \| null |
| `updated_date` | string \| null |
| `expiry_date` | string \| null |
| `domain_age_days` | integer \| null |
| `domain_age_years` | integer \| null |
| `is_newly_registered` | boolean |
| `days_until_expiry` | integer \| null |
| `transfer_locked` | boolean |
| `nameservers[]` | string[] |
| `status[]` | string[] |
| `dnssec` | boolean |
| `contacts` | object |
| `contacts.registrant` | object |
| `contacts.registrant.name` | string \| null |
| `contacts.registrant.organization` | string \| null |
| `contacts.registrant.email` | string \| null |
| `contacts.registrant.phone` | string \| null |
| `contacts.registrant.fax` | string \| null |
| `contacts.registrant.address` | object |
| `contacts.registrant.address.street` | string \| null |
| `contacts.registrant.address.city` | string \| null |
| `contacts.registrant.address.state` | string \| null |
| `contacts.registrant.address.postal_code` | string \| null |
| `contacts.registrant.address.country` | string \| null |
| `contacts.registrant.role` | string |
| `contacts.admin` | object |
| `contacts.admin.name` | string \| null |
| `contacts.admin.organization` | string \| null |
| `contacts.admin.email` | string \| null |
| `contacts.admin.phone` | string \| null |
| `contacts.admin.fax` | string \| null |
| `contacts.admin.address` | object |
| `contacts.admin.address.street` | string \| null |
| `contacts.admin.address.city` | string \| null |
| `contacts.admin.address.state` | string \| null |
| `contacts.admin.address.postal_code` | string \| null |
| `contacts.admin.address.country` | string \| null |
| `contacts.admin.role` | string |
| `contacts.tech` | object |
| `contacts.tech.name` | string \| null |
| `contacts.tech.organization` | string \| null |
| `contacts.tech.email` | string \| null |
| `contacts.tech.phone` | string \| null |
| `contacts.tech.fax` | string \| null |
| `contacts.tech.address` | object |
| `contacts.tech.address.street` | string \| null |
| `contacts.tech.address.city` | string \| null |
| `contacts.tech.address.state` | string \| null |
| `contacts.tech.address.postal_code` | string \| null |
| `contacts.tech.address.country` | string \| null |
| `contacts.tech.role` | string |
| `contacts.billing` | object |
| `contacts.billing.name` | string \| null |
| `contacts.billing.organization` | string \| null |
| `contacts.billing.email` | string \| null |
| `contacts.billing.phone` | string \| null |
| `contacts.billing.fax` | string \| null |
| `contacts.billing.address` | object |
| `contacts.billing.address.street` | string \| null |
| `contacts.billing.address.city` | string \| null |
| `contacts.billing.address.state` | string \| null |
| `contacts.billing.address.postal_code` | string \| null |
| `contacts.billing.address.country` | string \| null |
| `contacts.billing.role` | string |
| `privacy` | object |
| `privacy.is_private` | boolean |
| `privacy.privacy_service` | string \| null |
| `privacy.detected_patterns[]` | string[] |
| `raw_rdap_link` | string \| null |
| `raw_whois` | string \| null |
| `abuse_contact` | object \| null |
| `registry_domain_id` | string \| null |
| `registrar_whois_server` | string \| null |
| `traditional_contacts` | object |
| `nameserver_ips[]` | object[] |
| `nameserver_ips[]` | object |
| `nameserver_ips[].name` | string |
| `nameserver_ips[].ipv4` | string \| null |
| `nameserver_ips[].ipv6` | string \| null |
| `checked_at` | string |
| `query_time_ms` | integer |
| `summary` | object |
| `edge_summary` | object |
| `edge_summary.relay_configured` | boolean |
| `edge_summary.data_sources[]` | string[] |
| `edge_summary.authoritative_source` | string |
| `edge_summary.relay_whois_used` | boolean |
| `edge_summary.raw_whois_available` | boolean |
| `edge_summary.parse_error_count` | integer \| null |
| `edge_summary.registered` | boolean \| null |
| `edge_summary.available` | boolean \| null |
| `edge_summary.registration_age_days` | integer \| null |
| `edge_summary.days_until_expiry` | integer \| null |
| `edge_summary.expires_within_30_days` | boolean \| null |
| `edge_summary.transfer_locked` | boolean \| null |
| `edge_summary.privacy_protected` | boolean \| null |
| `edge_summary.dnssec` | boolean \| null |
| `edge_summary.nameserver_count` | integer |
| `edge_summary.contact_roles_available[]` | string[] |
| `edge_summary.abuse_contact_available` | boolean |
| `edge_summary.registrar_whois_server` | string \| null |
| `meta` | object |

#### Exemplo de requisição

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v2/whois?domain=example.com"
```

```javascript
const response = await fetch("https://domscan.net/v2/whois?domain=example.com", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v2/whois?domain=example.com",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v2/whois?domain=example.com", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
```

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v2/whois?domain=example.com")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))
```

#### Exemplo de resposta

```json
{
  "domain": "example.com",
  "registrar": "Example Registrar, Inc.",
  "registrar_url": "https://registrar.example.net",
  "registrar_iana_id": "9999",
  "created_date": "2019-03-11T14:22:08Z",
  "updated_date": "2026-03-10T09:41:55Z",
  "expiry_date": "2027-03-11T14:22:08Z",
  "domain_age_days": 2769,
  "domain_age_years": 7,
  "is_newly_registered": false,
  "days_until_expiry": 153,
  "transfer_locked": true,
  "status": [
    "client transfer prohibited"
  ],
  "nameservers": [
    "ns1.example.net",
    "ns2.example.net"
  ],
  "dnssec": false,
  "contacts": {
    "registrant": null,
    "admin": null,
    "tech": null,
    "billing": null
  },
  "privacy": {
    "is_private": false,
    "privacy_service": null,
    "detected_patterns": []
  },
  "raw_rdap_link": "https://rdap.example.net/domain/example.com",
  "checked_at": "2026-10-09T10:15:30.000Z",
  "query_time_ms": 412,
  "registered": true,
  "summary": {
    "has_registrant": false,
    "has_admin": false,
    "has_tech": false,
    "has_billing": false,
    "contact_count": 0,
    "is_privacy_protected": false
  },
  "abuse_contact": {
    "email": "abuse@registrar.example.net",
    "phone": "+1.5555550100"
  },
  "registry_domain_id": "2336799_DOMAIN_COM-VRSN",
  "registrar_whois_server": "whois.registrar.example.net",
  "raw_whois": "Domain Name: EXAMPLE.COM\nRegistry Domain ID: 2336799_DOMAIN_COM-VRSN\nRegistrar WHOIS Server: whois.registrar.example.net\nCreation Date: 2019-03-11T14:22:08Z\n...",
  "nameserver_ips": [
    {
      "name": "ns1.example.net",
      "ipv4": "192.0.2.53",
      "ipv6": null
    }
  ],
  "edge_summary": {
    "relay_configured": true,
    "data_sources": [
      "rdap",
      "whois"
    ],
    "authoritative_source": "whois",
    "relay_whois_used": true,
    "raw_whois_available": true,
    "parse_error_count": 0,
    "registered": true,
    "available": false,
    "registration_age_days": 2769,
    "days_until_expiry": 153,
    "expires_within_30_days": false,
    "transfer_locked": true,
    "privacy_protected": false,
    "dnssec": false,
    "nameserver_count": 2,
    "contact_roles_available": [],
    "abuse_contact_available": true,
    "registrar_whois_server": "whois.registrar.example.net"
  },
  "meta": {
    "served_by": "pop=MAD country=ES",
    "data_sources": [
      "rdap",
      "whois"
    ],
    "note": "Contact information may be redacted due to privacy regulations (GDPR)"
  }
}
```

#### Códigos de status HTTP

- `200` OK
- `400` Pedido inválido
- `401` Não autorizado
- `402` Pagamento necessário
- `429` Demasiados pedidos
- `502` Erro de gateway
