FACEBOOK AD LIBRARY API

Meta Ad Library API: find the right advertiser and pull its ads

Pull any brand's Facebook and Instagram ads from the Meta Ad Library as structured records: copy, creative, start dates, placements and landing pages. This guide shows how to find the right advertiser Page, what each record contains, what Meta keeps hidden, and how to run the same pull every week.

A bookshelf filled with ad cards, a ladder, a filter funnel and a laptop showing a grid of ads
In short
  • Search the advertiser first, then pull its ads by Page ID. A global brand can run ads from many regional Pages with the same name: IKEA returned six Pages all called "IKEA", and the UK Page had no ads while the US Page did. Check every Page.
  • Each ad record carries the copy, creative URLs, start date, active status, placements, call to action and landing page. Spend, impressions and reach appear only for political and social-issue ads, and reach for ads shown in the EU.
  • Start dates are your best public signal. In our IKEA US pull, four of five stopped 2026 campaigns ended on 1 or 2 September, and the URL tags on the new ones say FY27.
  • Every advertiser, ad or search result costs 2 credits. Empty results cost nothing. A weekly pull of 20 ads for one advertiser is 40 credits.

The four Ad Library operations and when to use each

Meta's Ad Library answers two kinds of question: what is one advertiser running, and who is advertising about a topic. Caelario exposes both as separate operations, plus a single-ad lookup and a video transcript.

