Meta Ad Library API for Facebook and Instagram ads
Search every ad in the Meta Ad Library by keyword or advertiser, then pull an ad’s creative, reach and targeting or an advertiser’s owner and political spend, all as JSON.
import { Bridgly } from "@bridgly/sdk";const client = new Bridgly({ apiKey: "bgly_YOUR_KEY" });const res = await client.metaAds.search({ q: "running shoes", country: "US", count: 10});if (res.type === "success") { console.log(res.data);}npm install @bridgly/sdk
All 4 Meta Ad Library endpoints
Ad search covers every ad in the Meta Ad Library, not only political ones. Search by keyword or exact phrase, or list one advertiser’s ads by Page ID, and filter by country, active status, ad category, media type, platform, language and dates. Each ad comes with its text, headline, images, videos, carousel cards, link, call to action, run dates, platforms and advertiser page, and results page with a cursor.
Ad details adds what the Ad Library shows when you open one ad: the advertiser’s page and Instagram account, who paid for the ad and who it benefits, and, for ads shown in the EU, the UK or Brazil, its targeting and the people it reached by country, age and gender. Ads about social issues, elections or politics also carry spend, impressions and the share of their audience by age, gender and region.
Advertiser search finds a brand’s pages by name and returns the Page IDs the other endpoints take. Advertiser details returns the page, its About text and ad count, the organization Meta confirmed owns it, its name history, the countries its managers are in, and for political advertisers their spend and targeting over the last 30 days.
Meta Ad Library API
POST/meta-ads/searchMeta Ad Library API: search ads running on Facebook and Instagram by keyword, advertiser, country, status and media type, as structured JSON.1 credit per resultDetails →
Request body
qstring- Keywords to search the ads’ text for, e.g. "running shoes". Leave it out to list every ad matching the other filters.
pageIdstring- Only return ads from this advertiser: its Facebook Page ID, e.g. "15087023444", as returned in `page.id` or by the advertiser search. The Ad Library link of the advertiser’s ads (`?view_all_page_id=<id>`) works too.
exactPhraseboolean · default false- Match `q` as an exact phrase instead of matching any ad that has all its words. Defaults to false.
countrystring · default ALL- Two-letter country code to search ads shown in, e.g. "US" or "GB", or "ALL" for every country. Defaults to "ALL".
activeStatusenum · default active- Return ads that are still running ("active"), that stopped ("inactive"), or both ("all"). Defaults to "active".
- active | inactive | all
adTypeenum · default all- Ad category: "all", "political_and_issue_ads" (social issues, elections or politics), "housing_ads", "employment_ads" or "credit_ads". Defaults to "all".
- all | political_and_issue_ads | housing_ads | employment_ads | credit_ads
mediaTypeenum · default all- Media in the ad: "all", "image", "meme", "image_and_meme", "video", or "none" for ads with no image or video. Defaults to "all".
- all | image | meme | image_and_meme | video | none
platformsenum[]- Only return ads running on these platforms, e.g. ["instagram"]. Leave it out for every platform.
languagesstring[]- Only return ads in these languages, as two-letter codes, e.g. ["en", "es"].
startDatestring- Only return ads that ran on or after this date (YYYY-MM-DD), e.g. "2026-01-01".
endDatestring- Only return ads that ran on or before this date (YYYY-MM-DD), e.g. "2026-03-31".
sortByenum · default impressions- Order of the ads: most seen first ("impressions"), or recently started ads first ("recent"), which Meta orders roughly rather than strictly by start date. Defaults to "impressions".
- impressions | recent
countinteger · 1–30 · default 10- Number of results to return (1–30). Defaults to 10.
cursorstring- The previous response's `nextCursor`, to fetch the next page. Omit it for the first page.
cacheMaxAgeHoursinteger- Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.
cacheOnlyboolean- Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
Response
{ "timeMs": 1840, "creditsCost": 1, "cachedAt": "2026-01-15T09:30:00.000Z", "data": { "nextCursor": "string", "ads": [ { "id": "string", "url": "string", "isActive": true, "startDate": "string", "endDate": "string", "page": { "id": "string", "name": "string", "url": "string", "profilePictureUrl": "string", "likes": 0, "categories": [ "string" ], "isDeleted": true }, "partnerPage": { "id": "string", "name": "string", "url": "string" }, "paidForBy": "string", "displayFormat": "string", "title": "string", "body": "string", "caption": "string", "linkUrl": "string", "linkDescription": "string", "ctaText": "string", "ctaType": "string", "images": [ "string" ], "videos": [ { "hdUrl": "string", "sdUrl": "string", "previewImageUrl": "string" } ], "cards": [ { "title": "string", "body": "string", "caption": "string", "linkUrl": "string", "linkDescription": "string", "ctaText": "string", "ctaType": "string", "imageUrl": "string", "video": { "hdUrl": "string", "sdUrl": "string", "previewImageUrl": "string" } } ], "textVariations": [ "string" ], "linkVariations": [ "string" ], "platforms": [ "string" ], "categories": [ "string" ], "collationId": "string", "collationCount": 0, "targetedCountries": [ "string" ], "impressions": "string", "spend": "string", "currency": "string", "reachEstimate": "string", "disclaimer": { "verification": "string", "submittedOn": "string", "phone": "string", "email": "string", "website": "string", "address": "string" }, "stateMediaLabel": "string", "containsDigitallyCreatedMedia": true } ] }}Meta Ad Details API
POST/meta-ads/get-ad-detailsMeta Ad Library details API: get one Facebook or Instagram ad by its Library ID, with creative, run dates, payer, reach and audience demographics.1 credit per requestDetails →
Request body
adIdstringrequired- Ad Library ID of the ad, or its Ad Library link, e.g. "1806650610330561" or "https://www.facebook.com/ads/library/?id=1806650610330561".
cacheMaxAgeHoursinteger- Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.
cacheOnlyboolean- Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
Response
{ "timeMs": 1840, "creditsCost": 1, "cachedAt": "2026-01-15T09:30:00.000Z", "data": { "id": "string", "url": "string", "isActive": true, "startDate": "string", "endDate": "string", "page": { "id": "string", "name": "string", "url": "string", "profilePictureUrl": "string", "likes": 0, "categories": [ "string" ], "isDeleted": true }, "partnerPage": { "id": "string", "name": "string", "url": "string" }, "paidForBy": "string", "displayFormat": "string", "title": "string", "body": "string", "caption": "string", "linkUrl": "string", "linkDescription": "string", "ctaText": "string", "ctaType": "string", "images": [ "string" ], "videos": [ { "hdUrl": "string", "sdUrl": "string", "previewImageUrl": "string" } ], "cards": [ { "title": "string", "body": "string", "caption": "string", "linkUrl": "string", "linkDescription": "string", "ctaText": "string", "ctaType": "string", "imageUrl": "string", "video": { "hdUrl": "string", "sdUrl": "string", "previewImageUrl": "string" } } ], "textVariations": [ "string" ], "linkVariations": [ "string" ], "platforms": [ "string" ], "categories": [ "string" ], "collationId": "string", "collationCount": 0, "targetedCountries": [ "string" ], "impressions": "string", "spend": "string", "currency": "string", "reachEstimate": "string", "disclaimer": { "verification": "string", "submittedOn": "string", "phone": "string", "email": "string", "website": "string", "address": "string" }, "stateMediaLabel": "string", "containsDigitallyCreatedMedia": true, "advertiser": { "id": "string", "name": "string", "username": "string", "url": "string", "profilePictureUrl": "string", "likes": 0, "category": "string", "isVerified": true, "instagramUsername": "string", "instagramFollowers": 0, "instagramVerified": true, "isDeleted": true }, "payer": { "name": "string", "website": "string", "location": "string" }, "beneficiary": { "name": "string", "website": "string", "location": "string" }, "targeting": { "locations": [ { "name": "string", "type": "string", "excluded": true } ], "gender": "string", "ageMin": 0, "ageMax": 0 }, "totalReach": 0, "reachBreakdown": [ { "country": "string", "ageRange": "string", "gender": "string", "reach": 0 } ], "audience": { "country": "string", "byAgeAndGender": [ { "ageRange": "string", "gender": "string", "share": 0 } ], "byRegion": [ { "region": "string", "share": 0 } ] } }}Meta Ad Library Advertiser Search API
POST/meta-ads/search-companiesFind advertisers in the Meta Ad Library by brand name and get their Page ID, category, likes, verification and Instagram account as JSON.1 credit per requestDetails →
Request body
qstringrequired- Name of the brand or advertiser to look for, e.g. "nike".
countrystring · default ALL- Two-letter country code to favor advertisers from, e.g. "US", or "ALL". Defaults to "ALL".
cacheMaxAgeHoursinteger- Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.
cacheOnlyboolean- Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
Response
{ "timeMs": 1840, "creditsCost": 1, "cachedAt": "2026-01-15T09:30:00.000Z", "data": { "companies": [ { "id": "string", "name": "string", "username": "string", "profilePictureUrl": "string", "likes": 0, "category": "string", "isVerified": true, "instagramUsername": "string", "instagramFollowers": 0, "instagramVerified": true, "isDeleted": true, "country": "string" } ] }}Meta Ad Library Advertiser API
POST/meta-ads/get-companyGet a Meta Ad Library advertiser by Page ID: page, Instagram account, ad count, confirmed owner, page history and political ad spend as JSON.1 credit per requestDetails →
Request body
pageIdstringrequired- Facebook Page ID of the advertiser, e.g. "15087023444", as returned in `page.id` or by the advertiser search. The Ad Library link of the advertiser’s ads (`?view_all_page_id=<id>`) works too.
cacheMaxAgeHoursinteger- Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.
cacheOnlyboolean- Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
Response
{ "timeMs": 1840, "creditsCost": 1, "cachedAt": "2026-01-15T09:30:00.000Z", "data": { "id": "string", "name": "string", "username": "string", "url": "string", "profilePictureUrl": "string", "likes": 0, "category": "string", "isVerified": true, "instagramUsername": "string", "instagramFollowers": 0, "instagramVerified": true, "isDeleted": true, "about": "string", "adCount": 0, "owner": { "name": "string", "phone": "string", "city": "string", "state": "string", "postalCode": "string", "country": "string" }, "history": [ { "type": "string", "date": "string" } ], "adminCountries": [ { "country": "string", "count": 0 } ], "politicalAds": { "periodEnd": "string", "adCount": 0, "totalSpend": "string", "currency": "string", "targeting": [ { "dimension": "string", "value": "string", "type": "string", "excluded": true, "adCount": 0, "spendShare": 0 } ] } }}Why not the official Meta Ad Library API?
Meta’s own Ad Library API returns ads about social issues, elections or politics, plus ads shown in the EU, and only after you confirm your identity and set up a Meta developer app.
Every ad, not only political ones
Search commercial ads in any country, with the same filters as the Ad Library website.
The creative itself
Get the ad’s text, image and video files, carousel cards, link and call to action, instead of a link to a snapshot page.
No identity check or app review
There is no ID confirmation, developer app or access token to manage. One Bridgly key covers Meta ads and every other platform.
Your first Meta Ad Library call
curl -X POST "https://api.bridgly.app/meta-ads/search" \ -H "Authorization: Bearer $BRIDGLY_KEY" \ -H "Content-Type: application/json" \ -d '{ "q": "running shoes", "country": "US", "count": 10}'With Bridgly connected to your AI agent, ask:
Find the Meta ads currently running in the US for "running shoes" and summarize the most common offers and calls to action.
What people build with Meta Ad Library data
Watch competitors’ ads
Find a competitor’s Page ID with the advertiser search, then list the ads it is running right now and see when each started.
Collect creative inspiration
Search a product category, sort by impressions, and pull the copy, images and videos of the ads that run longest.
Research political advertising
Get spend, impressions, audience shares and paid-for-by disclaimers for ads about social issues, elections or politics.
Vet an advertiser
See the organization behind a page, when it was created or renamed, and which countries it is managed from.
What the Meta Ad Library API does not do
- Ad search returns up to 30 ads per call; page through the rest with the cursor.
- Advertiser search returns up to 15 advertisers per name and is not paginated.
- Spend, impressions and audience shares are published only for ads about social issues, elections or politics.
- Targeting and reach by country, age and gender are published only for ads shown in the EU, the UK or Brazil.
- Sorting by "recent" puts recently started ads first, but Meta does not order them strictly by start date.
Meta Ad Library API questions
Does it cover ads that are not political?
Yes. Ad search covers every ad in the Meta Ad Library, from any advertiser and country. Spend and impressions are only published for ads about social issues, elections or politics.
How do I see all the ads of one company?
Search the brand’s name with the advertiser search to get its Page ID, then send that Page ID to ad search. Set activeStatus to "all" to include ads that stopped running.
Do I get the images and videos of each ad?
Yes. Each ad includes its image and video file links, with the cards of carousel and catalog ads, alongside the text, link and call to action.
Do I need a Meta developer account?
No. You authenticate with your Bridgly API key only. There is no identity confirmation, developer app or access token to set up.
How much does it cost?
Ad search costs one credit per ad returned. Ad details, advertiser search and advertiser details cost one credit per call. What a credit costs in dollars depends on your pricing package, and goes as low as $1.67 per 1,000 credits at volume.
Try it with a free tool
Look up a public example in your browser before connecting the API. No account needed.
Your API key and credits work on every platform. See all platforms.
Start pulling Meta Ad Library data
100 free credits on business email, no card. Your first call takes a minute.