Facebook Ad Library API

Meta (Facebook) Ad Library API

The Meta Ad Library API from Captapi is a Facebook Ad Library scraper behind one API key: search commercial and political ads, list a page's ads, and get creatives and run dates as JSON. No Meta developer app or access token.

Just want to look up a brand's ads? Use the free Facebook Ad Library search →

5
Endpoints
REST
Protocol
JSON
Response
curl "https://api.captapi.com/v1/ad-library/facebook/company-ads?url=15087023444" \
  -H "Authorization: Bearer capt_live_..."
TL;DR
The Facebook Ad Library API returns public Facebook Ad Library data as clean, structured JSON — 5 REST endpoints behind one Bearer key. No OAuth, no scrapers to maintain. Pass cache=true for a free 24h cache hit; by default every call is fresh. Start with 100 free credits — no credit card.

What is the Facebook Ad Library API?

Search Meta Ad Library creatives, advertisers, and company ads for competitor research. Every endpoint is a single authenticated GET request that responds with predictable JSON, so the data drops straight into dashboards, AI pipelines, RAG systems, and no-code automations. AI agents can call the same endpoints as MCP tools via @captapi/mcp.

Official Meta Ad Library API vs. this API

Meta's own Ad Library API (the ads_archive Graph API endpoint) and the Captapi endpoints answer different questions. The official side below is quoted from Meta's documentation.

Official Meta Ad Library APICaptapi Meta Ad Library API
Which ads“Ads that did not reach any location in the EU will only return if they are about social issues, elections or politics.”Commercial and political ads by keyword or advertiser (ad_type=all by default; political_and_issue_ads narrows it).
AccessGraph API call with an access_token.One Captapi API key as a Bearer header.
Spend and impressionsspend and impressions are “Available only for POLITICAL_AND_ISSUE_ADS”.Passed through when Meta publishes them (spend, impressions, spendRange, impressionsRange); null for commercial ads.
FiltersSee Meta's ads_archive parameters.status (ACTIVE / INACTIVE / ALL), media_type, platforms (FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK, THREADS), start_date / end_date, cursor paging.

Sources: Meta Ads Archive reference, Graph API v26.0 (read 2026-10-30) · Meta Archived Ad reference, v26.0 (read 2026-10-30)

Find a brand's ads in two calls

Look up the advertiser's Ad Library page id, then list that page's ads. Responses below were captured live on 2026-10-30 and trimmed to the fields discussed on this page.

1. Find the advertiser's pageId (2 credits)

curl "https://api.captapi.com/v1/ad-library/facebook/search-companies?q=nike&country=US&limit=5" \
  -H "Authorization: Bearer capt_live_..."

2. List that page's active ads (2 credits) — pass pageId, not profileId

curl "https://api.captapi.com/v1/ad-library/facebook/company-ads?url=15087023444&country=US&limit=10" \
  -H "Authorization: Bearer capt_live_..."

Ads list trimmed to 2 for the page. spend and impressions are null because these are commercial ads; searchResultsCount vs. retrievableCount and nextCursor show how far one call reaches.

Endpoints

What you can do with the Facebook Ad Library API

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Call any endpoint above with Authorization: Bearer capt_live_... and parse the JSON response. Pass cache=true to reuse a prior response from the 24h cache at no cost.

What each ad returns

  • id, url (the Ad Library permalink), text, headline, cta and landingUrl
  • adFormat, firstShown / lastShown (YYYY-MM-DD) and isActive
  • advertiser { id, name, url, logo } and the placements in publisherPlatforms
  • media, plus typed images / videos where Meta serves them
  • spend / impressions and the structured spendRange / impressionsRange — only where Meta publishes them (political and issue ads); null otherwise

Pagination and volume

  • One call reads Meta's first result page (about 30 ads).
  • A limit above 30 scrolls the library for more, up to about 70–80 ads per call; those calls take about 45–60 seconds.
  • nextCursor pages through the batch that call fetched. hasMore is null with truncatedReason=library-page when the batch is spent but Meta still has more ads — narrow the query by date or status to reach them.
  • Every endpoint is 2 credits per call. Failed requests (4xx/5xx) aren't billed, an empty search costs 0, and cache=true serves the 24h cache at no charge.

Facebook Ad Library API guides

Frequently asked questions

Why are spend and impressions null for most ads?+

Meta publishes spend and impression ranges only for ads about social issues, elections or politics (Meta Archived Ad reference, v26.0, read 2026-10-30). For commercial ads those fields come back null — Captapi does not estimate them. Where Meta does publish them you get spend / impressions strings plus structured spendRange / impressionsRange.

pageId vs. profileId: which one do I pass to company-ads?+

Pass pageId (or libraryUrl) from /v1/ad-library/facebook/search-companies. That is the Ad Library page id (view_all_page_id). profileId is the number in a facebook.com/{digits}/ URL; it is a different id and on its own can miss ads or return 404. A vanity page URL such as https://www.facebook.com/nike/ also works when Meta resolves it.

Does it return commercial ads, or only political ones?+

Both. ad_type=all is the default; ad_type=political_and_issue_ads narrows the results to political and issue ads.

Can I get Instagram ads?+

Yes. Meta's Ad Library covers Facebook, Instagram, Messenger, Audience Network and Threads placements. Filter with platforms=INSTAGRAM.

How many ads per call, and how do I page?+

About 30 per call by default, up to about 70–80 with a limit above 30 (slower). Then page with nextCursor. If hasMore is null with truncatedReason=library-page, narrow the query by date or status.

Can I get inactive or historical ads?+

Yes. Use status=INACTIVE or status=ALL, optionally with start_date / end_date (YYYY-MM-DD).

Do I need a Meta developer account or access token?+

No. You only need a Captapi API key. Meta's own Ad Library API requires an access_token (Meta Ads Archive reference, Graph API v26.0, read 2026-10-30).

What does a call cost?+

2 credits for each of the five endpoints. Failed calls aren't billed, an empty search costs 0 credits, and cache=true hits are free. New accounts start with 100 free credits.

Is ad-transcript a speech transcript?+

No. It returns the ad's written copy — headline, body, CTA and landing URL. Meta doesn't expose ad audio.

Explore other platforms

Start using the Facebook Ad Library API in sixty seconds

Sign up, grab your API key, and make your first request. 100 credits on the house — no credit card.

Meta (Facebook) Ad Library API & Scraper — Captapi