# ads.txt API
> Fetch and evaluate any publisher's ads.txt / app-ads.txt — the IAB authorized-digital-sellers standard. Pass a domain and the check endpoint fetches its ads.txt server-side, then returns every seller record parsed into its fields — advertising system, the publisher's seller/account id, the DIRECT or RESELLER relationship and the optional certification-authority id (TAG-ID) — alongside counts (direct, reseller, distinct ad systems) and the declared variables OWNERDOMAIN, MANAGERDOMAIN, CONTACT and SUBDOMAINS. The verify endpoint answers the one question programmatic-advertising integrations actually ask: is this advertising system, with this publisher id, authorized to sell this domain's inventory? — returning an authorized boolean and the matching records. A missing file is reported as found:false (not an error), and soft-404 HTML pages are detected and rejected so you never parse a "page not found" as records. The request is made server-side and private or internal targets are refused (SSRF-guarded). Built for ad-tech supply-chain verification, SSP/DSP onboarding checks, anti-fraud and inventory audits. An ads.txt seller-authorization checker — distinct from the security-contact file reader (securitytxt), the robots.txt crawlability evaluator (robots) and the sitemap parser (sitemap). No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/adstxt-api/..."
```

## Pricing
- **Free** (Free) — 2,090 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 40,000 calls/Mo, 8 req/s
- **Pro** ($20/Mo) — 212,000 calls/Mo, 20 req/s
- **Mega** ($53/Mo) — 808,000 calls/Mo, 50 req/s

## Endpoints

### ads.txt

#### `GET /v1/check` — Fetch & parse a domain's ads.txt

**Parameters:**
- `domain` (query, required, string) — The publisher domain Example: `theguardian.com`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/adstxt-api/v1/check?domain=theguardian.com"
```

**Response:**
```json
{
    "data": {
        "url": "https://theguardian.com/ads.txt",
        "found": true,
        "counts": {
            "direct": 43,
            "comments": 29,
            "reseller": 53,
            "advertising_systems": 34
        },
        "domain": "theguardian.com",
        "records": [
            {
                "publisher_id": "pub-2012933198307164",
                "relationship": "DIRECT",
                "advertising_system": "google.com",
                "certification_authority_id": null
            },
            {
                "publisher_id": "3722",
                "relationship": "DIRECT",
                "advertising_system": "aps.amazon.com",
                "certification_authority_id": null
            },
            {
                "publisher_id": "2888",
                "relationship": "DIRECT",
                "advertising_system": "appnexus.com",
                "certification_authority_id": null
            },
            {
                "publisher_id": "7012",
                "relationship": "DIRECT",
                "advertising_system": "appnexus.com",
                "certification_authority_id": null
            },
            {
                "publisher_id": "184842",
                "relationship": "DIRECT",
                "advertising_system": "indexexchange.com",
                "certification_authority_id": "50b1c356f2c5c8fc"
            },
            {
                "publisher_id": "185406",
                "relationship
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/verify` — Is a seller authorized?

**Parameters:**
- `domain` (query, required, string) — The publisher domain Example: `theguardian.com`
- `system` (query, required, string) — Advertising system domain Example: `google.com`
- `publisher_id` (query, required, string) — Seller/account id Example: `pub-0000000000000000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/adstxt-api/v1/verify?domain=theguardian.com&system=google.com&publisher_id=pub-0000000000000000"
```

**Response:**
```json
{
    "data": {
        "domain": "theguardian.com",
        "system": "google.com",
        "matches": [],
        "authorized": false,
        "match_count": 0,
        "publisher_id": "pub-0000000000000000"
    },
    "meta": {
        "timestamp": "2026-06-01T23:40:38.624Z",
        "request_id": "ae94076c-83a3-471c-9d56-d0b6973ba7d1"
    },
    "status": "ok",
    "message": "Seller verified",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/adstxt-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Fetch and parse a publisher's ads.txt — the IAB Authorized Digital Sellers file that lists who is allowed to sell a site's ad inventory. /v1/check?domain=theguardian.com fetches domain/ads.txt and returns every seller record (the advertising-system domain, the publisher account id, the DIRECT or RESELLER relationship and the optional certification-authority id, e.g. Google's TAG id), the counts of direct vs reseller lines, and the variables (OWNERDOMAIN, MANAGERDOMAIN, CONTACT, SUBDOMAINS). /v1/verify?domain=...&system=google.com&publisher_id=... checks whether a specific advertising system (and account) is authorised — the exact lookup an SSP or buyer makes to prevent domain spoofing and unauthorised reselling. A soft-404 HTML page is treated as no ads.txt. The request is made server-side; private/internal targets are refused (SSRF-guarded). Ideal for ad-tech compliance, supply-path verification, fraud prevention and publisher audits. An ads.txt parser/validator — distinct from the robots.txt evaluator (robots), the security.txt parser (securitytxt) and the sitemap parser (sitemap). No key, no cache.",
        "spec": "IAB Tech Lab ads.txt (Authorized Digital Sellers)",
        "endpoints": [
            "/v1/check",
            "/v1/verify",
            "/v1/meta"
        ],
        "variables": [
            "CONTACT",
            "SUBDOMAINS",
            "OWNERDOMAIN",
            "MANAGERDOMAIN",
            "INVENTORYPARTNERDOMAIN
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/adstxt-api
OpenAPI spec: https://www.oanor.com/api/adstxt-api/openapi.json
