Facebook Ad Library API

Every ad running on Facebook and Instagram — with political spend, EU reach and who paid

The Facebook Ad Library API turns facebook.com/ads/library into JSON in five actions.

no credit card1,000 free credits · instant API key · pay by card or crypto
Missing a Facebook Ad Library endpoint, or need a source we don't have yet?Contact us real people · same-day reply.
F
/facebook-ad-library/v1

5 active endpoints, on 1 and 3 credit tiers.

  • POST/facebook-ad-library/v1/search
  • POST/facebook-ad-library/v1/ad
  • POST/facebook-ad-library/v1/variations
  • POST/facebook-ad-library/v1/advertisers
  • POST/facebook-ad-library/v1/advertiser_targeting

What Facebook Ad Library endpoints does ReefAPI ship?

5 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.

5 endpoints

search

3 cr

Search the Ad Library like the site does.

required
—
optional
query, page_id, country, ad_type, active_status, media_type, search_type, platforms, languages, start_date, end_date, sort, cursor

ad

3 cr

One ad by its Ad Library id.

required
ad_archive_id
optional
country

variations

1 cr

Every version of a collated ad (the 'N ads use this creative and text' group).

required
collation_id
optional
country, active_status, cursor

advertisers

1 cr

Find advertisers (Facebook pages) by name, the way the Ad Library search box suggests them.

required
query
optional
country, ad_type

advertiser_targeting

1 cr

How a page targets its political / social-issue ads over the last 7, 30 or 90 days, as the Ad…

required
page_id
optional
days

Every parameter, every allowed value →

Facebook Ad Library API

4 of 5 endpoints, ready to run

View docs ↗

Search the Ad Library by keyword or advertiser, country and filters.

3 credits0 required · 5 optional
POST/facebook-ad-library/v1/search
idle
// Press "Try it" and this pane shows exactly what the
// live site returned this second — including an empty
// result, if that is the truth. No key, no account.

How the Facebook Ad Library API works

Facebook Ad Library is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.

01
Authenticate
x-api-key header

No OAuth app, no request signing, no per-site account. One key covers all 598 engines.

02
Call
POST /facebook-ad-library/v1/…

Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.

03
Pay
1 or 3 credits per call

Credits, not seats. Failed and blocked calls are never charged, and nothing is cached: every call reads the source live.

04
Read
{ ok, data, meta, error }

One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.

See every ad a competitor runs, and what it spends on political ads

Three calls, from a brand name to its ads and one ad's full transparency record.

01advertisers?query=coca%20cola
POSTadvertisers?query=coca%20cola

Pages named Coca-Cola with page id, category, likes and Instagram followers.

02search?page_id=820882001277849&active_status=all
POSTsearch?page_id=820882001277849&active_status=all

