Meta Ad Library tools
Find a brand on Facebook and Instagram, pull its active ads, or search the whole Meta Ad Library by keyword.
get_meta_platform_id
Search the Meta Ad Library for a brand and return ranked candidate pages.
| Parameter | Type | Notes |
|---|---|---|
brand_names |
string or string[] | One brand or a batch |
Returns up to three candidates per brand, verified pages first, then by follower count. Each candidate carries page_id, page_name, image_uri and a may_be_inactive flag so the assistant can try the next one if a page returns no ads.
get_meta_ads
Retrieve currently running ads for one or more Meta page IDs.
| Parameter | Type | Notes |
|---|---|---|
platform_ids |
string or string[] | From get_meta_platform_id |
limit |
int | Default 100 |
country |
string | ISO country code |
active_only |
bool | Only ads still running |
sort_by |
string | total_impressions or relevancy_monthly_grouped |
status, media_type |
string | Case-insensitive filters |
start_date, end_date |
string | ISO dates |
min_duration_days |
int | Long-running ads only |
include_reach |
bool | Enrich with EU reach where available |
style |
string | ugc or brand, video ads only. See Style filter |
trim |
bool | Default true; false returns full metadata |
Each ad includes ad_id, page_id, body text, media_type, media_url, start and end dates, and an ad_url into the public library. For a transcript, pass the ad’s ad_id as ad_archive_id, together with page_id, to analyze_ad_video.
On paid plans, each brand’s profile also carries an estimated Meta spend range for the last 30 days (spend_estimates, keyed by page ID), in US dollars. Each ad that ran in those 30 days counts by the best figure it has, pro-rated to its days inside the window, and the brand’s range is the sum. The sentence names the mix, for example “disclosed by Meta on 1 ad, EU/UK reach on 12 ads, ad count and run time for 287 ads”.
- Disclosed by Meta: Meta’s own spend ranges, which it shows only on political and issue ads. They cover the ad’s whole run, so they are pro-rated assuming even spend over it. Only ranges in US dollars are summed; ads disclosed in other currencies count by reach or ad count instead, and the sentence quotes one of them. A figure disclosed only as a minimum (“>$1M”) is lifetime spend that may predate the 30 days, so it stays out of the range: that ad counts by reach or ad count, and the sentence quotes the minimum separately (“plus 1 ad Meta discloses as >$1M over its lifetime”).
- EU/UK reach: people reached x $4 to $30 per 1,000, EU/UK delivery only. Reach counts each person once, so long-running ads read low. Some ads carry reach by default;
include_reach=truefills it in for more ads, at half a credit per ad. - Ad count and run time: days inside the window x $10 to $300 per ad per day. A creative’s other versions (
ads_in_creative) have unknown run dates, so they raise only the upper end, assuming each ran as long as the one fetched. Large brands can spend 10x or more above this.
It is an estimate, not reported spend, and it says what it covers: only the ads fetched when the scan stopped short of the whole library, only ads matching the query when a filter (country, language, media type, minimum duration, inactive status) was set, and only ads still running on the default active fetch (ads that stopped during the 30 days are missed; status='all' includes them). A call with start_date or end_date gets no estimate.
search_meta_ads_by_keyword
Search across all advertisers without knowing the brand.
| Parameter | Type | Notes |
|---|---|---|
query |
string | Keyword, phrase, handle, domain or hashtag |
limit |
int | Default 100 |
sort_by |
string | Same vocabulary as get_meta_ads |
country, status, media_type |
string | Filters |
start_date, end_date |
string | ISO dates |
style |
string | ugc or brand, video ads only. See Style filter |
Style filter
Meta has no creative-style field, so Proxy infers one from each video’s cover frame.
style="ugc": a creator or customer filming themselves, handheld or selfie feel.style="brand": polished brand-produced footage, motion graphics, product UI.- Setting
stylelimits results to video ads. Combining it withmedia_type="image"is an error. - Matching ads come first. Ads whose cover frame shows too little are kept after them with
style: "unknown", so a real match with a poor frame is not lost. Ads of the other style are dropped. - Every returned ad carries its
style. The result says how many ads were fetched, matched and unknown. - The filter runs on the ads fetched, so a higher
limitgives it more to work with. Each call classifies up to 60 new creatives; the rest show asunknownuntil a repeat call classifies them. - If classification fails or your daily credits run out before the style check, you still get the fetched ads. Unclassified ones show as
unknownand the result says why. - An upstream
cursordoes not carry the filter, so pass the samestyleagain. Anrs:cursor reads rows that are already filtered. - A few ads may be mislabelled. Confirm with analyze_ad_video.
Credits
Ad lists cost 1 credit per 10 ads returned, with a minimum of 1 per brand. A filtered scan (minimum running days, active only, image only) costs at least 2. style adds one credit to a call that classifies and saves any new creative; creatives classified before are free. At the daily cap the style step is skipped, not charged.