OperationWhat you give itUse it when
adlibrary_companies (advertiser search)A brand or company name, e.g. IKEAYou know the brand but not its Page ID. Returns matching advertiser Pages with page_id, page_url and like count.
adlibrary_company_ads (advertiser's ads)One page_id from advertiser searchYou want everything one Page is running: up to 200 ads.
adlibrary_search (ad search)A keyword, e.g. "wall anchoring" or "meal kit"You want every advertiser using a word or offer, across the category: up to 200 ads.
adlibrary_ad (one ad)An ad ID or Ad Library URLYou already have the ad and want to refresh it, for example to check it's still active, without pulling the whole list again.
adlibrary_ad_transcriptAn ad ID or URLYou need the spoken words of a video ad: 10 credits per transcript.

A Facebook Page lookup (facebook/profile) is not an advertiser search. It resolves a handle or URL and can match an unrelated Page or person. Use advertiser search to get the page_id that the ads operation needs.

Find the right advertiser Page, and check all of them

Big brands rarely advertise from one Page. They run a global Page, country Pages, sub-brand Pages and partnership ads under a creator's name. In the Ad Library each is a separate advertiser with its own page_id, and an ads pull covers only the Page you ask for.

We searched for IKEA. All six advertisers returned were named "IKEA", in the Furniture category, with the same like count of 34,285,562, most likely because they sit in one global Page structure that shares a like total. The only readable difference was page_url: IKEAItalia, IKEAFrance, IKEApl, IKEAUSA, IKEAUK and IKEAIreland.

The UK Page returned no ads. The US Page returned 20. Had we stopped at the UK Page, we'd have concluded IKEA wasn't advertising. Open each page_url, pick the country you're studying, and if a Page comes back empty, try its siblings. Empty pulls cost nothing.

Partnership ads are the other trap. One IKEA US ad ran from a home-decor creator's Page: the record carried IKEA's page_id but the creator's page_url, with her copy tagged #myIKEAUSA #Ad. Decide whether creator-fronted ads belong in your count, and use page_url to find them.

What each ad record contains

These are the fields Caelario returns for every Meta ad, from the advertiser's ads, an ad search or a single-ad lookup. The shape is the same for all three.

MetricWhat it meansHow to read it
ad_id, snapshot_urlMeta's ID for the ad and its Ad Library link.Key your spreadsheet on ad_id and keep snapshot_url as the reference.
page_id, page_name, page_urlThe advertiser, and the Page the ad appears to run from.A page_url that isn't the brand's own marks a partnership ad.
active, started_at, ended_atWhether the ad is running, and its dates.For an active ad, ended_at is the day you collected it: read it as "still running".
publisher_platformsFACEBOOK, INSTAGRAM, MESSENGER, THREADS, AUDIENCE_NETWORK.A change in placements is a change in strategy.
display_formatVIDEO, IMAGE, DCO (dynamic creative assembled from several assets) or DPA (dynamic product ads from a catalog).One DCO or DPA record can stand for many visible variations.
body, title, caption, link_descriptionPrimary text, headline, display link and the line under the headline.Catalog ads show placeholders like {{product.name}}; tag them by body text and landing page.
call_to_action, destination_urlThe button (Shop now, Learn more, Book now) and the landing page.UTM tags often name the campaign, objective and audience.
image_urls, video_urlsThe creative files.Signed links that expire within days. Download what you want to keep.
spend_lower/upper, impressions_lower/upper, reach_lower/upper, currency, countriesRanges Meta publishes for some ads.Empty for ordinary commercial ads outside the EU. See the limits below.
Real example · collected 21 November 2026

IKEA US: 20 Meta ads grouped by campaign

We ran advertiser search for IKEA, picked the US Page (page_id 85409903065) after the UK Page returned no ads, and pulled 20 of its ads. We grouped them using the copy and the campaign names in each landing page's UTM tags, and counted days to 21 November 2026.

14 of 20IKEA US ads activeFour of five stopped 2026 ads ended 1 or 2 Sep
7Catalog ads launched on one day20 Oct 2026, five placements
54Credits for the whole studySix Pages searched, 20 ads pulled
IKEA US ads per campaign
Catalog
7
Safer homes
3
Holiday delivery
2
Kitchen services
2
Store visits
2
Wardrobes
1
Creator partnership
1
Back-to-college
1

One further ad, a 2021 sustainable-products ad, is not shown.

See the full table
Campaign (from copy and URL tags)AdsFormatStatusStartedDays running
Catalog: rooms, bedroom, storage, new products7DPAActive20 Oct 202632
Safer homes: free wall-anchoring kit3DCOActive1 Sep 202681
Holiday delivery and pick-up2DCOActive2 Nov 202619
Custom wardrobes1DCOActive1 Sep 202681
Creator partnership (#myIKEAUSA)1VideoActive29 Oct 202623
Kitchen services and kitchen appointments2DCOStopped 2 Sep19 May and 7 Jul 2026106 and 57
Store visits: Chantilly opening, Los Angeles2DCOStopped 18 Aug and 2 Sep18 and 24 Jun 202661 and 70
Spanish-language back-to-college1DCOStopped 1 Sep2 Jun 202691
Sustainable products (2021)1DCOStopped 1 Jul 20217 Jun 202124

What it tells you

  • 14 of 20 ads were active. Four of the five stopped 2026 ads ended on 1 or 2 September. The stopped ads with readable URL tags say FY26, while the safer-homes, wardrobe and delivery ads that started from 1 September say FY27. IKEA's financial year starts on 1 September, so this is a planning reset, not a sign the old ads failed.
  • The campaign names in the UTM tags state each objective: the safer-homes, delivery and Chantilly-opening ads are tagged Awareness, the wardrobe ad Sales, and the Los Angeles store and college ads Traffic.
  • All seven catalog ads launched on the same day and run on five placements, including Audience Network. None of the brand ads use Audience Network.
  • The back-to-college ad sent people to IKEA's Spanish-language US site and was tagged for parents: one ad record revealed an audience IKEA chose to court separately.
  • Only one record had spend: the 2021 sustainable-products ad, listed at $45,000 and 1,000,000 reach. In the US, Meta publishes spend only for ads about social issues, elections or politics, and environmental topics can fall under that label.

Credits: advertiser search 12 (6 Pages × 2), UK Page 0 (no ads, no charge), US Page 40 (20 ads × 2), one single-ad refresh 2. Total 54.

Sources: IKEA US on Facebook · Safer homes ad · Catalog ad (bedroom) · Creator partnership ad · 2021 sustainable-products ad

Start dates and longevity: what they tell you, and what they don't

Without spend or results, time is the strongest signal the Ad Library gives you. Advertisers stop paying for ads that don't work, so an ad that has run for months is one they keep choosing. Days running is the collection date minus started_at for active ads, and ended_at minus started_at for stopped ones.

Read longevity against the advertiser's own pattern. IKEA's catalog ads all started on the same day, so their age reflects a launch date, not seven separate wins. Its kitchen ads stopped on a fiscal-year boundary, so their end date reflects planning, not performance. If many ads share a start or end date, you're looking at a schedule.

Two patterns are worth flagging: an ad that keeps running while its siblings from the same launch stop has survived a test, and copy that reappears word for word in a new launch earned its place. For reading angles, hooks and offers across competitors, see /use-cases/competitor-ad-research.

How to catalog ad creative so next month's pull is comparable

A one-off pull tells you what's running. A catalog lets you see what changed. Keep one row per ad_id.

  1. 1

    Save the record the day you pull it

    Export the job to CSV or XLSX and add a collected_on column; started_at and active only mean something relative to that date.

  2. 2

    Keep creative you'll want later

    Download images and videos straight away, since signed media links expire. The snapshot_url stays valid while Meta lists the ad.

  3. 3

    Tag with a short, fixed scheme

    Campaign, format, placement set, call to action, landing page and partnership yes or no. Use the same tags for every brand so you can count across them.

  4. 4

    Parse the landing page

    Split destination_url into path and UTM tags. The path shows the product being pushed; the campaign tag often names objective and audience.

  5. 5

    Group variants

    Group ad_ids by body text and landing page before counting, or one heavily tested message will look like many campaigns.

Schedule a weekly pull and see what changed

Weekly is the right rhythm for most brands: frequent enough to catch new launches, cheap enough to run for a whole competitor set.

  1. 1

    Fix the advertiser list

    Run advertiser search once per brand, note every regional page_id that matters, and reuse them. Searching again each week costs credits for no new information.

  2. 2

    Create the schedule

    POST /v1/schedules (or ask Claude through the MCP server) with platform facebook, operation adlibrary_company_ads, your page_ids as targets, a limit, frequency "weekly", an IANA timezone and a start time. Each run dispatches a normal batch, one job per Page.

  3. 3

    Budget it

    Credits are reserved when each run starts. Three Pages at 20 ads each is at most 120 credits a week. If the balance is short, that run is recorded as skipped, not half-done.

  4. 4

    Compare ad_id lists

    New ad_ids are launches; ones that were active last week and are now inactive or missing have stopped. Caelario doesn't flag new or stopped ads for you yet, so compare in your spreadsheet or code.

  5. 5

    Refresh single ads cheaply

    To check one ad you're watching, use adlibrary_ad on its ID for 2 credits instead of re-pulling the whole list.

Running Ad Library research in Caelario

The same operations sit behind the app, Ask AI, the API and the MCP server, and they share one credit balance.

Illustrative example with made-up brands.

Brand ad watch template

Enter a brand name and it collects the brand's own ads from the Meta Ad Library (up to 100, longest-running first) and up to 50 of its TikTok ads (EU and UK) in one run, for a flat 200 credits including a basic AI insight. You see the plan and price before anything runs.

Ask AI

Ask "What is IKEA running on Facebook in the US right now, grouped by campaign?" and Caelario plans the advertiser search and ads pull, then writes the summary from the records.

API and MCP

Call adlibrary_companies, adlibrary_company_ads, adlibrary_search, adlibrary_ad and adlibrary_ad_transcript with one workspace key, or let Claude call them through the MCP server. See /solutions/social-media-data-api and /solutions/social-media-mcp-server.

Pricing

2 credits per delivered advertiser, ad or search result; 10 credits per video-ad transcript. Requests that return nothing are free, and unused reservations are released.

BUILD IT WITH CAELARIO

Facebook ad library API

The same data through the API and the Claude connector, with 200 free credits to start.

QUESTIONS

Common questions.

Is there an official Meta Ad Library API?

Meta offers an Ad Library API, but it is built around political and social-issue ads and EU transparency, and needs identity verification. Caelario returns the public Ad Library records for commercial ads too, as structured data, with one workspace key.

How do I find a company's Page ID in the Ad Library?

Run advertiser search with the brand name and read page_url on each result, since Pages often share a name. Use the page_id of the Page for the country you're studying, and check sibling Pages if it returns no ads.

Can I see how much a competitor spends on Facebook ads?

Only for ads about social issues, elections or politics. For ordinary commercial ads Meta doesn't publish spend; ads shown in the EU and UK get reach and audience breakdowns but still no spend.

How long does an ad stay in the Meta Ad Library?

Active ads are always listed. Political and social-issue ads stay for seven years, and ads shown in the EU for a year after they last ran. Other stopped ads may or may not stay visible.

How much does it cost to pull a brand's Meta ads?

2 credits per ad. Finding the advertiser is 2 credits per Page returned. Our IKEA study, with six Pages searched and 20 ads pulled, cost 52 credits, plus 2 for one single-ad refresh.

KEEP READING