Facebook ad library company ads by page id or name
scrapecreators.x.v1-facebook-adlibrary-company-adsFetches all ads currently running for a specific company from the Meta Ad Library.
- Price
- $0.00188/callAt provider cost
- Success rate
- —No success-rate data yetNo success-rate data yet
- Latency p50
- ——
- Last verified
- Oct 20, 2026Verified working
GEThttps://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-company-ads?pageId=367152833370567Preview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
trim | boolean | Optional | Set to true for a trimmed down version of the response | false |
cursor | string | Optional | Cursor to paginate through results | AQHRBUAxNmFlxBVMFL6uTb1ICFsV65O4SqmPbcVZJhiveBpPS1hFHAmL6yCJcF760cXP |
pageId | string | Optional | The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName | 367152833370567 |
status | string | Optional | Status of the ad. Defaults to ACTIVE. | ACTIVE |
country | string | 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 | string | Optional | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. | total_impressions |
end_date | string | Optional | End date to search for. Format: YYYY-MM-DD | 2025-12-31 |
language | string | Optional | Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc | EN |
media_type | string | Optional | Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme. | ALL |
start_date | string | Optional | Start date to search for. Format: YYYY-MM-DD | 2025-01-01 |
companyName | string | Optional | The name of the company. Can either use this or pageId | Lululemon |
- Query parameters
trimbooleanOptionalSet to true for a trimmed down version of the response
Example:
falsecursorstringOptionalCursor to paginate through results
Example:
AQHRBUAxNmFlxBVMFL6uTb1ICFsV65O4SqmPbcVZJhiveBpPS1hFHAmL6yCJcF760cXPpageIdstringOptionalThe companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName
Example:
367152833370567statusstringOptionalStatus of the ad. Defaults to ACTIVE.
Example:
ACTIVEcountrystringOptionalThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
Example:
ALLsort_bystringOptionalSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
Example:
total_impressionsend_datestringOptionalEnd date to search for. Format: YYYY-MM-DD
Example:
2025-12-31languagestringOptionalLanguage to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
Example:
ENmedia_typestringOptionalMedia type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.
Example:
ALLstart_datestringOptionalStart date to search for. Format: YYYY-MM-DD
Example:
2025-01-01companyNamestringOptionalThe name of the company. Can either use this or pageId
Example:
Lululemon
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
curl -X GET 'https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-company-ads?pageId=367152833370567' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-company-ads?pageId=367152833370567",
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-company-ads?pageId=367152833370567", {
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());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.00188/call, including the service fee.