Skip to content
For AI agents: a documentation index is available at /llms.txt. Every docs page is also available as markdown: add .md to its URL. To connect, read /agents.md.

Concepts

Ads

Search Meta's and TikTok's ad libraries by keyword or advertiser: the filters, what each Ad carries, the winner Score, Ad analysis, what is stored, and what a search costs.

Price
Meta: 1 credit per Ad delivered. TikTok: 3 credits per page.
Analysis
20 credits per Ad analysed with analyze, on top of delivery, for the first 50 Ads.
Limit
Meta: up to 500 Ads per call. TikTok: up to 30 Ads per page.
Coverage
TikTok's library holds only Ads delivered in the EU/EEA, Switzerland, the UK and Turkey.
Outages
A library that cannot be reached fails the Run with source_unavailable and charges nothing.

An ad search reads Meta’s Ad Library or TikTok’s and returns the Ads that match, trimmed for an agent’s context. You search by keyword or by advertiser. Meta Ads also come with a winner Score, and with an analysis of their media when you ask for one.

An ad search reads one public ad library

POST /v1/ads/search takes a keyword in query or an advertiser in advertiser, exactly one of the two. The two libraries differ in coverage, filters, paging and price, so each has its own section below.

Each search is one Run: the record of a charged call, with its status, its cost and its result. Each Meta Ad is also one item of the Run, listed by GET /v1/runs/{id}/items with type=ads. You never get the library’s raw payload.

When to use an ad search

Use a search to find Ads you do not know yet. Once you have an Ad or an advertiser, the lookups below answer more about it:

Your questionUse
Which Ads mention a product or topicPOST /v1/ads/search with query
Every running Ad of one brand (status: all adds stopped Ads on Meta)POST /v1/ads/search with advertiser
Who an advertiser is and how many Ads it runsGET /v1/advertisers/{page_id}
One Meta Ad by its library idGET /v1/ads/meta/{library_id}
Who one TikTok Ad targetedGET /v1/ads/tiktok/{ad_id}
The stored analysis of a Meta AdGET /v1/ads/meta/{library_id}/intelligence

How a Meta ad search works

Meta filters and their defaults

Leave a filter out to get its default. The defaults match Meta’s own library UI, so a plain keyword search returns running commercial Ads from every country.

FilterValuesDefault
countrya two-letter country codeevery country
statusactive, inactive, allactive
kindcommercial, political, issue, allcommercial
media_typevideo, image, carouselevery format
placementsfacebook, instagram, messenger, audience_networkevery placement
started_after, started_beforeISO dates or timestampsno bound

Meta limit and paging

limit defaults to 50 and goes up to 500. Meta serves its library 10 to 30 Ads at a time, so one call reads as many library pages as it takes to fill your limit.

Pass next_cursor back as cursor for more, with the same filters. A large limit can take a while. With a short wait you get the Run id back to poll.

Searching Meta by advertiser

advertiser takes the advertiser’s Facebook Page id, its Page URL, or its name. A Page id, or a URL with one in it, is never ambiguous.

A name several Pages carry is answered with 409 advertiser_ambiguous and a list of candidates instead of a guess. Each candidate has its Page id, name, Page URL, linked Instagram account and Ad count when known. Ask again with the right page_id. That answer costs nothing.

A search with status: all and no other filter that reads to the end of the advertiser’s Ads is a complete observation of it. For 6 hours afterwards, any search on that advertiser without country is answered from what was stored, at the same 1 credit per Ad as a live read.

Every advertiser search says cached, and as_of for when its Ads were observed.

GET /v1/advertisers/{page_id} is the advertiser’s profile: name, Page URL, running and total Ad counts as last observed, and when. It also carries the linked Instagram account and Creator, only when Meta shows the link. It costs 15 credits, the same when served within 6 hours of a complete observation.

A fresh profile lookup reads and stores the advertiser’s Ads. It counts as a complete observation when they fit in one read.

