Search the Meta ad library by keyword
meta-ad-library.meta-ads.library.searchSearch publicly running Facebook and Instagram ads by keyword
- Price
- freeAu prix du fournisseur
- Success rate
- —Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.searchPreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
give it either search_terms or search_page_ids — a call with neither returns an error, not the whole library. ad_snapshot_url is the human-viewable render of the creative and needs the access token appended to load. Results are ads Meta has KEPT: commercial ads leave the library some time after they stop running, so this is a live-ish view, not an archive
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de requête | ||||
after | chaîne | Facultatif | paging.cursors.after from the previous response | |
limit | entier | Facultatif | page size; 25 by default, a few hundred is the practical ceiling before Meta starts timing out | 25 |
fields | chaîne | Obligatoire | comma-separated; nothing but id comes back by default | id,page_id,page_name,ad_creative_bodies,ad_creative_link_titles,ad_creative_link_captions,ad_snapshot_url,ad_delivery_start_time,ad_delivery_stop_time,publisher_platforms,languages,estimated_audience_size |
ad_type | chaîne | Facultatif | ALL (default) | POLITICAL_AND_ISSUE_ADS | HOUSING_ADS | EMPLOYMENT_ADS | FINANCIAL_PRODUCTS_AND_SERVICES_ADS | ALL |
languages | tableau | Facultatif | ISO 639-1 codes (plus CMN, YUE) | ["en"] |
media_type | chaîne | Facultatif | ALL | IMAGE | MEME | VIDEO | NONE | VIDEO |
search_type | chaîne | Facultatif | KEYWORD_UNORDERED (default, all words in any order) | KEYWORD_EXACT_PHRASE | KEYWORD_UNORDERED |
search_terms | chaîne | Facultatif | max 100 characters; matched against the ad's text. Required in practice unless you filter by search_page_ids instead | project management software |
ad_active_status | chaîne | Facultatif | ACTIVE (default) | INACTIVE | ALL — ALL is what you want for creative research, since a competitor's best-performing ad may have finished | ALL |
publisher_platforms | tableau | Facultatif | FACEBOOK | INSTAGRAM | AUDIENCE_NETWORK | MESSENGER | WHATSAPP | OCULUS | THREADS | ["INSTAGRAM"] |
ad_delivery_date_max | chaîne | Facultatif | YYYY-MM-DD | |
ad_delivery_date_min | chaîne | Facultatif | YYYY-MM-DD; ads that were delivering on or after this date | 2026-06-01 |
ad_reached_countries | tableau | Obligatoire | REQUIRED on every ads_archive call. JSON array of ISO country codes, URL-encoded — ["US"] — or ALL | ["US"] |
estimated_audience_size_min | entier | Facultatif | one of the fixed buckets 100 | 1000 | 5000 | 10000 | 50000 | 100000 | 500000 | 1000000 | |
- Paramètres de requête
afterchaîneFacultatifpaging.cursors.after from the previous response
limitentierFacultatifpage size; 25 by default, a few hundred is the practical ceiling before Meta starts timing out
Exemple :
25fieldschaîneObligatoirecomma-separated; nothing but id comes back by default
Exemple :
id,page_id,page_name,ad_creative_bodies,ad_creative_link_titles,ad_creative_link_captions,ad_snapshot_url,ad_delivery_start_time,ad_delivery_stop_time,publisher_platforms,languages,estimated_audience_sizead_typechaîneFacultatifALL (default) | POLITICAL_AND_ISSUE_ADS | HOUSING_ADS | EMPLOYMENT_ADS | FINANCIAL_PRODUCTS_AND_SERVICES_ADS
Exemple :
ALLlanguagestableauFacultatifISO 639-1 codes (plus CMN, YUE)
Exemple :
["en"]media_typechaîneFacultatifALL | IMAGE | MEME | VIDEO | NONE
Exemple :
VIDEOsearch_typechaîneFacultatifKEYWORD_UNORDERED (default, all words in any order) | KEYWORD_EXACT_PHRASE
Exemple :
KEYWORD_UNORDEREDsearch_termschaîneFacultatifmax 100 characters; matched against the ad's text. Required in practice unless you filter by search_page_ids instead
Exemple :
project management softwaread_active_statuschaîneFacultatifACTIVE (default) | INACTIVE | ALL — ALL is what you want for creative research, since a competitor's best-performing ad may have finished
Exemple :
ALLpublisher_platformstableauFacultatifFACEBOOK | INSTAGRAM | AUDIENCE_NETWORK | MESSENGER | WHATSAPP | OCULUS | THREADS
Exemple :
["INSTAGRAM"]ad_delivery_date_maxchaîneFacultatifYYYY-MM-DD
ad_delivery_date_minchaîneFacultatifYYYY-MM-DD; ads that were delivering on or after this date
Exemple :
2026-06-01ad_reached_countriestableauObligatoireREQUIRED on every ads_archive call. JSON array of ISO country codes, URL-encoded — ["US"] — or ALL
Exemple :
["US"]estimated_audience_size_minentierFacultatifone of the fixed buckets 100 | 1000 | 5000 | 10000 | 50000 | 100000 | 500000 | 1000000
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
curl -X GET 'https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.