> 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/docs/products/ads-txt

# ads.txt and sellers.json validation API API

Validate ads.txt and app-ads.txt records and confirm sellers against sellers.json. Use this reference to choose an operation and integrate its documented response contract.

[View product page](https://domscan.net/ads-txt-api)

## Operations

GET `/v1/ads-txt` [View API reference](https://domscan.net/docs/products/ads-txt#getAdsTxt)

## GET `/v1/ads-txt`

Operation: `getAdsTxt`
Credits and authentication: 2-5
Authentication required

GET /v1/ads-txt Credits: 2-5

#### Query parameters

| Parameter | Type | required |
| --- | --- | --- |
| url | string | required |
| file | string Allowed values `ads.txt`, `app-ads.txt` Default `ads.txt` | optional |
| verify_sellers | boolean | optional |

#### Response fields

| Field | Type |
| --- | --- |
| `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 |

#### Example request

```bash
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"
```

```javascript
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);
```

```python
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())
```

```go
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))
}
```

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

#### Example response

```json
{
  "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"
      }
    ]
  }
}
```

#### HTTP status codes

- `200` OK
- `400` Bad Request
- `401` Unauthorized
- `402` Payment Required
- `429` Too Many Requests

## Reference resources

[OpenAPI 3.0](https://domscan.net/v1/openapi.json)
[Postman](https://domscan.net/v1/postman.json)
[MCP](https://domscan.net/mcp-domain-checker)
