Blog

The Facebook Ad Library API in 2026: what Meta's official one covers, and how to get the rest

Kevin Wang
Kevin Wang
Founder, AnyAPI · November 3, 2026
facebookmetaadsapicomparison
The Facebook Ad Library API in 2026: what Meta's official one covers, and how to get the rest
Key findings
  • Meta's official Ad Library API only returns ordinary ads that reached the UK or EU. It's free, but you confirm your identity first, and outside Europe it returns only ads about social issues, elections or politics.
  • For a US brand's commercial ads, you need a third-party API. AnyAPI returned the running US ads of seven chains that only operate in the US, from Raising Cane's to Wawa, in about 3 seconds a call.
  • For keyword research across all advertisers, pay per search. Every US keyword search I ran came back with ads, up to 30 a call, in about 2 seconds.
  • For a big one-off export into a spreadsheet, an Apify actor is simpler. Apify's Facebook Ads Library Scraper bills per ad and writes to a dataset you download as CSV.

Built on AnyAPI

470 scraping and data APIs behind one key.

Every endpoint in this post is one call away. Pay per request in USD from a prepaid wallet, with automatic failover when a provider breaks. No subscription, no card to start.

Get ~160 free requests$0.10 of credit on signup.

Your competitor launched a new offer last week, and you want every ad they're running on Facebook and Instagram: the copy, the creative, the landing page, and when each one started. Meta's Ad Library website shows you all of it. Getting the same thing from code is a different story.

Meta does have an official API for its ad library. I read its docs and FAQ on October 3, 2026, then tried AnyAPI's Facebook and TikTok ad library endpoints on 20 keywords and 20 advertisers the same day. The other options are priced from their own pages.

Here's what each one is for.

The best Facebook Ad Library APIs

What makes a good Facebook Ad Library API?

I'm assuming you're building competitor research into a product or a workflow: an alert when a rival starts a new ad, a weekly swipe file of ads in your niche, or a dashboard of what a list of brands is running. Here's what I compared.

  • Which ads it can return. An API that skips ordinary ads in your market can't do competitor research there, however free it is.
  • How you get in. An identity check and an app review are fine for a research team and slow for a weekend project.
  • Search by keyword and by advertiser. You want both: keywords to find who's advertising, a page to follow one brand.
  • Price at your volume. Prices below are for 10,000 searches a month, about 14 an hour, or the vendor's closest unit.
How this was tested, and its limits
  • AnyAPI: I searched 20 keywords, from "protein powder" to "pickleball", in the US, and asked for the US ads of 20 advertisers by name: ten that only operate in the US and ten global brands. I sent the same names to TikTok's ad library too. That's 70 calls, one at a time, on 2026-10-03.
  • I only read the first page of each search and didn't check ads one by one against Meta's website. The speeds come from a small run, so treat them as rough.
  • Meta's official API wasn't called, because it needs an identity check first. Its section is from Meta's API page, reference, and FAQ, read on 2026-10-03.
  • ScrapeCreators, SearchApi, and Apify weren't run. Their sections are from their own pages on 2026-10-03.

The best Facebook Ad Library APIs at a glance

ToolBest forWhy pick itPricing at 10,000 searches a month
Meta Ad Library APIPolitical ads and ads shown in EuropeMeta's own data, with spend and impression ranges for political adsFree, after an identity check
AnyAPICommercial ads in any countryKeyword search and advertiser ads on one key, plus TikTok's library$11.00 ($1.10 per 1,000 searches)
ScrapeCreatorsPrepaid credits across social platformsSearch, company ads, ad details, and transcripts at 1 credit each$47 Freelance pack (25,000 credits, never expire)
SearchApiA monthly plan that also covers search enginesMeta, TikTok, LinkedIn, and Google ad libraries on one plan$40 a month Developer plan (10,000 searches)
Apify Facebook Ads Library ScraperBulk exports into a datasetRuns on Apify, writes JSON or CSV, billed per ad$5.80 per 1,000 ads on the Free plan, $3.40 on Business

Best Facebook Ad Library API for political ads and ads shown in Europe

Meta Ad Library API

Meta's Ad Library API page: The Ad Library API helps you perform customized searches of the Ad Library for ads about social issues, election or politics that were delivered anywhere in the world during the past 7 years, and ads of any type that were delivered to the United Kingdom (UK) or European Union during the past year. To search for all ads currently running across Meta technologies, please use the Ad Library. Step 1: Confirm your identity and location at Facebook.com/ID
Meta's Ad Library API page on October 3, 2026: political ads anywhere, but ads of any type only if they reached the UK or EU.

