Facebook Ad Library ads by page
Beta GET /v1/facebook/ad-library/company/ads
GET /v1/facebook/ad-library/company/ads
The ads a company runs, by Ad Library page id or by company name. Also available as POST with a JSON body.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
id | string | one of | Ad Library page id of the advertiser (from advertiser search). Also accepted as pageId, page_id. |
company_name | string | one of | Advertiser name (resolved to a page id). Also accepted as companyName. |
status | string | no | Ad status. One of active, inactive, all. Default active. Also accepted as active_status. Also accepted values: ACTIVE for active, INACTIVE for inactive, ALL for all. |
media_type | string | no | Creative type. meme is Meta's word for text on an image. One of all, image, video, meme, image_and_meme, none. Also accepted values: ALL for all, IMAGE for image, VIDEO for video, MEME for meme, IMAGE_AND_MEME for image_and_meme, NONE for none. |
language | string | no | Only ads in this language, a 2-letter code (EN, ES, FR). Also accepted as lang. |
sort | string | no | Order of results: impressions is most impressions first (ScrapeCreators' default), newest is most recent. Changing it restarts the cursor chain. One of relevance, impressions, newest. Also accepted as sort_by, sortBy, order. Also accepted values: total_impressions for impressions, relevancy_monthly_grouped for newest. |
start_date | string | no | Impressions window start, YYYY-MM-DD. |
end_date | string | no | Impressions window end, YYYY-MM-DD. |
Send at least one of id, company_name. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
cursor: the cursor from the previous page (Pagination).region: two-letter country code for results that vary by country. Changing it restarts the cursor chain.trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/facebook/ad-library/company/ads" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "id=15087023444" \
--data-urlencode "region=US" \
--data-urlencode "cursor=eyJrIjoiZmJhZHMiLCJjIjoiQVFIVEZfamZkd1hQZjYwUk9Ld3A0Qk1QeGlCM1BiN2pxYkc3dEtlbEhXSmJMc3hnb29XbnFjbWRnUUJCMEJ0Y3RGcW8iLCJwIjoiMTUwODcwMjM0NDQifQ"import os
import requests
params = {
"id": "15087023444",
"region": "US",
"cursor": "eyJrIjoiZmJhZHMiLCJjIjoiQVFIVEZfamZkd1hQZjYwUk9Ld3A0Qk1QeGlCM1BiN2pxYkc3dEtlbEhXSmJMc3hnb29XbnFjbWRnUUJCMEJ0Y3RGcW8iLCJwIjoiMTUwODcwMjM0NDQifQ",
}
res = requests.get(
"https://api.socialscrape.io/v1/facebook/ad-library/company/ads",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/facebook/ad-library/company/ads");
url.search = new URLSearchParams({
"id": "15087023444",
"region": "US",
"cursor": "eyJrIjoiZmJhZHMiLCJjIjoiQVFIVEZfamZkd1hQZjYwUk9Ld3A0Qk1QeGlCM1BiN2pxYkc3dEtlbEhXSmJMc3hnb29XbnFjbWRnUUJCMEJ0Y3RGcW8iLCJwIjoiMTUwODcwMjM0NDQifQ"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Facebook Ad Library ads by page",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/facebook/ad-library/company/ads",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "15087023444"
},
{
"name": "region",
"value": "US"
},
{
"name": "cursor",
"value": "eyJrIjoiZmJhZHMiLCJjIjoiQVFIVEZfamZkd1hQZjYwUk9Ld3A0Qk1QeGlCM1BiN2pxYkc3dEtlbEhXSmJMc3hnb29XbnFjbWRnUUJCMEJ0Y3RGcW8iLCJwIjoiMTUwODcwMjM0NDQifQ"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_cc9a8398781187ace05db907",
"data": {
"object": "list",
"items": [
{
"object": "ad",
"platform": "facebook",
"id": "1741150940324450",
"url": "https://www.facebook.com/ads/library/?id=1741150940324450",
"advertiser": {
"object": "advertiser",
"platform": "facebook",
"id": "15087023444",
"name": "Nike",
"url": "https://facebook.com/nike",
"page_id": "15087023444",
"country": null,
"verified": null,
"ad_count": null,
"extra": {
"categories": [
"Sportswear"
],
"image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/864869509_1653296926256147_3156543285094651318_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=uSW_Qxt7K9QQ7kNvwG7kpel&_nc_oc=AdoQi3RqZdma5IEI2u7F5LjvR9njdcm05RFGsZF...",
"likes": 39491776
}
},
"status": "active",
"started_at": "2026-10-27T07:00:00Z",
"ended_at": null,
"title": "NikeSKIMS Outerwear",
"body": "Performance-driven details meet elevated silhouettes in NikeSKIMS first-ever outerwear collection. Shop now.",
"cta_text": "Shop now",
"landing_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"format": "dynamic_creative",
"media": {
"thumbnail_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/863381536_1629878175452111_2186856551102654395_n.jpg?_nc_cat=103&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=10fUTWw10RMQ7kNvwHCY_uY&_nc_oc=AdquGCOv_7TJ2g_apQc9xkLLh6dXSzY3fyvRIybw-F66_HdEfmO42AUvGzLW_Y...",
"video_url": "https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQMThINznE2v6zjJUHiLUEsAe6tLCKgcJ6MocHt0gU-p-AsaNYsNictX5PBle5ainsTB4qblkbM2UlLyO4AZlQHUEa7f1zxKj_ESTcWbqYC6RQ.mp4?_nc_cat=104&_nc_sid=b66105&_nc_ht=video-iad3-1.xx.fbcdn.net&_nc_ohc=nb_6WRH...",
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"regions": null,
"publisher_platforms": [
"instagram"
],
"impressions": null,
"spend": null,
"extra": {
"caption": "nike.com",
"cards": [
{
"cta_text": "Shop Now",
"link_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"title": "NikeSKIMS Outerwear",
"video_url": "https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQMThINznE2v6zjJUHiLUEsAe6tLCKgcJ6MocHt0gU-p-AsaNYsNictX5PBle5ainsTB4qblkbM2UlLyO4AZlQHUEa7f1zxKj_ESTcWbqYC6RQ.mp4?_nc_cat=104&_nc_sid=b66105&_nc_ht=video-iad3-1.xx.fbcdn.net&_nc_ohc=nb_6WRH..."
},
{
"body": "Performance-driven details meet elevated silhouettes in NikeSKIMS first-ever outerwear collection. Shop now.",
"cta_text": "Shop Now",
"link_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"title": "NikeSKIMS Outerwear",
"video_url": "https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQM0-S81Xgb6hqjKs_uFBvJvkit7yKus5AsUFSvpArSC4we5KxlUwn_Bvp_DONqWPcoJWFz34jGtAMa3asLcUTSo-SZcEf1zMAw-b7NE2pzTzA.mp4?_nc_cat=107&_nc_sid=b66105&_nc_ht=video-iad6-1.xx.fbcdn.net&_nc_ohc=xzRxgs8..."
}
],
"categories": [
"UNKNOWN"
],
"collation_count": 2,
"collation_id": "965683042768272",
"contains_digital_created_media": false,
"contains_sensitive_content": false,
"gated_type": "ELIGIBLE",
"hide_data_status": "NONE",
"is_aaa_eligible": false,
"media_expires_at": "2026-11-03T12:01:44Z",
"regional_regulation_data": {
"finserv": {
"is_deemed_finserv": false,
"is_limited_delivery": false
},
"tw_anti_scam": {
"is_limited_delivery": false
}
},
"video_urls": [
"https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQMThINznE2v6zjJUHiLUEsAe6tLCKgcJ6MocHt0gU-p-AsaNYsNictX5PBle5ainsTB4qblkbM2UlLyO4AZlQHUEa7f1zxKj_ESTcWbqYC6RQ.mp4?_nc_cat=104&_nc_sid=b66105&_nc_ht=video-iad3-1.xx.fbcdn.net&_nc_ohc=nb_6WRH...",
"https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQM0-S81Xgb6hqjKs_uFBvJvkit7yKus5AsUFSvpArSC4we5KxlUwn_Bvp_DONqWPcoJWFz34jGtAMa3asLcUTSo-SZcEf1zMAw-b7NE2pzTzA.mp4?_nc_cat=107&_nc_sid=b66105&_nc_ht=video-iad6-1.xx.fbcdn.net&_nc_ohc=xzRxgs8..."
]
}
},
{
"object": "ad",
"platform": "facebook",
"id": "863054156866007",
"url": "https://www.facebook.com/ads/library/?id=863054156866007",
"advertiser": {
"object": "advertiser",
"platform": "facebook",
"id": "15087023444",
"name": "Nike",
"url": "https://facebook.com/nike",
"page_id": "15087023444",
"country": null,
"verified": null,
"ad_count": null,
"extra": {
"categories": [
"Sportswear"
],
"image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/855927589_1456995689655689_7861179406546544120_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=YQbv5qKzW6QQ7kNvwHUrCpf&_nc_oc=Adp_t208XBYDDRNJmXdgMFKyceLQgheCHSqN9qD...",
"likes": 39491776
}
},
"status": "active",
"started_at": "2026-10-27T07:00:00Z",
"ended_at": null,
"title": "NikeSKIMS Outerwear",
"body": "Performance-driven details meet elevated silhouettes in NikeSKIMS first-ever outerwear collection. Shop now.",
"cta_text": "Shop now",
"landing_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"format": "dynamic_creative",
"media": {
"thumbnail_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/857014578_2174319749830422_6237423086901910294_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=KgSzPhaF660Q7kNvwET6gjh&_nc_oc=AdqXxLJz_8rHvlmOzRAlfrVtUPFZ33GyoGwNcOpZX3Cg73RB6svrlGF3IKpZci...",
"video_url": "https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOM_F_MniZ-_eiw-ZpH_3mKF8mWUVD6uab43JspKB1zlLtipOCnu_yHODgd8GK7CzpKaUNjBvUbJf6NFghqmJSyKV6pbtFS3WCMO5YvZBIB0A.mp4?_nc_cat=100&_nc_sid=b66105&_nc_ht=video-iad6-1.xx.fbcdn.net&_nc_ohc=UkXyVMe...",
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"regions": null,
"publisher_platforms": [
"instagram"
],
"impressions": null,
"spend": null,
"extra": {
"caption": "nike.com",
"cards": [
{
"cta_text": "Shop Now",
"link_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"title": "NikeSKIMS Outerwear",
"video_url": "https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOM_F_MniZ-_eiw-ZpH_3mKF8mWUVD6uab43JspKB1zlLtipOCnu_yHODgd8GK7CzpKaUNjBvUbJf6NFghqmJSyKV6pbtFS3WCMO5YvZBIB0A.mp4?_nc_cat=100&_nc_sid=b66105&_nc_ht=video-iad6-1.xx.fbcdn.net&_nc_ohc=UkXyVMe..."
},
{
"body": "Performance-driven details meet elevated silhouettes in NikeSKIMS first-ever outerwear collection. Shop now.",
"cta_text": "Shop Now",
"link_url": "https://www.nike.com/w/nikeskims-jackets-5sac5zb2asd",
"title": "NikeSKIMS Outerwear",
"video_url": "https://video-iad3-2.xx.fbcdn.net/o1/v/t2/f2/m366/AQNUO60K5qIDnVm3ZY1jVNWQ0MrqZ9TmOF-hwfU2Uzj1X9IszvYLPwMKVEF1CrMmwvTsERt5gfqW27e0Sp4OBOmTi63eLqNm0ohUXgFDg7O94w.mp4?_nc_cat=111&_nc_sid=b66105&_nc_ht=video-iad3-2.xx.fbcdn.net&_nc_ohc=ExQREJ1..."
}
],
"categories": [
"UNKNOWN"
],
"collation_count": 1,
"collation_id": "1504696874857690",
"contains_digital_created_media": false,
"contains_sensitive_content": false,
"gated_type": "ELIGIBLE",
"hide_data_status": "NONE",
"is_aaa_eligible": false,
"media_expires_at": "2026-11-03T12:27:40Z",
"regional_regulation_data": {
"finserv": {
"is_deemed_finserv": false,
"is_limited_delivery": false
},
"tw_anti_scam": {
"is_limited_delivery": false
}
},
"video_urls": [
"https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQOM_F_MniZ-_eiw-ZpH_3mKF8mWUVD6uab43JspKB1zlLtipOCnu_yHODgd8GK7CzpKaUNjBvUbJf6NFghqmJSyKV6pbtFS3WCMO5YvZBIB0A.mp4?_nc_cat=100&_nc_sid=b66105&_nc_ht=video-iad6-1.xx.fbcdn.net&_nc_ohc=UkXyVMe...",
"https://video-iad3-2.xx.fbcdn.net/o1/v/t2/f2/m366/AQNUO60K5qIDnVm3ZY1jVNWQ0MrqZ9TmOF-hwfU2Uzj1X9IszvYLPwMKVEF1CrMmwvTsERt5gfqW27e0Sp4OBOmTi63eLqNm0ohUXgFDg7O94w.mp4?_nc_cat=111&_nc_sid=b66105&_nc_ht=video-iad3-2.xx.fbcdn.net&_nc_ohc=ExQREJ1..."
]
}
}
],
"cursor": "eyJrIjoiZmJhZHMiLCJjIjoiQVFIVHY4UU9FVEp5MkwzXzYyc2RIeGQwWUd6RWpMN0V5N3JWVndXcnhtZHRkZGNlS2x1bmxlOG9aVExoSVdVdHp2NTEiLCJwIjoiMTUwODcwMjM0NDQifQ",
"has_more": true,
"parent": {
"object": "advertiser",
"platform": "facebook",
"id": "15087023444",
"name": "Nike",
"url": "https://facebook.com/nike",
"page_id": "15087023444",
"country": null,
"verified": null,
"ad_count": null,
"extra": {
"categories": [
"Sportswear"
],
"image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/864869509_1653296926256147_3156543285094651318_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=uSW_Qxt7K9QQ7kNvwG7kpel&_nc_oc=AdoQi3RqZdma5IEI2u7F5LjvR9njdcm05RFGsZF...",
"likes": 39491776
}
}
},
"cursor": "eyJrIjoiZmJhZHMiLCJjIjoiQVFIVHY4UU9FVEp5MkwzXzYyc2RIeGQwWUd6RWpMN0V5N3JWVndXcnhtZHRkZGNlS2x1bmxlOG9aVExoSVdVdHp2NTEiLCJwIjoiMTUwODcwMjM0NDQifQ",
"has_more": true
}Response#
A list of Ad objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
{
"ok": false,
"error": {
"code": "not_found",
"message": "The platform says this profile, post or item does not exist.",
"retryable": false
},
"credits_charged": 0,
"request_id": "req_c4b8addd8b5f1e5089096dee"
}Also served at#
These paths answer the same request, so code written for other APIs keeps working: /v1/facebook/adLibrary/company/ads. See Switching from ScrapeCreators.
Related endpoints#
- Facebook Ad Library search (
GET /v1/facebook/ad-library/search) - Facebook Ad Library search (POST body) (
POST /v1/facebook/ad-library/search) - Facebook Ad Library ads by page (POST body) (
POST /v1/facebook/ad-library/company/ads) - Facebook Ad Library ad details (
GET /v1/facebook/ad-library/ad) - Facebook Ad Library ad transcript (
GET /v1/facebook/ad-library/ad/transcript) - Facebook Ad Library advertiser search (
GET /v1/facebook/ad-library/search/companies) - Facebook profile or page (
GET /v1/facebook/profile) - Facebook profile posts (
GET /v1/facebook/profile/posts)