Search Facebook ad library ads by keyword
scrapecreators.x.v1-facebook-adlibrary-search-adsSearches the Meta Ad Library by keyword and returns matching ads.
- Price
- $0.00188/callZum Anbieterpreis
- Success rate
- —Noch keine ErfolgsratendatenNoch keine Erfolgsratendaten
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=runningPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
sort_by is order-only: ranking by total_impressions does not mean the response carries verified spend or impression counts. Search may return a non-null collation_count that is null on scrapecreators.x.v1-facebook-adlibrary-ad detail for the same ad — grouping semantics differ between search and detail; do not treat collation_count as creative-variant or budget counts.
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Abfrageparameter | ||||
trim | Boolean | Optional | Set to true for a trimmed down version of the response | false |
query | Zeichenkette | Erforderlich | Keyword to search for | running |
cursor | Zeichenkette | Optional | Cursor to paginate through results | AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj- |
status | Zeichenkette | Optional | Status of the ad. Defaults to ACTIVE. | ACTIVE |
ad_type | Zeichenkette | Optional | Search for all ads or only political and issue ads | all |
country | Zeichenkette | Optional | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. | ALL |
sort_by | Zeichenkette | Optional | Order only. One of: total_impressions | relevancy_monthly_grouped. Defaults to impressions ranking (total_impressions). Controls result ORDER, not verified performance — does not guarantee non-null spend, impressions_text, or a positive impressions_index. Those fields are often null / -1 for commercial ads and are not verified performance metrics. | total_impressions |
end_date | Zeichenkette | Optional | Impressions end date. Needs to be in YYYY-MM-DD format. | 2025-02-16 |
media_type | Zeichenkette | Optional | Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme. | ALL |
start_date | Zeichenkette | Optional | Impressions start date. Needs to be in YYYY-MM-DD format. | 2025-01-05 |
search_type | Zeichenkette | Optional | If you want to search by exact phrase or not | keyword_unordered |
- Abfrageparameter
trimBooleanOptionalSet to true for a trimmed down version of the response
Beispiel:
falsequeryZeichenketteErforderlichKeyword to search for
Beispiel:
runningcursorZeichenketteOptionalCursor to paginate through results
Beispiel:
AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj-statusZeichenketteOptionalStatus of the ad. Defaults to ACTIVE.
Beispiel:
ACTIVEad_typeZeichenketteOptionalSearch for all ads or only political and issue ads
Beispiel:
allcountryZeichenketteOptionalThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
Beispiel:
ALLsort_byZeichenketteOptionalOrder only. One of: total_impressions | relevancy_monthly_grouped. Defaults to impressions ranking (total_impressions). Controls result ORDER, not verified performance — does not guarantee non-null spend, impressions_text, or a positive impressions_index. Those fields are often null / -1 for commercial ads and are not verified performance metrics.
Beispiel:
total_impressionsend_dateZeichenketteOptionalImpressions end date. Needs to be in YYYY-MM-DD format.
Beispiel:
2025-02-16media_typeZeichenketteOptionalMedia type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme.
Beispiel:
ALLstart_dateZeichenketteOptionalImpressions start date. Needs to be in YYYY-MM-DD format.
Beispiel:
2025-01-05search_typeZeichenketteOptionalIf you want to search by exact phrase or not
Beispiel:
keyword_unordered
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
curl -X GET 'https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running", {
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());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.00188/call einschließlich Servicegebühr abgerechnet.