Meta Ad Library API pros:

  • Free, and it's Meta's own data
  • Political and issue ads from anywhere in the world, going back 7 years, with spend, impressions, and audience breakdowns
  • Ads shown in the UK and EU come with estimated reach, targeting, and, for the EU, who paid

Meta Ad Library API cons:

  • Ordinary ads only if they reached the UK or EU
  • You confirm your identity and location before you get a token, which Meta says can take a few days
  • Spend and impressions only for political and issue ads

Meta's Ad Library API page is clear about what's in it: "Ads about social issues, election or politics that were delivered anywhere in the world during the past 7 years" and "Ads of any type that were delivered to the United Kingdom (UK) or European Union during the past year". For everything else, it points you to the Ad Library website.

A US brand's ordinary ads aren't in it. The reference for the ads_archive endpoint says it again under the required ad_reached_countries parameter: "Ads that did not reach any location in the EU will only return if they are about social issues, elections or politics." So if you're tracking a competitor that only advertises in the US, Canada, or Australia, the official API returns nothing for their product ads.

Getting a token takes three steps. You confirm your identity and location at Facebook.com/ID, the same check Meta runs on political advertisers, then create a Meta for Developers account and an app. In the US, Meta's checklist for that check asks for a US passport, driver's license, or state ID, a US residential mailing address, and two-factor authentication.

Once you're in, it's a capable API. You can search by keyword or by up to 10 Page IDs at once, filter by platform, language, and delivery dates, and get up to 5,000 ads a page, per Meta's FAQ. For political ads you also get spend and impressions as ranges, plus the audience's age, gender, and region. If you're a journalist or researcher studying elections or EU advertising, start here: it's free, and it carries fields no third-party API has.

Meta Ad Library API pricing: free. Requires a Facebook account, identity and location confirmation, and a Meta for Developers app. Sources: Ad Library API page and ads_archive reference, read October 3, 2026.

Best Facebook Ad Library API for commercial ads in any country

AnyAPI

Bar chart of active ads in the Meta Ad Library that reached the US for seven US-only chains on October 3, 2026, as reported by one facebook.company_ads call per chain: Raising Cane's 1,279; Dutch Bros Coffee 860; Whataburger 670; Culver's 191; Sheetz 169; Wawa 163; Publix 84
Running US ads for seven chains that only operate in the US, October 3, 2026. None of these ordinary ads can come back from Meta's official API unless they also reached the UK or EU.

AnyAPI pros:

  • Ordinary ads from any country, including the US, with no identity check
  • Keyword search and an advertiser's ads on one key, up to 30 ads a call, billed per call from a prepaid wallet
  • Every ad came back with its advertiser, run dates, and platforms, and most with copy, call to action, landing page, and images or video
  • TikTok's ad library on the same key

AnyAPI cons:

  • No spend or reach figures, which Meta doesn't publish for ordinary ads outside Europe
  • You poll for new ads; nothing is pushed to you

AnyAPI is the pick when the ads you need are ordinary ads outside Europe. You send an advertiser's name to facebook.company_ads, limit it to a country if you like, and get their running ads with a cursor for the next 30.

curl -sS -X POST 'https://api.getanyapi.com/v1/run/facebook.company_ads' \
  -H "Authorization: Bearer $ANYAPI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"companyName":"Wawa","country":"US"}'

Here's the first of the 30 ads it returned on 2026-10-03 for Wawa, a convenience store chain that only operates in the US, trimmed, with the rest of the envelope:

{
  "output": {
    "found": true,
    "data": {
      "totalResults": 163,
      "nextCursor": "cur_Ke44lYWkCLzEzkNsllceeQ",
      "ads": [
        {
          "id": "2233641634138711",
          "pageId": "69906173480",
          "pageName": "Wawa",
          "active": true,
          "startDate": 1785135600,
          "endDate": 1791010800,
          "title": "Visit Wawa Today",
          "text": "For the afternoon pick-me-up",
          "ctaText": "Order now",
          "caption": "wawa.com",
          "displayFormat": "DCO",
          "platforms": ["FACEBOOK", "INSTAGRAM"]
        }
      ]
    }
  },
  "costUsd": 0.0012,
  "items": 30
}

On October 3, every call came back with a 200, no call cost more than $0.0012 at that day's prices, and the whole test cost $0.065.

EndpointCalls on 2026-10-03What came backTypical time
facebook.ads_search20 keywords, limited to the USAds for every keyword, up to 30 a call2.0 s
facebook.company_ads20 advertisers by name, limited to the USThe advertiser's own running ads for 17 of the 20 names, with the library's total for each3.2 s
tiktok.ad_library_search20 names as keywords, 10 by advertiserAds for most calls; searched by advertiser name, 6 of the 10 global brands came back with only their own ads1.9 s

