Appearance
Ad Details
GET /v1/facebook/adLibrary/ad
Retrieves detailed information about a specific Facebook ad by its ID or URL. Returns adArchiveID, pageName, isActive, startDate, endDate, and a snapshot containing body, images, videos, display_format, link_url, and cta_text. For ads with multiple versions, the ad creative is found in the snapshot.cards array rather than snapshot.body.
Authentication
All requests require the x-api-key header. Get your key at scrapecreators.com.
Query Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | no | Facebook Ad Id | 702369045530963 |
url | string | no | Facebook Ad URL | https://www.facebook.com/ads/library?id=1185617869915074 |
get_transcript | boolean | no | Get the transcript of the ad. Only works if the video is under 2 minutes. | false |
trim | boolean | no | Set to true for a trimmed down version of the response | false |
Example Request
curl
bash
curl 'https://api.scrapecreators.com/v1/facebook/adLibrary/ad' \
-H 'x-api-key: $SCRAPECREATORS_API_KEY'Node / TypeScript
js
const params = new URLSearchParams({ });
const res = await fetch(`https://api.scrapecreators.com/v1/facebook/adLibrary/ad?${params}`, {
headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);Python
python
import os, requests
r = requests.get(
'https://api.scrapecreators.com/v1/facebook/adLibrary/ad',
headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
params={},
)
r.raise_for_status()
print(r.json())CLI
bash
scrapecreators facebook-ads adLibrary-ad --helpExample Response
json
{
"adArchiveID": 1185617869915074,
"endDate": 1750316400,
"isAAAEligible": false,
"isActive": true,
"pageID": 15087023444,
"pageName": "Nike",
"politicalCountries": [],
"reachEstimate": null,
"snapshot": {
"ad_creative_id": 1809449763118705,
"cards": [],
"body_translations": {},
"byline": null,
"caption": "fb.com",
"cta_text": "Learn more",
"dynamic_item_flags": {},
"dynamic_versions": null,
"edited_snapshots": [],
"effective_authorization_category": "NONE",
"event": [],
"extra_images": [
{
"original_image_handle": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508997149_744746594672572_3057533797808431470_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=eKgqs7-b06UQ7kNvwGSYm41&_nc_oc=AdnV_v1Anh3aqBBXDa3xwDrMtLJUCvE8yKIgP5ODbX3xsSMCtTv2ucMTy36I8Bq20HU&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=ocFZ2kPWmNZ0nKyk5HCtkQ&oh=00_AfNfDJHp6d0Ie9tIXLBIXFQiMgWHVl1i48DahYYOgANgHg&oe=685A4B4A",
"resized_image_handle": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508997149_744746594672572_3057533797808431470_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=eKgqs7-b06UQ7kNvwGSYm41&_nc_oc=AdnV_v1Anh3aqBBXDa3xwDrMtLJUCvE8yKIgP5ODbX3xsSMCtTv2ucMTy36I8Bq20HU&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=ocFZ2kPWmNZ0nKyk5HCtkQ&oh=00_AfMe107fPkaznD6Pw8_wDaon3p-31ZXLHIeglHU_P3NYNw&oe=685A4B4A"
}
],
"extra_links": [
"https://www.nike.com.ar/"
],
"extra_texts": [],
"extra_videos": [],
"instagram_shopping_products": [],
"display_format": "image",
"title": "6 cuotas sin interés",
"link_description": null,
"link_url": "https://fb.com/canvas_doc/1952657995267951",
"page_welcome_message": null,
"images": [
{
"original_image_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.35426-6/499542231_3815578848587795_5060085138610262269_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=yk26_frcPLkQ7kNvwF5EWnq&_nc_oc=Adk8Xjt1SjUg-mBxkm6iUuDfXpyGXD5G5g6PBae8g0WWsJT-MfnhNGII7JL-KM5MJBE&_nc_zt=14&_nc_ht=scontent-ord5-2.xx&_nc_gid=ocFZ2kPWmNZ0nKyk5HCtkQ&oh=00_AfP6zfVuLkcD2Zts0gItXp801QK1k0lhEfqwwdqfNAU9gw&oe=685A3E80",
"resized_image_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.35426-6/509090139_3448752085259208_8196922920009954562_n.jpg?stp=dst-jpg_s600x600_tt6&_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=tV3v2Y_NIh0Q7kNvwEMM-Vk&_nc_oc=AdnpccGMqNlM0k9O87VmMBIp9pGtj3l1dkO5HaKRCti2V4X6AKUn8BR08SXOc_Y-8TY&_nc_zt=14&_nc_ht=scontent-ord5-3.xx&_nc_gid=ocFZ2kPWmNZ0nKyk5HCtkQ&oh=00_AfPXGzKezcPJSpAq8Ql2Xgx6Rn0a3Poit-iTirfhAwuiHA&oe=685A5634",
"watermarked_resized_image_url": "",
"image_crops": {}
}
],
"videos": [],
"creation_time": 1750344986,
"page_id": 15087023444,
"page_name": "Nike",
"page_profile_picture_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.35426-6/508670148_9776464209142246_4487234065380829819_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat
... (truncated)Credits
Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.
Errors
| Status | Meaning | Action |
|---|---|---|
| 200 | Success. | Use the JSON payload. |
| 400 | Invalid or missing parameter. | Verify required parameters and value format. |
| 401 | Missing or invalid x-api-key. | Pass a valid API key in the header. |
| 402 | Out of credits. | Top up at scrapecreators.com or wait for plan reset. |
| 404 | Resource not found or private. | Confirm the handle, URL, or id and that the resource is public. |
| 429 | Rate limited. | Backoff and retry with exponential delay. |
| 500 | Server error or upstream platform failure. | Retry with backoff; report persistent errors to support. |