Get Global Ad Library Platform Counts
Per-platform ad counts for the Explore pill bar.
Library-wide by default — Explore browses the complete ad library, so its
pill counts must cover every advertiser. Pass advertiser_id to scope
the pills to one brand (the Full Brand Page ads grid). Each platform’s
count uses the same filter semantics /search applies for that platform
value.
Brand Library tenancy applies to the SCOPED call only (finding M6). An
advertiser_id arrives from the query string with nothing vouching for
it — the same client-supplied-id shape as finding C2 — and the answer is
a precise fact about one brand (“47 Facebook ads”), so an id the caller
cannot see 404s exactly like the advertiser detail route.
The library-wide call is deliberately NOT filtered. Its answer is an
aggregate over the whole library, identical for every caller, which is
what lets cached_platform_counts key on advertiser_id alone; a
per-caller predicate would make the cache per-caller and cost a query on
the hottest Explore call to hide a number nobody can attribute to a
brand. The consequence is honest and bounded: the library-wide total can
exceed what a filtered /search returns.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Response
Successful Response
Library-wide per-platform ad counts for the Explore pill bar.
Per-platform counts use the search's own platform-filter semantics
(a Facebook+Instagram ad counts under both pills); total_ads is the
distinct library-wide count, so the platform rows intentionally don't
sum to it.