You get the ordinary US ads the official API leaves out. Seven of the ten US-only chains, Wawa, Sheetz, Publix, Whataburger, Raising Cane's, Dutch Bros, and Culver's, came back with their own Page and their running US ads. Raising Cane's alone had 1,279 running US ads that day.

For keyword research, facebook.ads_search takes a phrase and a country and returns ads from every advertiser that matches. "Online therapy" in the US brought back BetterHelp, Grow Therapy, Rula, and Midi Health on the first page. Broad words pull in some unrelated advertisers, so set searchType to keyword_exact_phrase when you want the phrase as written.

Company names match the library's own index exactly, so a brand that advertises under a different Page name may not come back. When you know the Page, its ID is the sure way in, and the ads you get carry it for next time.

TikTok has the same limit as Meta, only stricter. Its Commercial Content API includes ads from EU countries only, and you apply for access.

TikTok for Developers' Commercial Content API page, step 03: You should hear back from us within 2 working days of submitting your complete application. Below it: Please be aware that in this phase we are ONLY including data from EU countries, while a researcher/professional who is requesting it can be located in any country
TikTok's Commercial Content API on October 3, 2026: EU ads only, by application.

tiktok.ad_library_search searches that same European library without the application. Search by advertiser name rather than keyword: by name, Spotify, Airbnb, Canva, Duolingo, HelloFresh, and Notion each came back with only their own ads, filed under their European companies, such as SPOTIFY FRANCE SAS. None of the ten US-only chains had an ad of their own there, which is what an EU library should show.

AnyAPI pricing: $1.10 per 1,000 calls for keyword search, with up to 30 ads a call, $1.10 per 1,000 for an advertiser's ads, and $0.80 per 1,000 for TikTok. A keyword search the cheapest source can't answer goes to a backup that costs up to $18.00 per 1,000. Prepaid, no plan; new accounts get free credit, no card required.

Best Facebook Ad Library API for prepaid credits across social platforms

ScrapeCreators

ScrapeCreators pricing: Free $0 with 100 credits and up to 7,000 bonus credits to claim; Freelance $47 pay as you go for 25,000 credits, $1.88 per 1k requests; Business $497 for 500,000 credits, $0.99 per 1k requests; Enterprise custom for 1M+ credits. Every plan includes every API, including Facebook
ScrapeCreators' credit packs on October 3, 2026: $47 for 25,000 credits, and an ad library search is 1 credit.

ScrapeCreators pros:

  • Seven Facebook Ad Library endpoints, including ad details, a company search that finds Page IDs, and video ad transcripts
  • 100 free credits, no card, and credits never expire
  • One key for its TikTok, Google, and LinkedIn ad libraries too

ScrapeCreators cons:

  • Prepaid packs: the first paid one is $47
  • One country per search, or all of them

ScrapeCreators sells search, company ads, ad details, and a company search at 1 credit a request. You send a GET with an x-api-key header and get Meta's own ad objects back, with fields like display_format and current_page_name. Its transcript endpoint charges only when a transcript comes back.

The company search is handy if you don't know a brand's Page ID: you search by name, pick the Page, then pull its ads. If you already use ScrapeCreators for other platforms, the ad libraries come with the key. At 10,000 searches a month, the $47 pack lasts two and a half months.

ScrapeCreators pricing: 100 free credits. Freelance is $47 for 25,000 credits ($1.88 per 1,000 requests) and Business $497 for 500,000 ($0.99 per 1,000). Ad library search and company ads are 1 credit each. Sources: scrapecreators.com and docs, October 3, 2026.

Best Facebook Ad Library API for a monthly plan that also covers search engines

SearchApi

SearchApi pricing plans, pay per success: Developer Plan $4 per 1,000 searches, $40 a month for 10,000 searches; Production Plan $3 per 1,000, $100 a month for 35,000; BigData Plan $2.5 per 1,000, $250 a month for 100,000; Scale Plan $2 per 1,000, $500 a month for 250,000
SearchApi's monthly plans on October 3, 2026: $40 for 10,000 searches, charged only on success.

SearchApi pros:

  • A Meta Ad Library engine with keyword, Page, and location search, plus Page search and ad details
  • Advertiser transparency details when you search by Page, such as admin countries and name changes
  • The same plan covers Google, Bing, and the TikTok, LinkedIn, and Reddit ad libraries

SearchApi cons:

  • A monthly subscription, from $40
  • Only 20% of a plan's searches can be used in any hour

