Meta Ad Library keyword search shows irrelevant ads
Off-topic or old results in a Meta Ad Library keyword search come from loose matching, sort order and no country. The settings that fix each, in order.
The search is working; it is just loose by default. It matches your words anywhere in an ad and, with no country set, across every market. Set a country and switch to exact phrase first, and most of the noise goes.
Based on querying the library daily through Proxy. Checked November 2026.
Try this, in order
-
Set a country. Without one, results come from every market and language.
-
Make the words match as a phrase. Add
search_type=keyword_exact_phraseto the address:https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=protein%20coffee&search_type=keyword_exact_phrase -
Add a second, more distinctive word if the phrase is still too broad.
-
Remove the image filter if carousels are missing. The image filter returns single still images only.
If that did not work
- Only ads from the last few weeks? The default order stays on topic but returns ads from roughly the last month only. The impressions order goes back further, with looser matches and the biggest advertisers first. Use it, then re-read each ad’s copy.
- Only huge brands? You are on the impressions order. Go back to the default and narrow the phrase.
- Want the longest-running ads on a topic? The library has no such sort. Collect several pages, then sort by start date yourself, and say how many ads you sorted.
- Ask an assistant. With Proxy connected, ask “Find Meta ads about protein coffee that have run at least 90 days in the US”. search_meta_ads_by_keyword sets match type, sort, country and minimum run time in one request, and its image filter includes image carousels.
When to stop
If an exact phrase with a country still returns nothing useful, the words are probably not in the ads. Search what the advertiser would write (a product name, an offer, a website address) instead of the category name.
Why it happens
-
Two match types. The library address carries
search_type=keyword_unordered(the default) orsearch_type=keyword_exact_phrase, and the Ad Library API has the samesearch_typeparameter. Unordered treats each word separately. -
Two sort orders return different ads.
Sort What comes back Relevance, grouped by month ( relevancy_monthly_grouped)On-topic ads, from about the last month only Impressions ( total_impressions)Largest advertisers first, looser matches, ads of any age -
No launch-date or longest-running sort exists. Any such ranking is worked out on the ads already collected, not the whole library.
-
Filter quirks. The image media type excludes carousels even when every card is an image. An unrecognised media type value is ignored without an error and returns everything. Search terms are limited to 100 characters.
To see the sort difference, run one two-word search both ways and compare the start dates on the first twenty ads.