- new: the ad appeared after the baseline run.
- stopped: the ad ended, by the rules below.
- changed: the title, text, button, link, format or media of a running ad changed.
- restarted: a stopped ad came back.
Quick start
1
Create the watch
The first run starts within about a minute. That run is the baseline: it records the ads that are running now and sends no events.The response is
201 with the stored watch. Keep data.watch.id.2
List the new ads
From the second daily run on, ads that the library did not list before appear as new:
3
List the stopped ads
since, status=stopped returns the ads that stopped at or after that time, newest stop first.4
Read the events
POST /v1/ad-watches/{id}/run.
Create a watch
POST /v1/ad-watches (reference) validates the definition, checks your account’s limit, stores the watch and schedules the first run. Creating a watch costs nothing; each run is billed when it searches.
For example, the quick start request returns:
Request fields
The per-platform search fields, such as which ones a platform requires, are described on the Meta, Google, LinkedIn and TikTok pages.
tiktok_creative_center is a ranked sample of top ads and returns 400 VALIDATION_ERROR as a watch platform; watch tiktok_ad_library for an advertiser’s full set.
A watch’s search, platform and interval stay fixed. To change the search, create a new watch and delete the old one.
How a run works
Every 24 hours the watch runs its search with the largest page the platform allows and followsnextCursor until the library has no more ads or the run has read maxAds ads. Each run has a status:
Only
COMPLETE runs can stop an ad on the disappearance rule. Five failed runs in a row disable the watch: enabled turns false, disabledReason names the cause and a watch_paused event is recorded. Re-enable it with PATCH once the cause is fixed.
Read the last 30 runs with GET /v1/ad-watches/{id}/runs. Each run has runNumber, window, status, adsSeen, totalCount, truncated, newCount, stoppedCount, changedCount, startedAt, finishedAt and error.
How stopped is decided
FAILED, PARTIAL and SUSPECT runs never stop an ad. An ad that is listed again after it stopped becomes active and records a restarted event.
Read the ads
GET /v1/ad-watches/{id}/ads lists a watch’s ads.
new lists ads that were first seen after the baseline run, so the first run’s ads are in active with baseline: true. new and active are ordered by firstSeenAt, newest first; stopped by stoppedAt, newest first.
Each ad has:
Events and webhooks
Every change is stored as an event. List them withGET /v1/ad-watches/{id}/events, newest first, filtered by type and since, with limit and cursor.
Each event has
id, type, adKey, data, createdAt and webhook with deliveredAt, attempts and error.
With a webhookUrl, every event is also sent as a POST:
querying-webhook-* headers, HMAC-SHA256 scheme and retry schedule, with querying-webhook-id set to the event id for deduplication, and the SHA-256 digest of the API key that set webhookUrl as the HMAC key. Verify them with the code in Webhooks.
Archived creatives
WitharchiveMedia: true, the watch copies an ad’s images, videos and video posters when it first sees the ad, and again when a changed ad carries new media. Library links expire after a few hours on TikTok and a few days on Meta, so the copy is the durable version.
Each entry of an ad’s media array has:
Download an archived file with your API key. The response carries the stored
Content-Type, an ETag equal to the file’s SHA-256, and a private cache header:
404 NOT_FOUND. Archiving is free, with these caps per file and per account:
A file over its cap or over the account’s storage is marked
skipped with a reason. The ad and its run are recorded in full. A file that its source refuses to serve is marked failed with a reason. Deleting a watch removes its archived files within minutes.
What each library keeps
A watch sees what its library lists, so the library’s retention sets how far back the first run reaches. After that, the watch holds the history for as long as it runs.
The countries and EU-only fields of each library are compared in Ad libraries compared.
Manage watches
A watch that belongs to another account returns
404 NOT_FOUND.
Run a watch now
POST /v1/ad-watches/{id}/run makes the next run due immediately; it starts within about a minute and returns data.queued: true. The run is billed like a daily run. Each watch accepts one manual run per hour; another returns 429 RATE_LIMITED with details.retryAfterSec. When your balance is below the run’s price, the call returns 402 INSUFFICIENT_CREDITS with details.needed and details.available.
Cost and limits
A run costs the ordinary ADS search price: 0.5 credits for every 30 ads the run returns, charged to the watch’s account when the run searches. The watch’sestimatedCreditsPerRun is the upper bound for maxAds:
With
details: true, each page also costs 0.5 credits for every 5 ads read in detail, and estimatedCreditsPerRun includes it: a run of 100 Google ads costs 12 credits, 2 for the ads and 10 for the details. Pages are smaller with details (Google 100, LinkedIn 50, TikTok 60 ads) and the run reads more of them, so any maxAds up to 1,000 works. Meta does not take details: search.details is rejected with 400 VALIDATION_ERROR.
Archiving, reading ads, events and runs, and downloading files cost nothing. A run that your balance cannot pay for fails on its own and records no stops. The daily schedule repeats until you pause or delete the watch.
A contract account is one with a negotiated concurrency limit.
Errors
The error envelope is the same as everywhere else (see Errors). Codes specific to ad watches:Next steps
Ad libraries compared
Countries, retention and EU-only fields of each library.
Webhooks
Signing, retries and safe handlers.
Credits and limits
How credits are held and charged.
Meta Ad Library
The search fields a Meta watch repeats.