SearchApi is a search engine API that added ad libraries. You call one endpoint with engine=meta_ad_library and a keyword or page_id, and you get the ads plus, for a Page, details like its admin countries and name history. Its docs list country, language, platform, media, and date filters.

It suits a team that already pulls Google results and wants ad research on the same bill. If ad libraries are all you need, a monthly plan you might not use up is the main cost.

SearchApi pricing: 100 free requests. Developer is $40 a month for 10,000 searches, Production $100 for 35,000, BigData $250 for 100,000, and Scale $500 for 250,000. Failed requests aren't charged. Source: SearchApi pricing, October 3, 2026.

Best Facebook Ad Library API for bulk exports into a dataset

Apify Facebook Ads Library Scraper

The Apify Store pricing tab for Facebook Ads Library Scraper by Apify: Free plan up to 862 ads for $0 a month; Starter $5.00 per 1,000 ads at $19 a month; Scale $4.20 per 1,000 at $199 a month; Business $3.40 per 1,000 at $999 a month. Per ad: $5.80 per 1,000 on Free. 40K total users, 7K monthly active users, rating 4.0 from 59 reviews
The actor's Apify Store pricing on October 3, 2026: $5.80 per 1,000 ads on Apify's Free plan, down to $3.40 on Business.

Apify Facebook Ads Library Scraper pros:

  • Maintained by Apify, with about 50,000 total users and 11,000 a month
  • Runs on a schedule and writes to a dataset you export as JSON, CSV, or Excel
  • Advertiser details from the library's About page, and an add-on that fetches the products and prices behind each ad

Apify Facebook Ads Library Scraper cons:

  • Billed per ad, so a broad keyword gets expensive fast
  • A run is a batch job, so your code waits for it to finish

Apify's Facebook Ads Library Scraper takes Facebook Page URLs or Ad Library search URLs and writes every ad it finds to a dataset. You can filter by country, language, media type, status, and date before the run, so you only pay for the ads you want.

It suits a one-off pull of a few thousand ads into a spreadsheet, or a nightly export into a warehouse. For a check every few minutes from your app, a per-call API is simpler. If price per ad matters most, Curious Coder's Facebook Ad Library Scraper on the same store charges $0.75 per 1,000 ads.

Apify Facebook Ads Library Scraper pricing: $5.80 per 1,000 ads on Apify's Free plan, $5.00 on Starter ($19 a month), $4.20 on Scale ($199), and $3.40 on Business ($999). The free plan's $5 a month covers about 862 ads. Source: Apify Store, October 3, 2026.

Which Facebook Ad Library API should you use?

  • You study political ads, or ads shown in the UK and EU, and can wait for an identity check: Meta's Ad Library API.
  • You need ordinary ads from the US or anywhere else, from code, paid per call: AnyAPI.
  • You want a company search to find Page IDs, or video ad transcripts, on prepaid credits: ScrapeCreators.
  • You already pay for search results and want ad libraries on the same plan: SearchApi.
  • You want a one-off or nightly export of thousands of ads into a spreadsheet: Apify's Facebook Ads Library Scraper.

Whichever you pick, follow a brand by its Page ID once you have it, and search by advertiser name on TikTok. The Facebook API page lists all of AnyAPI's Facebook endpoints, including single ad details, and the Google Ads Transparency endpoints cover the same competitors' search ads.

Frequently asked questions

Is the Facebook Ad Library API free?
Yes. Meta doesn't charge for it. You need a Facebook account, a confirmed identity and location through Facebook.com/ID, a Meta for Developers account, and an app. Meta says the identity check can take a few days.
Can the Meta Ad Library API return US commercial ads?
Only if the ad also reached the UK or the EU. Meta's API page says it covers ads about social issues, elections or politics anywhere in the world for the past 7 years, and ads of any type delivered to the UK or EU for the past year. Its reference adds that ads that didn't reach any EU location only come back if they're about social issues, elections or politics.
Does the Ad Library API show how much an advertiser spent?
Only for ads about social issues, elections or politics, as a range such as 1K-5K, along with impressions and the audience's age, gender and location. Ads delivered to the UK and EU get estimated impressions, reach and targeting instead. Ordinary ads elsewhere carry no spend at all.
Is there a TikTok ad library API?
Yes. TikTok's Commercial Content API is open to approved applicants, and TikTok says it answers applications within 2 working days. It currently includes ads from EU countries only, though the person asking can be anywhere.

A brand's running Facebook and Instagram ads as clean JSON, $0.0011 for 30 ads, no plan and nothing that expires. New accounts get free credit, no card required.

Try the Facebook Company Ads API

Use data responsibly and follow AnyAPI's Acceptable Use Policy.