Introducing the Instagram APIRead more →

Facebook Ad Library Ad API. Send an ad link or ID.

Creatives, run dates, placements and EU reach. We handle the proxies, blocks and platform changes.

Facebook Ad Library Ad API at a glance

Returns one ad from Meta's public Ad Library by its link or Library ID: its creatives, the days it ran, where it ran and who ran it. Each creative has its headline, text, link, call to action, images and videos, and the advertiser comes with its Page's likes, category, badge and linked Instagram account. Ads shown in the EU or the UK add the payer, beneficiary, targeting and reach by country, age and gender. Political and social-issue ads add Meta's impression, reach and spend ranges, and a branded content ad names its creator.

GET /v1/facebook/ad

Read the API reference
  • 1 credit per request, $0.75–$1.97 per 1,000 requests
  • 20 typed fields null when unknown
  • url is all it needs, e.g. https://www.facebook.com/ads/library/?id=1448538159982118
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get 20 fields 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
url = https://www.facebook.com/ads/library/?id=1448538159982118
GET /v1/facebook/adTry in
const params = new URLSearchParams({
  url: "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=DE&id=1103375555695370&media_type=all",
});
const res = await fetch(`https://socialtap.dev/v1/facebook/ad?${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, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/facebook/adLong 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 ad's Meta Ad Library link (facebook.com/ads/library/?id=…), the official Ad Library API's ad_snapshot_url (facebook.com/ads/archive/render_ad/?id=…), or its Library 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 Ad API.

  • Enrich search results with an ad's disclosures

  • Audit an ad's EU reach and targeting

  • Track a competitor's creative and where it ran

  • Research political ad audiences

Good to know before you build.

  • 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.
  • Run dates are whole days in US Pacific time, as Meta reports them, so approximate_fields lists them.
  • Payer, beneficiary and audience disclosures exist only for ads shown in the EU or the UK (political and social-issue ads also name their payer), and are null or empty for other ads.
  • Impression, reach and spend ranges exist only for political and social-issue ads, and are null for the rest.
  • country_codes holds only the countries the EU and UK disclosures name, so an ad shown elsewhere too may have run in more (approximate_fields then lists it).
  • languages is always empty and listed in unknown_fields, because the Ad Library doesn't show an ad's language.

1 credit per request. Failed requests are free.

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

SourcePrice per successful requestPer 1,000 requests
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 Ad API.

More in the API reference.

Where do I find an ad's Library ID?
In the ad's Ad Library link (facebook.com/ads/library/?id=…) or under "Library ID" on its card. Every ad the Facebook Ad Library Search API returns carries it as id, and the official Ad Library API's ad_snapshot_url has it too.
Does it return ads that stopped running?
Yes. It returns any ad in Meta's public Ad Library, active or inactive, with is_active and the day it last ran.
How much does the Facebook Ad Library Ad API cost?
A request costs 1 credit. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.

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