Introducing the Instagram APIRead more →

Facebook Ad Library Advertiser Ads API. Active and past ads, page by page.

Active and past ads of one Page, with creatives. We handle the proxies, blocks and platform changes.

Facebook Ad Library Advertiser Ads API at a glance

Returns the ads a Facebook Page ran on Facebook, Instagram, Messenger, Threads and the Audience Network, from its link, name or Page ID. Each ad from Meta's public Ad Library has the days it first and last ran, whether it's still active, where it ran and its creatives: headline, text, link, call to action, images and videos. Political and social-issue ads add the payer and Meta's impression, reach and spend ranges. Filter by country, language, status, kind of creative and dates, and sort by most impressions or newest.

GET /v1/facebook/ads

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 20 typed fields null when unknown
  • 10 active and past ads per page, most impressions first
  • handle is all it needs, e.g. https://www.facebook.com/ads/library/?view_all_page_id=20531316728&search_type=page

Send one request. Get up to 10 active and past ads back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
handle = https://www.facebook.com/ads/library/?view_all_page_id=20531316728&search_type=page
GET /v1/facebook/adsTry in
const params = new URLSearchParams({
  handle: "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&view_all_page_id=20531316728&search_type=page&media_type=all",
});
const res = await fetch(`https://socialtap.dev/v1/facebook/ads?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/facebook/adsLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 4 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field Facebook Ad Library doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    The advertiser: its Ad Library link (facebook.com/ads/library/?view_all_page_id=…), its Facebook Page's link or name, or its Page ID.

  • Write one parser

    Facebook Ad Library, TikTok Ad Library, Google Ads Transparency Center and LinkedIn Ad Library answer in these fields, so the code that reads one reads them all.

platformstring
Library owner's platform ID (facebook for Meta's library, tiktok, google, linkedin).
idstring
Library ad ID (string).
urlstring
Public library page of the ad.
advertiserobject
The advertising page, business or account.
paid_bystring
Disclosed payer ("Paid for by").
is_activeboolean
True while the ad is running.
first_shown_atstring
First delivery, RFC 3339 UTC (often date-only: see approximate_fields).
last_shown_atstring
Last delivery, RFC 3339 UTC; null while active.

What teams build with the Facebook Ad Library Advertiser Ads API.

  • Monitor a competitor's active ads

  • Track how a brand's campaigns change

  • Audit a political advertiser's payers and spend

  • Collect a Page's ad IDs for full details

Good to know before you build.

  • A Page with no ads and an ID that names no advertiser usually both return an empty list.
  • advertiser.id is the Page's own ID. Facebook's posts and comments name a Page by its profile ID: join them to an advertiser by username, not id.
  • A facebook.com/<digits> link, Meta's link for a Page without a username, reads as a post link: send the digits alone.
  • Payer, impressions, reach and spend are disclosed only for political and social-issue ads, and are null for other ads.
  • Run dates are whole days in US Pacific time, as Meta reports them, so approximate_fields lists them.
  • since and until keep the ads that ran during the window (first ran before until, and still running or last ran at or after since), in whole days as Meta reports them. A filtered page can hold fewer ads than limit without being the end of the list.
  • Filters in an Ad Library link (its country, its active status) are ignored: send them as params.
  • Meta groups ads that share a creative, and each ad in a group comes back as its own item.
  • Languages, targeting and EU reach by country are empty or null in the list: the Facebook Ad Library Ad API returns them for one ad.

1 credit per page. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful pagePer 1,000 pages
Platform API api1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the Facebook Ad Library Advertiser Ads API.

More in the API reference.

Where do I find a Page's ID?
You don't need it: send the Page's link or name. An advertiser's Ad Library link carries it as view_all_page_id, and the Facebook Ad Library Advertiser Search API finds it by name.
Why is the list empty for a brand I know advertises?
Usually because the ads run from another of its Pages. The list holds one Page's ads, and brands often have one Page per country: try status=all with no country, then the brand's other Pages (the Facebook Ad Library Advertiser Search API lists them).
How much does the Facebook Ad Library Advertiser Ads API cost?
A page of up to 10 active and past ads costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 1 hour.

Try it on a link you already have.

Paste it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 218 endpoints
Start for free Read the docs