# ads.txt / app-ads.txt / sellers.json Extractor (`datamule/ads-txt-sellers-json-extractor`) Actor

Fetch and parse the IAB Tech Lab ad-tech transparency triad — ads.txt, app-ads.txt and sellers.json — for any domain or list of domains. One flat, normalized row per seller relationship, seller entry or variable, with a lossless raw copy. The authorized-digital-seller graph as data. Pay per record.

- **URL**: https://apify.com/datamule/ads-txt-sellers-json-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## ads.txt / app-ads.txt / sellers.json Extractor

Extract public IAB Tech Lab seller declarations into normalized dataset rows for supply-path analysis, monitoring, and authorized-seller graph joins.

### Try it now

This bounded example fetches the current `ads.txt` published for `nytimes.com` and returns at most 25 rows:

```json
{"domain":"nytimes.com","fileType":"ads_txt","maxRecords":25}
````

### Representative genuine output

A fresh run returned this normalized `ads.txt` relationship from the public source:

```json
{
  "_source": "https://nytimes.com/ads.txt",
  "_domain": "nytimes.com",
  "fileType": "ads_txt",
  "recordType": "seller_relationship",
  "_rowIndex": 1,
  "adSystemDomain": "amazon-adsystem.com",
  "publisherAccountId": "3030",
  "accountType": "DIRECT",
  "certificationAuthorityId": null,
  "_raw": {"line": "amazon-adsystem.com, 3030, DIRECT"}
}
```

Fields that do not apply to this record type are returned as `null` in the full dataset schema.

### Pricing and cost

The active FREE-tier pay-per-event price is **$0.0005/record**. Each emitted seller relationship, variable, seller, or file-metadata row is one `record` event.

The 25-row example has an event-charge ceiling of **$0.0125** (`25 × $0.0005`). A source that returns fewer rows costs less. Apify infrastructure usage is separate from this event-charge ceiling.

### Inputs and defaults

| Field | Meaning | Default |
|---|---|---|
| `domain` | One bare host or full URL. The prefilled trial source is `nytimes.com`. | Prefill: `nytimes.com` |
| `domains` | Optional list of additional domains; normalized duplicates are removed. | Empty |
| `fileType` | `all`, `ads_txt`, `app_ads_txt`, or `sellers_json`. | `all` |
| `relationship` | Keep only `DIRECT` or `RESELLER` rows from ads.txt/app-ads.txt. | Any |
| `sellerType` | Keep only `PUBLISHER`, `INTERMEDIARY`, or `BOTH` sellers.json rows. | Any |
| `includeVariables` | Emit ads.txt/app-ads.txt `KEY=value` declarations. | `true` |
| `includeFileMeta` | Emit one sellers.json file-metadata row. | `true` |
| `maxRecords` | Total cap across every requested domain and file. | `25` (prefill `25`) |

Use `domain`, `domains`, or both. The total cap applies after filters and prevents a broad source from producing an unbounded first run.

### Output fields

| Field(s) | Meaning |
|---|---|
| `_source`, `_domain`, `fileType`, `recordType` | Requested well-known URL, normalized input domain, source file type, and row discriminator. |
| `_rowIndex` | Zero-based position in the source file when applicable. |
| `adSystemDomain`, `publisherAccountId`, `accountType`, `certificationAuthorityId` | Normalized ads.txt/app-ads.txt seller relationship. `accountType` is `DIRECT` or `RESELLER`. |
| `variableName`, `variableValue`, `comment` | ads.txt/app-ads.txt variable declarations and inline comments. |
| `sellerId`, `name`, `sellerDomain`, `sellerType` | sellers.json seller identity. `sellerType` is `PUBLISHER`, `INTERMEDIARY`, or `BOTH`. |
| `isConfidential`, `isPassthrough` | Nullable sellers.json flags. |
| `contactEmail`, `version`, `identifiers` | sellers.json file-level metadata. |
| `_raw` | Original source line or object retained for traceability. |

`adSystemDomain` is the join key between a publisher's ads.txt declaration and the corresponding ad system's sellers.json inventory.

### Use cases

- Check which ad systems a publisher authorizes as direct sellers or resellers.
- Join ads.txt relationships to sellers.json identities for supply-path research.
- Monitor public declaration changes for brand-safety or ad-fraud review workflows.
- Export normalized rows to agents, spreadsheets, databases, or scheduled data-quality checks.

### Coverage, freshness, and legal limits

The Actor reads the three public IAB Tech Lab transparency formats at their well-known paths:

- `https://<domain>/ads.txt` for web Authorized Digital Sellers declarations;
- `https://<domain>/app-ads.txt` for the mobile-app equivalent; and
- `https://<domain>/sellers.json` for an ad system's declared seller inventory.