What each Meta Ad carries

FieldWhat it holds
id, urlMeta's library id, and the Ad's page in the library.
advertiserThe Facebook Page running the Ad: Page id and name.
kind, media_typeCommercial, political or issue; video, image or carousel.
creativeCopy, title, call to action, landing URL and media URLs.
first_shown, last_shown, is_active, days_runningWhen it started, when it stopped (only once it has), whether it is running, and whole days run so far.
placements, countries, variant_countWhere it ran, the countries Meta discloses, and how many Ads share its media.
winner_scoreHow strongly the Ad looks like a winner, 0 to 100, with its confidence, inputs and reason.
reachSpend, impressions and reach ranges exactly as Meta discloses them: for political and issue Ads, and reach for some EU Ads. Null otherwise.

The winner Score and ordering

Meta discloses no spend for commercial Ads, so the winner Score reads what the advertiser does instead. An Ad the advertiser keeps running, and keeps cloning into new variants, is likely one that pays back.

The Score is computed from the stored history of the Ad, never fetched. It is measured against the same advertiser’s other stored Ads, because a long run means something different for a brand that rotates creative weekly.

  • days_running is whole days from start to stop, or to now while running. variants_added is the variant count at the latest snapshot minus the count at the first.
  • Each is ranked against the advertiser’s other Ads as the share below it, with ties counting half. score is 100 × (0.7 × the days rank + 0.3 × the variants rank), rounded.
  • An Ad seen once has no variant history yet. Its score is the days rank alone, with confidence: low and reason single_snapshot.
  • With no other dated Ad of the advertiser, the ranks fall back to days out of 90 and variants out of 5. Under 5 dated Ads of the advertiser, the score is low confidence with reason few_advertiser_ads.
  • An Ad with no start date gets no score, with reason no_start_date.

order_by takes relevance, winner, days_running, start_date. relevance, the default, keeps the library’s order. The others put the highest score, longest run or newest start first, with unknowns last. They sort the Ads one call returns, and next_cursor still follows the library’s order.

Ad analysis

Pass analyze: true on a search, or analyze=true on GET /v1/ads/meta/{library_id}, and each Ad comes back with intelligence.

A video Ad gets the full video set, with pipeline: video: transcript, hook, call to action, sponsorship, tone, visual format and brand safety. An image or carousel Ad gets what an image can carry, with pipeline: image: copy angle, offer, call to action, visual format, topics and sentiment.

Both read our archived copy of the media, with the Ad’s copy as context. The copy is never analysed on its own, so an Ad whose media cannot be read fails with media_unavailable.

Analysis is computed once per Ad and version and reused by every later call, yours or anyone’s. Reusing a stored analysis costs the same 20 credits per Ad as computing it, so the price never depends on who asked first. Every Ad carries the analysis already stored for it, even without analyze.

A search analyses its first 50 Ads. The analysis runs after the Ads are read, so expect a 202 and poll the Run. Read a stored analysis free at GET /v1/ads/meta/{library_id}/intelligence.

An Ad whose analysis fails is not charged at all and makes the Run partial. If no Ad gets an analysis, the Run fails and costs nothing.

What is stored for Meta Ads

Every Ad a search returns is stored with its advertiser and a snapshot of its public state at that moment: running or stopped, placements, countries, variant count, and any disclosed spend or reach. That happens whoever asked, so the history of an Ad builds up over time.

A keyword search is always read live from the library, never served from what is stored. An advertiser search can be served from storage, as described above.

How a TikTok ad search works

The TikTok ad library holds only Ads delivered in the EU/EEA, Switzerland, the UK and Turkey. An Ad that ran only elsewhere is not in it. A search covers all of those countries at once and refuses country and every Meta filter.

A TikTok search is one library page per call. limit defaults to 25 and goes up to 30, and is a ceiling: a page may hold fewer, so follow next_cursor for more. Its Ads are stored, and their media is archived once looked up.

