↑ ↓ to move ↵ to open
Ad libraries · REST API · MCP server

Facebook Ad Library API

Get ads from the Meta Ad Library as JSON: search Facebook and Instagram ads by keyword, list everything one advertiser runs, and filter by country, platform, media type, status and date.

  • 1 credit per call
  • Failed calls are free
  • Updated
fb-adlibrary.ad.search 5 rows completed
# Advertiser Ad text Button Format Active Started Library ID Contains digital created media Contains sensitive content Currency
1 Nordstrom Rack Buy online and pick up in store for free! Get up to 70% off Nik… Learn more VIDEO true 1,785,740,400 925321173274919 false false
2 Foot Locker Refresh your wardrobe with new styles from Nike, New Balance, a… Shop now DPA true 1,784,703,600 2087470841874320 false false
3 Perfect themes 🔥🍭Themepack is a FREE and personalized APP😍 various styles of T… Install now IMAGE true 1,779,174,000 1550534860016399 false false
4 Depop Free Depop Shipping just dropped. Go find something you love. Download DPA true 1,779,433,200 962050096457659 false false
5 Nike Run through summer with gear that can take the heat. Shop now DPA true 1,788,246,000 1107386451952079 false false
Endpoints

Facebook Ad Library API endpoints

What each one takes and what it returns. Open one for a real response, every input and every field.

Facebook Ad Library Ads Search API

Search the Ad Library by keyword and get each ad's advertiser, text, button, format, platforms, status and run dates, with country, language, platform, media and date filters.

Sendquery Returnspage_namesnapshotis_activestart_datead_archive_idad_id
1 credit

Facebook Ad Library Advertiser Ads API

List every ad of one advertiser's Facebook page, with the same filters as search.

Sendpage_id Returnspage_namesnapshotis_activestart_datead_archive_idad_id
1 credit

Facebook Ad Library Ad Detail API

Get one ad from its Ad Library ID, with its creative and the details the library shows for it.

Sendarchive_id Returnsadad_url
1 credit
Use cases

What teams build with Facebook Ad Library data

Know before you build

How Facebook Ad Library data behaves

REST API · MCP server

Call it from your code, or ask your agent

One request shape for every Facebook Ad Library endpoint: the endpoint ID and its input. No SDK needed.

