API de API de validação de ads.txt e sellers.json
Valide registos de ads.txt e app-ads.txt e confirme os vendedores com o sellers.json. Use esta referência para escolher uma operação e integrar seu contrato de resposta documentado.
Operações
GET /v1/ads-txt
GET
/v1/ads-txt
Créditos: 2-5
Parâmetros de consulta
| Parâmetro | Tipo | obrigatório |
|---|---|---|
| url | string | obrigatório |
| file |
string
Valores permitidos
ads.txtapp-ads.txt
Padrão
ads.txt
|
opcional |
| verify_sellers | boolean | opcional |
Campos da resposta
| Campo | Tipo |
|---|---|
domain |
string |
file |
string |
url |
string |
checked_at |
string |
status |
string |
reason |
string | null |
fetch |
object |
fetch.http_status |
integer | null |
fetch.final_url |
string | null |
fetch.bytes |
integer |
fetch.truncated |
boolean |
summary |
object |
summary.records |
integer |
summary.direct |
integer |
summary.reseller |
integer |
summary.ad_systems |
integer |
summary.records_truncated |
boolean |
summary.no_authorized_sellers |
boolean |
variables |
object |
records[] |
object[] |
records[] |
object |
records[].line |
integer |
records[].ad_system |
string |
records[].account_id |
string |
records[].relationship |
string |
records[].certification_authority_id |
string | null |
issues[] |
object[] |
issues[] |
object |
issues[].code |
string |
issues[].count |
integer |
issues[].lines[] |
integer[] |
sellers |
object |
sellers.systems_total |
integer |
sellers.systems_checked |
integer |
sellers.confirmed |
integer |
sellers.confidential |
integer |
sellers.type_mismatch |
integer |
sellers.seller_not_found |
integer |
sellers.unknown |
integer |
sellers.systems[] |
object[] |
sellers.systems[] |
object |
sellers.systems[].ad_system |
string |
sellers.systems[].sellers_json |
string |
sellers.systems[].reason |
string | null |
sellers.systems[].records_checked |
integer |
sellers.results[] |
object[] |
sellers.results[] |
object |
sellers.results[].ad_system |
string |
sellers.results[].account_id |
string |
sellers.results[].relationship |
string |
sellers.results[].state |
string |
sellers.results[].seller_type |
string | null |
sellers.results[].seller_name |
string | null |
sellers.results[].seller_domain |
string | null |
sellers.results[].match |
string | null |
Exemplo de requisição
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/ads-txt?url=https%3A%2F%2Fexample.com&file=ads.txt&verify_sellers=false"const response = await fetch("https://domscan.net/v1/ads-txt?url=https%3A%2F%2Fexample.com&file=ads.txt&verify_sellers=false", {
headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://domscan.net/v1/ads-txt?url=https%3A%2F%2Fexample.com&file=ads.txt&verify_sellers=false",
headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/ads-txt?url=https%3A%2F%2Fexample.com&file=ads.txt&verify_sellers=false", 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))
}require "json"
require "net/http"
uri = URI("https://domscan.net/v1/ads-txt?url=https%3A%2F%2Fexample.com&file=ads.txt&verify_sellers=false")
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
{
"domain": "example.com",
"file": "ads.txt",
"url": "https://example.com/ads.txt",
"checked_at": "2026-10-13T12:00:00.000Z",
"status": "found",
"reason": null,
"fetch": {
"http_status": 200,
"final_url": "https://example.com/ads.txt",
"bytes": 20603,
"truncated": false
},
"summary": {
"records": 2,
"direct": 1,
"reseller": 1,
"ad_systems": 2,
"records_truncated": false,
"no_authorized_sellers": false
},
"variables": {
"ownerdomain": [
"example.com"
]
},
"records": [
{
"line": 3,
"ad_system": "google.com",
"account_id": "pub-1234567890",
"relationship": "DIRECT",
"certification_authority_id": "f08c47fec0942fa0"
},
{
"line": 4,
"ad_system": "openx.com",
"account_id": "537120563",
"relationship": "RESELLER",
"certification_authority_id": null
}
],
"issues": [
{
"code": "duplicate_record",
"count": 1,
"lines": [
9
]
}
],
"sellers": {
"systems_total": 2,
"systems_checked": 2,
"confirmed": 1,
"confidential": 0,
"type_mismatch": 0,
"seller_not_found": 0,
"unknown": 1,
"systems": [
{
"ad_system": "google.com",
"sellers_json": "unknown",
"reason": "too_large",
"records_checked": 1
},
{
"ad_system": "openx.com",
"sellers_json": "ok",
"reason": null,
"records_checked": 1
}
],
"results": [
{
"ad_system": "google.com",
"account_id": "pub-1234567890",
"relationship": "DIRECT",
"state": "unknown",
"seller_type": null,
"seller_name": null,
"seller_domain": null,
"match": null
},
{
"ad_system": "openx.com",
"account_id": "537120563",
"relationship": "RESELLER",
"state": "confirmed",
"seller_type": "INTERMEDIARY",
"seller_name": "Example Exchange",
"seller_domain": "exchange.example",
"match": "exact"
}
]
}
}
Códigos de status HTTP
200OK400Pedido inválido401Não autorizado402Pagamento necessário429Demasiados pedidos