The library does not report spend or impressions per Ad in a search, so reach.spend and reach.impressions are null. reach.audience is the library’s reach bucket.

Searching TikTok by advertiser

advertiser takes a library.tiktok.com advertiser URL, an advertiser id, or a name. An id works only once the advertiser is stored, because the library needs its exact name too.

A name several advertisers carry, with case counting, is answered with 409 advertiser_ambiguous and candidates, free. Ask again with one candidate’s url.

GET /v1/advertisers/{page_id} with library=tiktok takes an id, URL or name, and answers 404 when nothing matches. It returns the advertiser’s TikTok account, registry location, who paid, and running and total Ad counts, at 15 credits. Its Ads are stored and archived.

For 6 hours after an observation the library did not break off, the profile is served from storage at the same price. A truncated read, normal for a busy advertiser, counts. A bare id we have not seen yet is a free 404, so pass the library URL or name instead.

Looking up one TikTok Ad

GET /v1/ads/tiktok/{ad_id} reads one TikTok Ad by the id a search returns, at 3 credits. It returns the landing page, call to action, objective, the advertiser’s id and TikTok account in advertiser_account, and targeting.

targeting holds countries, ages and genders, with impressions per country by age and gender. When the library cannot answer, Creative Center may. targeting is then null and performance carries CTR, likes, comments and shares. Unpublished figures are null, never zero.

A looked-up Ad is stored with its media archived, and a repeat lookup within 6 hours is served from our copy. It carries removed_from_library: true once the library drops it. is_active is true while the Ad is not ended and was shown in the last 3 days, and null when the read cannot tell.

Limits and prices

LimitValue
Meta search1 credit per Ad delivered, not per page
Meta limit50 by default, 500 at most
Ad analysis20 credits per Ad analysed, computed or already stored
Ads analysed per searchThe first 50
TikTok search3 credits per page
TikTok limit25 by default, 30 at most
One Ad by its id, Meta or TikTok3 credits
Advertiser profile15 credits
Advertiser served from storageWithin 6 hours of a complete observation
409 advertiser_ambiguousFree
Reading a stored Ad analysisFree

On Meta, an estimate quotes your limit in Ads, all analysed up to the cap with analyze. That is the most the search can cost. On Meta, the Run charges for the Ads it actually returned. On TikTok, an estimate and a Run are both per page.

If the library fails part-way, the Run is partial, charged only for the Ads already delivered, and incomplete says what stopped it. next_cursor resumes from there.

If the library cannot be reached at all, the Run fails with source_unavailable and costs nothing. On Meta, an estimate answers source_unavailable instead of a price. A TikTok estimate quotes the price without checking. An outage is never returned as an empty list. Every price is on the pricing page.

Example: search Meta’s library by keyword

This search filters Meta’s library by country, format, placement and start date, with analysis on:

POST /v1/ads/search · Meta: 1 credit per Ad delivered, the same when served from a recent advertiser observation, plus 20 credits per Ad analysed with analyze, computed or already stored; the estimate quotes limit Ads, all analysed up to the cap with analyze. TikTok: 3 credits per page.

Use ShortsIntel to search ad libraries.

- library: meta
- query: cold plunge
- country: US
- status: active
- kind: commercial
- media_type: video
- placements: facebook
- started_after: 2026-01-01
- started_before: 2026-02-01
- limit: 20
- order_by: relevance
- analyze: yes

Tell me what it will cost before you run it, then summarise what you find.

If you don't have ShortsIntel tools, don't guess: read https://www.shortsintel.com/agents.md, follow it to connect, then retry this request.

Run it in the Playground (no API Key needed)

200 · The Run finished inside the wait budget: `{ run, result }`. With `estimate=true`, `{ estimate_credits, cached }` instead.