It fetches the source at run time, follows redirects, decodes compressed text, skips comments and blank lines, and retains malformed data lines in `_raw` instead of inventing values. Results reflect what the source owner published at that moment; the Actor does not guarantee that a domain publishes every file or that declarations are complete, current, or compliant. It is a generic reader of public IAB formats, not an IAB certification or legal-compliance service. No login-walled or private data is accessed.

### Troubleshooting

- **404:** A missing file is skipped because many domains publish only part of the triad. Check the domain and select the specific `fileType` you expect.
- **HTML returned with HTTP 200:** Some hosts serve a marketing or anti-bot page at a well-known path. The Actor detects and skips that body rather than turning HTML into records.
- **Redirects:** Redirects are followed automatically. If the destination is missing, blocked, or HTML rather than the requested IAB file, that source is skipped.
- **Zero rows:** Every requested file was absent or unparseable, or the selected relationship/seller filter removed all rows. Recheck `domain`, `fileType`, and filters; a zero-row source exits cleanly without fabricated output.

# Actor input Schema

## `domain` (type: `string`):

A single domain to fetch, e.g. nytimes.com. A full URL (https://www.nytimes.com/ads.txt) or a bare host also works — the actor reduces it to the host and requests the well-known files from https://<domain>/. Use this OR the Domains list below (or both).

## `domains` (type: `array`):

A list of domains to fetch in one run (e.g. nytimes.com, cnn.com, openx.com). Each is reduced to its host and its ads.txt / app-ads.txt / sellers.json fetched. Duplicates are dropped. Every emitted seller/relationship line is one billable record.

## `fileType` (type: `string`):

Which IAB transparency file(s) to fetch per domain. 'all' tries the whole triad (a domain typically has ads.txt OR sellers.json, not all three — missing files are skipped cleanly). ads.txt = Authorized Digital Sellers (web publishers); app-ads.txt = the mobile-app equivalent; sellers.json = the reverse authorized-seller map every ad exchange / SSP publishes.

## `relationship` (type: `string`):

Optionally keep only seller-relationship lines of this account type. DIRECT = the publisher's direct account with the ad system; RESELLER = an authorized reseller. Leave as 'Any' to keep both. Applies only to ads.txt / app-ads.txt lines (not sellers.json, not variable lines).

## `sellerType` (type: `string`):

Optionally keep only sellers.json seller rows of this type. PUBLISHER = the seller owns the inventory; INTERMEDIARY = it passes inventory through; BOTH = either. Leave as 'Any' to keep all. Applies only to sellers.json rows.

## `includeVariables` (type: `boolean`):

When on (default), KEY=value variable lines in ads.txt / app-ads.txt (OWNERDOMAIN, MANAGERDOMAIN, CONTACT, SUBDOMAIN, …) are emitted as recordType='variable' rows. Turn off to keep only seller-relationship lines.

## `includeFileMeta` (type: `boolean`):

When on (default), one recordType='file\_meta' row per sellers.json file carries the file-level contact\_email, version and identifiers\[]. Turn off to emit only the individual seller rows.

## `maxRecords` (type: `integer`):

Maximum total number of records to emit across all domains and files (a large ad exchange's sellers.json alone can hold tens of thousands of sellers). Each emitted record is one billable event. Default 25.

## Actor input object example

```json
{
  "domain": "nytimes.com",
  "fileType": "all",
  "relationship": "",
  "sellerType": "",
  "includeVariables": true,
  "includeFileMeta": true,
  "maxRecords": 25
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "domain": "nytimes.com",
    "maxRecords": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/ads-txt-sellers-json-extractor").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 = {
    "domain": "nytimes.com",
    "maxRecords": 25,
}

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

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

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

```

## CLI example

```bash
echo '{
  "domain": "nytimes.com",
  "maxRecords": 25
}' |
apify call datamule/ads-txt-sellers-json-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamule/ads-txt-sellers-json-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ads.txt / app-ads.txt / sellers.json Extractor",
        "description": "Fetch and parse the IAB Tech Lab ad-tech transparency triad — ads.txt, app-ads.txt and sellers.json — for any domain or list of domains. One flat, normalized row per seller relationship, seller entry or variable, with a lossless raw copy. The authorized-digital-seller graph as data. Pay per record.",
        "version": "0.1",
        "x-build-id": "NwNqTrJxbDawNM9Ha"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamule~ads-txt-sellers-json-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamule-ads-txt-sellers-json-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datamule~ads-txt-sellers-json-extractor/runs": {
            "post": {
                "operationId": "runs-sync-datamule-ads-txt-sellers-json-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datamule~ads-txt-sellers-json-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-datamule-ads-txt-sellers-json-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "domain": {
                        "title": "Domain",
                        "type": "string",
                        "description": "A single domain to fetch, e.g. nytimes.com. A full URL (https://www.nytimes.com/ads.txt) or a bare host also works — the actor reduces it to the host and requests the well-known files from https://<domain>/. Use this OR the Domains list below (or both)."
                    },
                    "domains": {
                        "title": "Domains (list)",
                        "type": "array",
                        "description": "A list of domains to fetch in one run (e.g. nytimes.com, cnn.com, openx.com). Each is reduced to its host and its ads.txt / app-ads.txt / sellers.json fetched. Duplicates are dropped. Every emitted seller/relationship line is one billable record.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "fileType": {
                        "title": "File type",
                        "enum": [
                            "all",
                            "ads_txt",
                            "app_ads_txt",
                            "sellers_json"
                        ],
                        "type": "string",
                        "description": "Which IAB transparency file(s) to fetch per domain. 'all' tries the whole triad (a domain typically has ads.txt OR sellers.json, not all three — missing files are skipped cleanly). ads.txt = Authorized Digital Sellers (web publishers); app-ads.txt = the mobile-app equivalent; sellers.json = the reverse authorized-seller map every ad exchange / SSP publishes.",
                        "default": "all"
                    },
                    "relationship": {
                        "title": "Relationship filter (ads.txt / app-ads.txt)",
                        "enum": [
                            "",
                            "DIRECT",
                            "RESELLER"
                        ],
                        "type": "string",
                        "description": "Optionally keep only seller-relationship lines of this account type. DIRECT = the publisher's direct account with the ad system; RESELLER = an authorized reseller. Leave as 'Any' to keep both. Applies only to ads.txt / app-ads.txt lines (not sellers.json, not variable lines).",
                        "default": ""
                    },
                    "sellerType": {
                        "title": "Seller type filter (sellers.json)",
                        "enum": [
                            "",
                            "PUBLISHER",
                            "INTERMEDIARY",
                            "BOTH"
                        ],
                        "type": "string",
                        "description": "Optionally keep only sellers.json seller rows of this type. PUBLISHER = the seller owns the inventory; INTERMEDIARY = it passes inventory through; BOTH = either. Leave as 'Any' to keep all. Applies only to sellers.json rows.",
                        "default": ""
                    },
                    "includeVariables": {
                        "title": "Include ads.txt variable lines",
                        "type": "boolean",
                        "description": "When on (default), KEY=value variable lines in ads.txt / app-ads.txt (OWNERDOMAIN, MANAGERDOMAIN, CONTACT, SUBDOMAIN, …) are emitted as recordType='variable' rows. Turn off to keep only seller-relationship lines.",
                        "default": true
                    },
                    "includeFileMeta": {
                        "title": "Include sellers.json file metadata row",
                        "type": "boolean",
                        "description": "When on (default), one recordType='file_meta' row per sellers.json file carries the file-level contact_email, version and identifiers[]. Turn off to emit only the individual seller rows.",
                        "default": true
                    },
                    "maxRecords": {
                        "title": "Max records (total)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum total number of records to emit across all domains and files (a large ad exchange's sellers.json alone can hold tens of thousands of sellers). Each emitted record is one billable event. Default 25.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
