Referencia de API

API de API de validación de ads.txt y sellers.json

Valida los registros de ads.txt y app-ads.txt y confirma los vendedores con sellers.json. Usa esta referencia para elegir el endpoint adecuado y ver exactamente qué devuelve.

Operaciones

GET /v1/ads-txt Ver referencia de API

GET /v1/ads-txt

Operación: getAdsTxtCréditos y autenticación: 2-5Autenticación obligatoria
GET/v1/ads-txtCréditos: 2-5

Parámetros de consulta

ParámetroTipoobligatorio
urlstringobligatorio
filestring
Valores permitidos ads.txtapp-ads.txt
Predeterminado ads.txt
opcional
verify_sellersbooleanopcional

Campos de respuesta

CampoTipo
domainstring
filestring
urlstring
checked_atstring
statusstring
reasonstring | null
fetchobject
fetch.http_statusinteger | null
fetch.final_urlstring | null
fetch.bytesinteger
fetch.truncatedboolean
summaryobject
summary.recordsinteger
summary.directinteger
summary.resellerinteger
summary.ad_systemsinteger
summary.records_truncatedboolean
summary.no_authorized_sellersboolean
variablesobject
records[]object[]
records[]object
records[].lineinteger
records[].ad_systemstring
records[].account_idstring
records[].relationshipstring
records[].certification_authority_idstring | null
issues[]object[]
issues[]object
issues[].codestring
issues[].countinteger
issues[].lines[]integer[]
sellersobject
sellers.systems_totalinteger
sellers.systems_checkedinteger
sellers.confirmedinteger
sellers.confidentialinteger
sellers.type_mismatchinteger
sellers.seller_not_foundinteger
sellers.unknowninteger
sellers.systems[]object[]
sellers.systems[]object
sellers.systems[].ad_systemstring
sellers.systems[].sellers_jsonstring
sellers.systems[].reasonstring | null
sellers.systems[].records_checkedinteger
sellers.results[]object[]
sellers.results[]object
sellers.results[].ad_systemstring
sellers.results[].account_idstring
sellers.results[].relationshipstring
sellers.results[].statestring
sellers.results[].seller_typestring | null
sellers.results[].seller_namestring | null
sellers.results[].seller_domainstring | null
sellers.results[].matchstring | null

Solicitud de ejemplo

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))

Respuesta de ejemplo

{
  "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 estado HTTP

  • 200 OK
  • 400 Solicitud incorrecta
  • 401 No autorizado
  • 402 Pago requerido
  • 429 Demasiadas solicitudes

Recursos de referencia