Meta Ad Library API
Search Meta’s ad library by keyword or advertiser, read full creatives and video ad transcripts, and add TikTok’s ad library, all from one API key.
Answer in brief
Our pick is PrimaryAPI, the company that runs this site. Its ad APIs search the Meta Ad Library by keyword or advertiser with country, status, media and date filters, and return each ad’s copy, media, call to action, platforms and run dates, with transcripts for video ads. You call them with one API key and no Meta developer app, and you only pay when data comes back.
Run by PrimaryAPIReviewed
curl -X POST "https://api.primaryapi.com/v1/run/ads.library_lookup" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"Nike","platform":"facebook","country":"US"}'{
"output": {
"found": true,
"data": {
"totalResults": null,
"nextCursor": null,
"ads": [
{
"title": "Look de invierno activado",
"pageLikes": 37497718,
"active": true,
"pageDeleted": false, …
}
]
}
},
"credits": 4
}APIs
The APIs to start with
Prices from the PrimaryAPI catalog. You only pay when data comes back.
Why PrimaryAPI
Why PrimaryAPI is our pick.
No ID check or developer app
You call the ad APIs with your PrimaryAPI key. There is no Meta developer account, app or identity confirmation to set up before your first search.
Search by keyword or by advertiser
Search ads by keyword with country, status, media type and date filters, or list everything one advertiser runs by page id or company name. If you only know the brand, the advertiser search finds its page id.
Full creatives, transcripts and TikTok
Read an ad’s full creative, with every carousel card, image and video, get the spoken words of a video ad, and search TikTok’s ad library with the same key. You only pay when data comes back.
How to choose
What to check before you pick.
The checklist we use, true of any option you are weighing.
Which ads you can see
Some ad data covers only political and issue ads, or only ads shown in certain regions. Check that the countries and ad types you study are included before you build on it.
Keyword search and advertiser view
Competitive research needs both: a keyword search to find who advertises on a topic, and an advertiser view to see everything one brand runs.
The full creative
A search result often shows one version of an ad. For creative research you want every card, image, video and headline, plus the landing page.
Run dates and status
Start and end dates and an active flag show how long an ad has run, which many teams read as a sign that the ad is working.
Video ads as text
If you study video ads, a transcript of the spoken words lets you search and compare scripts without watching each ad.
Steps before the first query
Count what stands between you and data: identity checks, developer accounts, app roles and keys. Then compare what each option gives you for that effort.
The full buyer’s guide goes further: How to get Meta Ad Library data with an API.
The official API
The official Meta Ad Library API in dated facts.
Meta’s Ad Library API is the official way to query the Meta Ad Library from code, through the Graph API’s ads_archive endpoint. It covers ads about social issues, elections or politics worldwide and ads of any type delivered to the UK or the EU, and queries need an identity-confirmed user with a role on the app.
Read on from Meta’s published pages. Check the official documentation (opens in a new tab) before you rely on a figure.
The API covers ads “about social issues, elections 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”.
Meta Ad Library API (facebook.com) (opens in a new tab)To get access you confirm your identity at facebook.com/ID, which Meta says “can take a few days”, then create a Meta developer account and an app. Queries go to the ads_archive endpoint.
Meta Ad Library API (facebook.com) (opens in a new tab)Since 2021-04-23, “Users need to have a role or be assigned a role by the app owner to make queries”.
Ad Library API release notes (facebook.com) (opens in a new tab)Since 2025-10-06, searches that combine ad_type=POLITICAL_AND_ISSUE_ADS with EU countries “will no longer be available”.
Ad Library API release notes (facebook.com) (opens in a new tab)Each query must set ad_reached_countries. Search terms are limited to 100 characters, and one query can name up to 10 Page IDs.
Meta Ad Library API (facebook.com) (opens in a new tab)As of November 2026, Meta lists no per-call or subscription fee for the Ad Library API.
Meta Ad Library API (facebook.com) (opens in a new tab)
Resources
Official resources from the platforms.
The platforms’ own documentation, for when you need the primary reference.
What is the Meta Ad Library API?
It is Meta’s official API for searching the Ad Library. It covers political and issue ads worldwide and ads of any type delivered to the UK or the EU, for identity-confirmed developers with a role on an app. To search ads by keyword or advertiser without that setup, our pick is PrimaryAPI, the company that runs this site.
Is the Meta Ad Library API free?
Meta lists no fee for the Ad Library API as of November 2026. You do need to confirm your identity, which Meta says can take a few days, and create a developer account and an app. PrimaryAPI charges credits per call instead, and each API shows its price on its page.
How do I see a competitor’s Facebook ads with an API?
Use PrimaryAPI’s Company Ads API, which lists the ads one advertiser runs by Ad Library page id or company name, with country, status, media and date filters. The Ad Library Lookup takes only the advertiser’s name and returns the first page of its ads.
Which countries does the Meta Ad Library API cover?
For political and issue ads, Meta’s API covers ads delivered anywhere in the world over the past seven years. Other ads are covered when they were delivered to the UK or the EU in the past year. Since 2025-10-06, political and issue ad searches in EU countries are no longer available.
Can I get transcripts of Facebook video ads?
Yes. PrimaryAPI’s Facebook Ad Transcript API returns the spoken words of a Meta Ad Library video ad by ad id or URL, from the ad’s own captions or from an AI transcription for videos up to two minutes long.
Can I search TikTok ads with the same API key?
Yes. The TikTok Ad Library Search API searches TikTok’s public ads library by keyword or advertiser, and the TikTok Ad Library Ad API returns one ad’s brand, text, objective, countries and engagement.
Do I need a Facebook developer account to get Ad Library data?
For Meta’s API, yes: a developer account, an app and a confirmed identity. For PrimaryAPI’s ad APIs, no: you sign up and call them with your PrimaryAPI key.
Try our pick on your own data.
Create a PrimaryAPI account, copy your key and make your first call from the docs. You only pay when data comes back.