# ads.txt & app-ads.txt Checker: Authorized Sellers & Changes (`dottti/ads-txt-monitor`) Actor

Check ads.txt and app-ads.txt on any list of publisher sites: authorized sellers (DIRECT/RESELLER), ad systems, OWNERDOMAIN and MANAGERDOMAIN, IAB format errors, off-domain redirects, whether your seller IDs are listed, and alerts when lines are added or removed.

- **URL**: https://apify.com/dottti/ads-txt-monitor.md
- **Developed by:** [Dottti](https://apify.com/dottti) (community)
- **Categories:** Marketing, Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 one ads.txt or app-ads.txt file checked (sellers, errors, seller checks, changes)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ads.txt & app-ads.txt Checker: Authorized Sellers & Changes

Check the ads.txt and app-ads.txt files of any list of publisher sites or app developer sites. For each file you get
one clean row: how many authorized sellers it lists (DIRECT and RESELLER), which ad systems, OWNERDOMAIN and
MANAGERDOMAIN, SUBDOMAIN and INVENTORYPARTNERDOMAIN declarations, format errors with line numbers, duplicate lines,
redirects that make the file not authoritative, and whether the seller IDs you care about are listed.

Turn on **Only changed** and schedule it to be told when lines are added to or removed from a file.

### Who it is for

- **Ad ops and SSP / ad network teams**: check that your seller ID is listed on every publisher you work with, and
  catch the day a publisher drops it (lost revenue) or lists it with the wrong relationship.
- **Publishers**: audit your own file (and your network sites) for format errors before buyers skip lines.
- **Agencies and brand-safety teams**: see who is authorized to sell a site's inventory before buying it.
- **Analysts**: compare ad-tech partners across many sites.

### What you put in

| Input | What it does |
| --- | --- |
| Sites | One per line (example.com or www.example.com). When the file is missing on a subdomain, the root domain is tried. |
| Files | ads.txt and/or app-ads.txt (ads.txt by default) |
| Seller IDs to look for | Optional, one per line as written in ads.txt: `google.com, pub-1234567890, DIRECT` (relationship optional) |
| Also output every seller line | One row per seller record, charged as record rows |
| Only changed (alerts) and Alert name | Report records added and removed since the last run; unchanged files give a free row |

Empty input runs a demo on two news sites in a few seconds.

### What you get

A file row from a real run (19 November 2026, ad system list cut to five):

```json
{
  "recordType": "file",
  "site": "www.nytimes.com",
  "fileType": "ads.txt",
  "httpStatus": 200,
  "found": true,
  "offDomainRedirect": false,
  "records": 32,
  "directRecords": 32,
  "resellerRecords": 0,
  "adSystems": 15,
  "topAdSystems": [
    { "domain": "openx.com", "count": 4 },
    { "domain": "triplelift.com", "count": 4 },
    { "domain": "google.com", "count": 3 },
    { "domain": "indexexchange.com", "count": 3 },
    { "domain": "media.net", "count": 3 }
  ],
  "ownerDomain": "nytimes.com",
  "managerDomains": [],
  "subdomains": [],
  "inventoryPartnerDomains": [],
  "hasContact": false,
  "invalidLines": 0,
  "duplicateLines": 0,
  "issues": [],
  "sellerChecks": [{ "seller": "google.com, pub-4177862836555934, DIRECT", "found": true, "relationships": ["DIRECT"], "lines": [3] }],
  "sellersMissing": []
}
```

Problems found on real files in the same test:

```json
{ "site": "www.washingtonpost.com", "fileType": "ads.txt", "issues": ["line 66: relationship is not DIRECT or RESELLER"] }
{ "site": "www.cnn.com", "fileType": "ads.txt", "offDomainRedirect": true, "issues": ["the file redirects to another domain (dsc-ato.com); the ads.txt standard treats a redirect outside the site's root domain as not authoritative"] }
```

A seller record row (with **Also output every seller line**):

```json
{ "recordType": "record", "site": "www.nytimes.com", "fileType": "ads.txt", "adSystem": "amazon-adsystem.com", "accountId": "3030", "relationship": "DIRECT", "certAuthorityId": null, "line": 2 }
```

With **Only changed**, a changed file row also carries `changed`, `recordsAddedCount`, `recordsRemovedCount`,
`recordsAdded` and `recordsRemoved` (each line as `adsystem, account id, RELATIONSHIP[, cert id]`).

Free status rows: `bad_input`, `blocked` (the site answered with a firewall or bot check; never bypassed),
`robots_disallowed`, `failed`, `no_changes`.

### How to use it

- **Seller ID check**: paste your publisher list into Sites and your seller lines into Seller IDs to look for; read
  `sellersMissing` per site.
- **Alerts**: turn on Only changed, pick an Alert name, schedule daily and add a Slack, email or webhook integration.
  The first run saves every file; later runs return only files whose records changed.

### Pricing

Pay per result: one charge per file row, and a small charge per seller record row when you ask for them. Status rows,
including unchanged files in alert mode, are free.

Platform usage is included in the price.

### How it reads files

- An honest user agent (`dottti-ads-txt-monitor`), no proxy, no cookies, no browser, and no bot-check bypass.
- robots.txt is checked before every request, also at each redirect hop; a closed path gives a free
  `robots_disallowed` row.
- Records are checked against the IAB Tech Lab ads.txt 1.1 format: ad system domain, account ID, DIRECT or RESELLER,
  optional certification authority ID; variables CONTACT, SUBDOMAIN, INVENTORYPARTNERDOMAIN, OWNERDOMAIN and
  MANAGERDOMAIN.

### Limits

- Root domains are worked out with a short list of country second-level domains (co.uk, com.au and similar); rare
  suffixes can make the off-domain redirect check wrong for those sites.
- sellers.json files are not read.
- Sites behind a firewall that answers automated tools with a bot check are reported as blocked, not read.
- Files over 5 MB are read up to 5 MB.

### Privacy

CONTACT lines are counted (`hasContact`) but their values are never output, because they are often email addresses.
No "@" appears in any row.

# Actor input Schema

## `sites` (type: `array`):

One site per line (example.com or www.example.com). The file is read from the address given; when it is missing on a www or other subdomain, the root domain is tried. Empty = a small demo with two news sites.

## `fileTypes` (type: `array`):

ads.txt (websites) and/or app-ads.txt (mobile and CTV app developers' sites). Empty = ads.txt.

## `sellerChecks` (type: `array`):

Optional. One per line: ad system domain, account ID and optionally the relationship, as written in ads.txt (for example: google.com, pub-1234567890, DIRECT). Each site row then says whether each one is listed and on which lines; sellersMissing lists the ones that are not.

## `outputLines` (type: `boolean`):

Add one row per seller record (ad system, account ID, relationship, certification authority ID, line number), charged as record rows. Off = one summary row per file.

## `onlyChanged` (type: `boolean`):

Compare each file with the last run under the same alert name and report records added and removed. Unchanged files give a free no_changes row instead of a paid row. The first run saves the snapshot and returns every file.

## `alertName` (type: `string`):

Name of the memory used by Only changed. Use a different name for each schedule or client list.

## `maxConcurrency` (type: `integer`):

How many files are fetched in parallel (each from a different site where possible).

## `requestDelayMs` (type: `integer`):

Pause between requests to the same host.

## Actor input object example

```json
{
  "sites": [
    "www.nytimes.com",
    "www.bbc.com"
  ],
  "fileTypes": [
    "ads.txt"
  ],
  "sellerChecks": [],
  "outputLines": false,
  "onlyChanged": false,
  "alertName": "default",
  "maxConcurrency": 5,
  "requestDelayMs": 300
}
```

# Actor output Schema

## `files` (type: `string`):

File summaries, seller checks and changes.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sites": [
        "www.nytimes.com",
        "www.bbc.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dottti/ads-txt-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "sites": [
        "www.nytimes.com",
        "www.bbc.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("dottti/ads-txt-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sites": [
    "www.nytimes.com",
    "www.bbc.com"
  ]
}' |
apify call dottti/ads-txt-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dottti/ads-txt-monitor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KVEFF5DTIb28yvDIv/builds/Ci1j8xJgV2tMnIXeT/openapi.json
