API Documentation

We provides an API for checking if a Publisher Account ID is authorized on a domain. This API is available for free for testing purposes. For continued use, you must pay for a subscription. All API requests require an API Key which you can get by creating an account.

There is a low API limit for free accounts. Paid subscribers get unlimited access. Subscribers can also download the entire database at anytime.

Making a Request

To use the API, make a GET request to the following URL. You must replace the red parts with you own values.

GET https://www.adstxtaggregator.com/api/check?domain=example.com&pub_id=abc123&api_token=xxxxxxxxxxxxxxxxxxxxx

domain - The publishers domain name. This is the domain where the ads.txt file is published and where ads are displayed. This is NOT the domain name of advertising system such as "google.com" or "taboola.com".

pub_id - The publisher's account ID. This code is provided to the publisher by the advertising system. Publisher Account ID is usually just a number and sometimes contains letters or dashes. For example, Adsense publisher account IDs look like "pub-xxxxxxxxxxxxxxxx".

api_token - Get an API key for free by logging in or registering then going to your settings to create a key.

Handling Responses

There are 4 types of responses you can receive from the API:

Authorized - The domain, pub_id combination is valid! The advertising system and relationship type will be returned in the "details" document.

Not Authorized - The domain had an ads.txt file but this publisher account ID is not in it. Likely counterfeit ad inventory.

Not Implemented - The domain does not have an ads.txt file (or we have not crawled it yet).

Unknown - We have not indexed that domain yet and therefore do not know if the pub_id is authorized or not.

If you have any questions, please contact us.