{
  "run": {
    "id": "run_8f2c1ad04b",
    "kind": "ads_search",
    "status": "completed",
    "created_at": "2026-09-08T09:14:02.418Z",
    "completed_at": "2026-09-08T09:14:04.930Z",
    "charge_credits": 2,
    "list_price_credits": 2,
    "cached": false
  },
  "result": {
    "library": "meta",
    "items": [
      {
        "library": "meta",
        "id": "1122334455667788",
        "url": "https://www.facebook.com/ads/library/?id=1122334455667788",
        "advertiser": {
          "id": "100064000000001",
          "name": "Plunge"
        },
        "is_active": true,
        "first_shown": "2026-08-01T00:00:00.000Z",
        "last_shown": null,
        "placements": [
          "FACEBOOK",
          "INSTAGRAM"
        ],
        "creative": {
          "title": "Cold water, on your schedule",
          "body": "The tub our testers refused to give back.",
          "cta": "Shop Now",
          "link_url": "https://plunge.example/tub",
          "format": "VIDEO",
          "image_urls": [],
          "video_urls": [
            "https://video.xx.fbcdn.net/ads/plunge-tub-hd.mp4"
          ],
          "thumbnail_urls": []
        },
        "reach": {
          "impressions": null,
          "spend": null,
          "currency": null,
          "audience": null
        },
        "kind": "commercial",
        "media_type": "video",
        "countries": null,
        "variant_count": 4,
        "days_running": 72,
        "winner_score": {
          "score": 88,
          "confidence": "high",
          "inputs": {
            "days_running": 72,
            "variants_added": 2,
            "snapshots": 6,
            "advertiser_ads": 14
          },
          "reason": null
        }
      },
      {
        "library": "meta",
        "id": "2233445566778899",
        "url": "https://www.facebook.com/ads/library/?id=2233445566778899",
        "advertiser": {
          "id": "100064000000001",
          "name": "Plunge"
        },
        "is_active": false,
        "first_shown": "2026-06-02T00:00:00.000Z",
        "last_shown": "2026-07-14T00:00:00.000Z",
        "placements": [
          "INSTAGRAM"
        ],
        "creative": {
          "title": "Three minutes. Every morning.",
          "body": "Our coldest tub yet, now in matte black.",
          "cta": "Learn More",
          "link_url": "https://plunge.example/black",
          "format": "IMAGE",
          "image_urls": [
            "https://scontent.xx.fbcdn.net/ads/plunge-black.jpg"
          ],
          "video_urls": [],
          "thumbnail_urls": []
        },
        "reach": {
          "impressions": null,
          "spend": null,
          "currency": null,
          "audience": null
        },
        "kind": "commercial",
        "media_type": "image",
        "countries": null,
        "variant_count": null,
        "days_running": 42,
        "winner_score": {
          "score": 54,
          "confidence": "low",
          "inputs": {
            "days_running": 42,
            "variants_added": 0,
            "snapshots": 1,
            "advertiser_ads": 14
          },
          "reason": "single_snapshot"
        }
      }
    ],
    "next_cursor": "eyJjIjoiQVpVWiIsIm8iOjB9",
    "total": null
  }
}

Questions about Ads

How much does an ad search cost?

On Meta, 1 credit per Ad delivered, plus 20 credits per Ad analysed with analyze. On TikTok, 3 credits per page. A Run that fails because the library is down costs nothing.

Why do most Meta Ads have no spend figures?

Meta discloses spend and impressions only for political and issue Ads, and reach for some EU Ads. For commercial Ads, read the winner Score instead.

Why does a TikTok search refuse country?

The TikTok library holds only Ads delivered in the EU/EEA, Switzerland, the UK and Turkey, and a search covers all of them at once. It also refuses every Meta filter.

What does advertiser_ambiguous mean?

More than one advertiser carries the name you passed. Pick one from candidates and ask again with its page_id on Meta or its url on TikTok. The ambiguous answer is free.

Do I pay for an analysis someone else already ran?

Yes. A stored analysis costs the same 20 credits per Ad as a new one when you pass analyze. Reading it at GET /v1/ads/meta/{library_id}/intelligence is free.