↑ ↓ to move ↵ to open

Facebook Ad Library API reference

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.

At a glance

Platform ID
fb-adlibrary
Endpoints
4
Price
From 6 credits per call; failed calls are free
Pin in MCP
https://data.upscrape.com/mcp?platforms=fb-adlibrary
Pin tools
OpenAPI
openapi.json
Download

The Facebook Ad Library API has 4 endpoints, called the same way: POST /execute with the endpoint ID as capability and its fields as input, or pin Facebook Ad Library in the MCP server and call each one as a tool. The data comes back as JSON in results[0].data, with what the call cost in billing.credits_charged.

The input most of them take is query. Prices run from 6 credits to 8 credits per call, and a failed call costs nothing.

Endpoints

Open an endpoint for its input, the fields it returns and the request in cURL, Python and Node.js.

EndpointWhat it returnsPrice
fb-adlibrary.ad.search 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. 8 credits
fb-adlibrary.advertiser-ads.list List every ad of one advertiser's Facebook page, with the same filters as search. 8 credits
fb-adlibrary.advertiser.discover Find an advertiser's Facebook page ID from its name, to list its ads. 6 credits
fb-adlibrary.ad.get Get one ad from its Ad Library ID, with its creative and the details the library shows for it. 6 credits

What to know

  • Every public ad Search covers the ads the library shows publicly in a country, commercial ads as well as political ones.
  • Spend and reach where shown Spend, impressions and reach come back when the library shows them, which is mostly for political and issue ads and ads in the EU. Elsewhere they are empty.
  • Dates as timestamps Start and end dates are Unix timestamps, so you can sort and compare them directly.
  • Next pages Results come a page at a time. Send next_cursor back to continue.

Something missing or unclear? Ask the team that builds the Facebook Ad Library endpoints.