curl --request POST \  --url https://data.upscrape.com/execute \  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \  --header "Content-Type: application/json" \  --header "Prefer: wait=30" \  --data '{  "capability": "fb-adlibrary.ad.search",  "input": {    "active": "active",    "limit": 5,    "query": "nike"  }}'
Response
{  "total_items": 5,  "items": [    {      "ad_archive_id": "925321173274919",      "ad_id": null,      "collation_count": 2,      "collation_id": "1022906600523558",      "contains_digital_created_media": false,      "contains_sensitive_content": false,      "currency": "",      "end_date": 1791183600,      "fev_info": null,      "gated_type": "ELIGIBLE",      "has_user_reported": false,      "hide_data_status": "NONE",      "is_aaa_eligible": false,      "is_active": true,      "page_id": "89516513179",      "page_is_deleted": false,      "page_name": "Nordstrom Rack",      "reach_estimate": null,      "report_count": null,      "spend": null,      "start_date": 1785740400,      "state_media_run_label": null,      "total_active_time": null,      "impressions_with_index": {        "impressions_index": -1,        "impressions_text": null      },      "regional_regulation_data": {        "finserv": {          "is_deemed_finserv": false,          "is_limited_delivery": false        },        "tw_anti_scam": {          "is_limited_delivery": false        }      },      "snapshot": {        "title": "Fast & Free Pickup",        "caption": "Nordstromrack.com",        "additional_info": null,        "branded_content": null,        "brazil_tax_id": null,        "byline": null,        "country_iso_code": null,        "cta_text": "Learn more",        "cta_type": "LEARN_MORE",        "disclaimer_label": null,        "display_format": "VIDEO",        "event": null,        "is_reshared": false,        "link_description": "Fast & Free Pickup",        "link_url": "https://fb.com/canvas_doc/1072291375736811",        "page_id": "89516513179",        "page_is_deleted": false,        "page_like_count": 2518817,        "page_name": "Nordstrom Rack",        "page_profile_uri": "https://www.facebook.com/NordstromRack/",        "root_reshared_post": null,        "body": {          "text": "Buy online and pick up in store for free! Get up to 70% off Nike, Vince, Madewell, adidas and more."        },        "cards": [],        "ec_certificates": [],        "extra_images": [],        "extra_links": [          "https://stores.nordstromrack.com/search"        ],        "extra_texts": [],        "extra_videos": [          {}        ],        "page_categories": [          "Clothing (Brand)"        ],        "videos": [          {            "watermarked_video_hd_url": null,            "watermarked_video_sd_url": null          }        ]      },      "categories": [        "UNKNOWN"      ],      "menu_items": [],      "publisher_platform": [        "FACEBOOK",        "INSTAGRAM"      ],      "targeted_or_reached_countries": []    },    {      "ad_archive_id": "2087470841874320",      "ad_id": null,      "collation_count": null,      "collation_id": null,      "contains_digital_created_media": false,      "contains_sensitive_content": false,      "currency": "",      "end_date": 1791183600,      "fev_info": null,      "gated_type": "ELIGIBLE",      "has_user_reported": false,      "hide_data_status": "NONE",      "is_aaa_eligible": false,      "is_active": true,      "page_id": "67997232685",      "page_is_deleted": false,      "page_name": "Foot Locker",      "reach_estimate": null,      "report_count": null,      "spend": null,      "start_date": 1784703600,      "state_media_run_label": null,      "total_active_time": null,      "impressions_with_index": {        "impressions_index": -1,        "impressions_text": null      },      "regional_regulation_data": {        "finserv": {          "is_deemed_finserv": false,          "is_limited_delivery": false        },        "tw_anti_scam": {          "is_limited_delivery": false        }      },      "snapshot": {        "title": "Shop New Styles",        "caption": "footlocker.com",        "additional_info": null,        "branded_content": null,        "brazil_tax_id": null,        "byline": null,        "country_iso_code": null,        "cta_text": "Shop now",        "cta_type": "SHOP_NOW",        "disclaimer_label": null,        "display_format": "DPA",        "event": null,        "is_reshared": false,        "link_description": null,        "link_url": "https://www.footlocker.com/category/new-arrivals.html",        "page_id": "67997232685",        "page_is_deleted": false,        "page_like_count": 6728674,        "page_name": "Foot Locker",        "page_profile_uri": "https://www.facebook.com/Footlocker/",        "root_reshared_post": null,        "body": {          "text": "Refresh your wardrobe with new styles from Nike, New Balance, adidas, and more."        },        "cards": [          {            "title": "Shop New Styles",            "body": "Refresh your wardrobe with new styles from Nike, New Balance, adidas, and more.",            "caption": "footlocker.com",            "cta_text": "Shop Now",            "cta_type": "SHOP_NOW",            "link_description": "Shop the latest selection of New Arrivals at Foot Locker. Find the hottest sneaker drops from brands like Jordan, Nike, Under Armour, New B…",            "link_url": "https://www.footlocker.com/product/~/00D2VSLV.html?cm_mmc=Social%20Network-_-Facebook-_--_-Conversion-_--_--_-p-_--_-Evergreen%20Dynamic-_-…",            "watermarked_resized_image_url": "",            "watermarked_video_hd_url": null,            "watermarked_video_sd_url": null,            "image_crops": []          },          {            "title": "Shop New Styles",            "body": "Refresh your wardrobe with new styles from Nike, New Balance, adidas, and more.",            "caption": "footlocker.com",            "cta_text": "Shop Now",            "cta_type": "SHOP_NOW",            "link_description": "Shop the latest selection of New Arrivals at Foot Locker. Find the hottest sneaker drops from brands like Jordan, Nike, Under Armour, New B…",            "link_url": "https://www.footlocker.com/product/~/00051791.html?cm_mmc=Social%20Network-_-Facebook-_--_-Conversion-_--_--_-p-_--_-Evergreen%20Dynamic-_-…",            "watermarked_resized_image_url": "",            "watermarked_video_hd_url": null,            "watermarked_video_sd_url": null,            "image_crops": []          }        ],        "ec_certificates": [],        "extra_images": [],        "extra_links": [],        "extra_texts": [],        "extra_videos": [],        "page_categories": [          "Shopping"        ],        "videos": []      },      "categories": [        "UNKNOWN"      ],      "menu_items": [],      "publisher_platform": [        "FACEBOOK",        "INSTAGRAM"      ],      "targeted_or_reached_countries": []    }  ]}
In your AI agent Claude · Cursor · any MCP client
1Add the Upscrape MCP server
https://data.upscrape.com/mcp
2Ask for the data in plain words

Using Upscrape, search the Facebook Ad Library for active ads mentioning nike and show me five with the advertiser, the ad text, the button and when each started.

With Upscrape, list the ads of Nike's Facebook page (page ID 15087023444) in the Ad Library and tell me which platforms they ran on.

With Upscrape, get the Facebook Ad Library discover advertisers for country "US" and query "nike". Tell me what it costs before you run it, then show the results as a table.

The agent finds the endpoint, shows you the price, and runs it with your credits.
Ad libraries
Questions

Facebook Ad Library API FAQ

The short answers. The docs have the long ones.

Still have a question? Talk to the people who build the endpoints.
How is this different from Meta's Ad Library API?

Meta's API needs a verified developer account and mainly covers political and issue ads. Upscrape searches all public ads in the Ad Library with one API key.

Does it cover Instagram ads?

Yes. The Ad Library covers Facebook, Instagram, Messenger and the Audience Network, and you can filter by platform.

What data can I get from Facebook Ad Library?

Ads search, advertiser ads, discover advertisers and ad detail. Each is its own endpoint with a published input schema, and the response is JSON.

How much does the Facebook Ad Library API cost?

Every Facebook Ad Library endpoint costs 1 credit per successful call. You buy credits once, with no subscription, and paid credits never expire. New accounts get free credits to try it.

Do I need a Facebook Ad Library account or login?

No. Upscrape reads the pages Facebook Ad Library shows to any visitor, so you send the input the endpoint asks for and get the data back. Nothing runs on your account, and you share no password or cookie.

Can an AI agent use the Facebook Ad Library API?

Yes. Connect any MCP client to the Upscrape MCP server with OAuth or an API key. The agent finds the Facebook Ad Library endpoint, checks its price and runs it with the same credits as the REST API.

Is it legal to scrape Facebook Ad Library?

Upscrape reads public pages only and needs no login. How you use the data is yours to decide under the laws that apply to you; we sign a data processing agreement for your legal review.

What happens when Facebook Ad Library changes its pages?

We fix the endpoint. Your request and the response fields stay the same.

Get started

Your first Facebook Ad Library call is free.

Up to 100 free credits to start, no card needed.