Facebook Ad Library Ad Details API
Get one Facebook Ad Library ad by its Library ID or ads/library/?id= URL, active or inactive. Returns adArchiveID, pageName, isActive, startDate, endDate, publisherPlatform and the snapshot (body, cards, images, videos, display_format, link_url, cta_text), with the advertiser's pageInfo and, for ads shown in the EU, aaa_info audience data. An ad no longer in the library is a 404. Ids are strings.
Quick start
cURL
curl --request GET 'https://api.fetchproof.com/v1/facebook/adLibrary/ad?id=1016451784037642' \
--header 'x-api-key: YOUR_API_KEY' JavaScript
const response = await fetch("https://api.fetchproof.com/v1/facebook/adLibrary/ad?id=1016451784037642", {
method: 'GET',
headers: {
'x-api-key': process.env.FETCHPROOF_API_KEY,
},
});
const data = await response.json();
console.log(data); Python
import os
import requests
response = requests.get(
"https://api.fetchproof.com/v1/facebook/adLibrary/ad?id=1016451784037642",
headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json()) Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/facebook/adLibrary/ad?id=1016451784037642", nil)
req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} PHP
<?php
$ch = curl_init("https://api.fetchproof.com/v1/facebook/adLibrary/ad?id=1016451784037642");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response; {
"success": true,
"credits_remaining": 100,
"credits_charged": 1,
"adid": null,
"adArchiveID": "1016451784037642",
"categories": [
0
],
"containsDigitallyCreatedMedia": false,
"containsSensitiveContent": false,
"collationCount": null,
"collationID": null,
"currency": "",
"endDate": 1756364400,
"fevInfo": null,
"gatedType": "ELIGIBLE",
"hasUserReported": false,
"hideDataStatus": "NONE",
"impressionsWithIndex": {
"impressionsText": null
},
"isAAAEligible": false,
"isActive": true,
"pageID": "15087023444",
"pageInfo": {
"entity_type": "PERSON_PROFILE",
"ig_followers": 290773921,
"ig_username": "nike",
"ig_verification": true,
"likes": 39488890,
"page_alias": "nike",
"page_category": "Sportswear Store",
"page_cover_photo": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-6/285211224_10159903868008445_5477337468887983165_n.png?ccb=1-7",
"page_id": "15087023444",
"page_is_deleted": false,
"page_is_restricted": false,
"page_name": "Nike",
"page_profile_uri": "https://facebook.com/nike",
"page_verification": "BLUE_VERIFIED",
"profile_photo": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-1/284964043_10159903868513445_7696353984967674128_n.jpg?stp=dst-jpg_s148x148_tt6&ccb=1-7",
"is_profile_page": false
},
"pageIsDeleted": false,
"pageName": "Nike",
"reachEstimate": null,
"regionalRegulationData": {
"finserv": {
"is_deemed_finserv": false,
"is_limited_delivery": false
},
"tw_anti_scam": {
"is_limited_delivery": false
}
},
"reportCount": null,
"snapshot": {
"cards": [
{
"body": "Get the gear that goes hard on and off the field.",
"cta_type": "SHOP_NOW",
"caption": "nike.com",
"link_description": "",
"link_url": "https://www.nike.com/t/air-monarch-iv-mens-workout-shoes-p8qNlT/415445-001?dplnk=member",
"title": "Nike Air Monarch IV ",
"cta_text": "Shop Now",
"video_hd_url": null,
"video_preview_image_url": null,
"video_sd_url": null,
"watermarked_video_hd_url": null,
"watermarked_video_sd_url": null,
"image_crops": [],
"original_image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/509290535_730168202720612_5631758797674183318_n.jpg?ccb=1-7",
"resized_image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/509290535_730168202720612_5631758797674183318_n.jpg?stp=dst-jpg_s600x600_tt6&ccb=1-7",
"watermarked_resized_image_url": ""
},
{
"body": "Get the gear that goes hard on and off the field.",
"cta_type": "SHOP_NOW",
"caption": "nike.com",
"link_description": "",
"link_url": "https://www.nike.com/t/air-monarch-iv-mens-workout-shoes-extra-wide-p8qNlT/416355-001?dplnk=member",
"title": "Nike Air Monarch IV ",
"cta_text": "Shop Now",
"video_hd_url": null,
"video_preview_image_url": null,
"video_sd_url": null,
"watermarked_video_hd_url": null,
"watermarked_video_sd_url": null,
"image_crops": [],
"original_image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/509094198_1485897442775736_2519419118144931021_n.jpg?ccb=1-7",
"resized_image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/509094198_1485897442775736_2519419118144931021_n.jpg?stp=dst-jpg_s600x600_tt6&ccb=1-7",
"watermarked_resized_image_url": ""
},
{
"body": "Get the gear that goes hard on and off the field.",
"cta_type": "SHOP_NOW",
"caption": "nike.com",
"link_description": "",
"link_url": "https://www.nike.com/t/tempo-shorts-toddler-shorts-Gx0CH3/267358-019?dplnk=member",
"title": "Nike Tempo Shorts ",
"cta_text": "Shop Now",
"video_hd_url": null,
"video_preview_image_url": null,
"video_sd_url": null,
"watermarked_video_hd_url": null,
"watermarked_video_sd_url": null,
"image_crops": [],
"original_image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/508839160_1795820578003799_8147925336477608418_n.jpg?ccb=1-7",
"resized_image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/508839160_1795820578003799_8147925336477608418_n.jpg?stp=dst-jpg_s600x600_tt6&ccb=1-7",
"watermarked_resized_image_url": ""
}
],
"byline": null,
"caption": "NIKE.COM",
"cta_text": "Shop now",
"event": null,
"extra_images": [],
"extra_links": [],
"extra_texts": [],
"extra_videos": [],
"display_format": "DPA",
"title": "{{product.name}}",
"link_description": null,
"link_url": "https://www.nike.com/us/en_us",
"images": [],
"videos": [],
"page_id": "15087023444",
"page_name": "Nike",
"page_profile_picture_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/509357337_4088170881445143_8138324132275675252_n.jpg?stp=dst-jpg_s60x60_tt6&ccb=1-7",
"page_categories": [
"Sportswear"
],
"is_reshared": false,
"body": "Get the gear that goes hard on and off the field.",
"brazil_tax_id": null,
"branded_content": null,
"disclaimer_label": null,
"page_like_count": 39488890,
"page_profile_uri": "https://www.facebook.com/nike/",
"page_is_deleted": false,
"root_reshared_post": null,
"cta_type": "SHOP_NOW",
"additional_info": null,
"ec_certificates": [],
"country_iso_code": null
},
"spend": null,
"startDate": 1750402800,
"stateMediaRunLabel": null,
"publisherPlatform": [
"FACEBOOK",
"INSTAGRAM"
],
"menuItems": [],
"totalActiveTime": null,
"url": "https://www.facebook.com/ads/library/?id=1016451784037642",
"startDateString": "2025-06-20T07:00:00.000Z",
"endDateString": "2025-08-28T07:00:00.000Z"
} What it returns
- success boolean
- credits_remaining integer
- credits_charged integer
- adid integernull
- adArchiveID string
- Ad Library ID, as a string: Facebook ids can pass 2^53
- archiveTypes array
- categories array
- containsDigitallyCreatedMedia boolean
- containsSensitiveContent boolean
- collationCount null
Parameters
Facebook Ad Id
Facebook Ad Library URL, e.g. https://www.facebook.com/ads/library/?id=1016451784037642
Accepted for compatibility and ignored.
Not supported: get_transcript=true returns 400. Use the video URLs in snapshot.videos.
Set true for a trimmed response.
Use a cached response this old or newer for 0 credits. If none is available, fetch live at the endpoint’s normal price.
Use cases
- Look up one ad by its Ad Library ID
- See an ad's creative, copy and call to action
- Check when an ad started and whether it still runs
- Get the advertiser page behind an ad
Billing
Errors cost zero credits, and so do cache hits through cache_max_age. Empty results follow this operation’s rules.
Default: 1 credit
An empty result costs 0 credits.
How charges are determined
Cost is decided per call, not per endpoint: the same operation can cost different amounts depending on what it returns.
A call that fails costs 0 credits. A result served from cache costs 0 credits.
`default` is the cost when no rule matches. Rules are evaluated in order and the first whose conditions all hold wins.
A `when` condition is one of: `param` (the request parameter is true), `outcome` (the classifier's outcome), `empty` / `nonEmpty` (a response field is empty and absent, or a non-empty array or string), `flag` (a response field is exactly true).
A cost of `{ perStartedMinute: n, of: [fields] }` is n x max(1, ceil(seconds / 60)), so even a short result bills at least one minute.
Guides
Related Facebook Ad Library endpoints
FAQ
How much does the Facebook Ad Library Ad Details API cost?
A call costs 1 credit by default. Errors cost 0 credits, and a cached result served through cache_max_age costs 0. New accounts get 100 free credits with no card. After that, credits come in one-time packs that never expire: 25,000 for $27 and 500,000 for $297 (plus any tax). There is no subscription.
What do I need to call it?
An API key in the x-api-key header. You don't need a Facebook Ad Library account or developer app.
What does it return?
Typed JSON. Top-level fields include adid, adArchiveID, archiveTypes, categories, containsDigitallyCreatedMedia and containsSensitiveContent. The full schema and a real sample response are on this page and in the API reference.
Is this an official Facebook Ad Library API?
No. Fetchproof is an unofficial API that returns public Facebook Ad Library data only.