Every ad of that page (209 for Coca-Cola's US page), newest versions with text, link and media; next_cursor for more.

03ad?ad_archive_id=2775753672810016
POSTad?ad_archive_id=2775753672810016

One ad: the advertiser page, platforms, dates and, where published, spend, impressions, audience and EU reach.

Which ads a brand runs, where, since when, and the transparency figures Meta publishes for them.

request
curl -X POST https://api.reefapi.com/facebook-ad-library/v1/search \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"query":"nike","country":"US"}'
response envelope
{
  "ok": true,
  "data": { … },
  "meta": {
    "api": "facebook-ad-library",
    "endpoint": "search",
    "mode": "live",
    "latency_ms": …,
    "record_count": …
  },
  "error": null
}

Which number is which

The Ad Library publishes ranges, not exact figures, and an estimated total. Field names as the API returns them, measured 2026-11-03.

fieldwhat it isexample
data.total_count (search)The Ad Library's own estimate of matching ads; stops at 50,001 (total_capped)nike, US, active: 19,413; political ads in Brazil: 15,698
spend / spend_min / spend_maxAmount spent on a political or issue ad, in the ad's currency"$9K - $10K" → 9000 / 10000; "<$100" → 0 / 100
impressions_text / impressions_min / impressions_maxTimes a political or issue ad was shown">1M" → 1000000 / null
reach_estimate / reach_min / reach_maxEstimated audience size"100K - 500K"
collation_countHow many versions share this creative and text (open them with variations)3
details.transparency_by_location.eu_transparency.eu_total_reach (ad)People reached in the EU56,954 and 2,485,157 on two German ads
details.insights.location_data (ad)Share of reach per region, political ads52 to 82 regions per US ad

Totals move by a few between two identical calls a minute apart (19,413 then 19,415) and stop at 50,001 for broad searches. Spend, impressions and reach are published only for political and issue ads; commercial ads carry no spend. On branded content the ad's page is the brand that paid, and creator_page is the creator whose post is promoted.

What the Ad Library publishes — measured 2026-11-03

Meta's Ad Library lists ads running on Facebook, Instagram, Messenger, Threads, WhatsApp and Audience Network, with extra transparency for political and issue ads and for ads shown in the EU. These are the numbers and limits measured on the live site.

Search

Keyword and/or advertiser page, one country or ALL. nike, US, active: 19,413 ads; political ads: Brazil 15,698, India 12,195, United States 50,001 or more. First page up to 30 ads, then 10 per next_cursor page (4 pages measured: 59 different ads, filters kept).

Filters

Ad category, active or inactive, media type, platform, language, delivery date range, exact phrase, sort by newest. Measured on nike, US: video 3,253, image 531, Instagram 9,921, Messenger 2,479, Spanish 457, housing 38; exact phrase "running shoes" 3,525.

Each ad

Library id, advertiser page, active flag, start and end date, platforms, text, title, link, call to action, images, videos, carousel cards, number of versions, and every other field the Ad Library returns for the ad.

Political and issue ads

Spend range in the ad's currency, impressions range, audience size, paid-for-by; one ad adds age and gender split and reach by region (52 to 82 regions on US ads measured); a page's spend and targeting over 7, 30 or 90 days.

EU ads

Targeted EU countries, age range, gender, EU reach and reach by country, age and gender, payer and beneficiary.

Checked against the site

10 ads from 8 searches compared field by field with the Ad Library's own ad page: 131 fields identical.

Speed

Search median 2.1 s, ad 1.9 s, advertisers 0.95 s, variations and targeting about 1 s (55 calls).

Not published

Spend, impressions and audience for commercial ads outside the EU; exact figures (only ranges); totals above 50,001; an oldest-first order; permanent media links (they expire).

What people build with Facebook Ad Library

The jobs this data is most often used for.

5

endpoints

1/3

credits per call

01

Competitor ad monitoring: search with a rival's page_id every day and diff the ad_archive_ids, start and end dates.

02

Creative research: every video ad for a keyword in a country, with text, call to action, landing page and media.

03

Political ad tracking: all political and issue ads of a country with spend, impressions, audience and paid-for-by.

04

EU reach analysis: ad gives EU reach and the country, age and gender breakdown behind an ad.

What Facebook Ad Library data costs

The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.

Full pricing →
$0.67–$1.50 / 1,000 credits
  • 1,000 free credits on signup, no card
  • One key, all 598 APIs, one credit pool
  • Failed and blocked calls are never charged
  • Credits roll over and never expire

Call it in two lines

Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.

curl
curl -X POST https://api.reefapi.com/facebook-ad-library/v1/search \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"query":"nike","country":"US"}'
python
import requests

r = requests.post(
    "https://api.reefapi.com/facebook-ad-library/v1/search",
    headers={"x-api-key": REEF_KEY},
    json={
  "query": "nike",
  "country": "US"
},
)
print(r.json()["data"])
FAQ

Have a question? We got answers.

The questions people actually ask before wiring up Facebook Ad Library.

Get a free key →
Can I get every ad a competitor runs on Facebook and Instagram?▾

Yes. Find the brand's page with advertisers (coca cola returned 15 pages with id, category, likes and Instagram account), then call search with page_id and active_status=all. Coca-Cola's US page returned 209 ads. Page through with next_cursor: the first page has up to 30 ads, each next page 10.

Which filters are there?▾

The Ad Library's own: country (two-letter code or ALL), ad category, active or inactive, media type, platform, language, a delivery date range, exact phrase and sort by newest. Each changes the Ad Library's own count: nike in the US goes from 19,413 active ads to 3,253 videos, 531 image ads, 9,921 on Instagram, 2,479 on Messenger, 457 in Spanish and 38 housing ads.

Does it include political ad spend and who paid for it?▾

Yes, for political and issue ads: each ad carries the spend range in its currency (USD, BRL, INR …), the impressions range, the audience size and the paid-for-by line, plus the same ranges as numbers. ad adds the age and gender split, reach by region and the page's spend by disclaimer. advertiser_targeting gives a page's total spend and targeting: one US page showed $13,026,529 over 30 days across 479 ads.

What do I get for ads shown in the EU?▾

ad returns the EU transparency block: targeted EU countries, age range, gender, EU reach (56,954 and 2,485,157 on two German ads measured) and reach broken down by country, age and gender, plus the payer and beneficiary the advertiser declared.

Does the date range filter by when the ad started?▾

No, it filters by when the ad was running. A window of 1 to 15 October 2026 returned ads that started in 2024 and were still running then; every one of the 30 rows overlapped the window.

Are the image and video links permanent?▾

No. The Ad Library's media links are signed and expire after some days, so download the image or video when you collect the ad if you need to keep it.

Which sort orders are there?▾

Relevance (the site's default) and newest. For political and issue ads you can also ask for the fewest impressions first; their default order is already most impressions first. Commercial ads publish no impressions, so that order does not change them.

How fast is it?▾

Measured on 55 calls on 2026-11-03: search median 2.1 s (slowest 10.1 s), next pages 2.1 s, ad 1.9 s, advertisers 0.95 s, variations and advertiser_targeting about 1 s.

What is the Facebook Ad Library API?▾

Facebook Ad Library API is a ReefAPI endpoint group for every ad running on facebook, instagram, messenger, threads, whatsapp and audience network: search by keyword or advertiser, country, ad category, status, media, platform, language and dates; each ad's text, link, images, videos and versions; political ads with spend, impressions, audience and paid-for-by; eu reach; advertiser search and targeting. It returns live JSON through POST requests under /facebook-ad-library/v1.

Is the Facebook Ad Library API free to try?▾

Yes. ReefAPI starts with 1,000 free credits, no card required. Facebook Ad Library calls use the same shared credit balance as every other ReefAPI engine.

Do I need a Facebook Ad Library login or account?▾

No login to Facebook Ad Library is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.

How fresh is the Facebook Ad Library data?▾

The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.

How many credits does the Facebook Ad Library API use?▾

Facebook Ad Library actions currently cost 1-3 credits per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.

Can I call Facebook Ad Library from an AI assistant or MCP client?▾

Yes. Connect ReefAPI once through MCP and your assistant can call facebook-ad-library actions with the same key, credit pool and JSON envelope used by normal REST requests.

14 Social Media APIs on the same key

One key, one credit pool, one response envelope. If you are pulling Facebook Ad Library, you are one call away from the rest of the category — no second contract, no second integration.

Already paying for something else?Facebook Ad Library vs Apify

Need something this API does not do?

Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.

0/4000

No account needed · we reply from [email protected]

Try it on your own data before you pay anything

The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 597 APIs, and the same envelope everywhere.

Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-11-03.