# Facebook Ads Library API: pull a competitor's live ads and what they bid on in Google

Give your agent a competitor's Facebook page and get back their live Meta ads with the format, call to action and opening line of each, plus the same advertiser's ads in the Google Ads Transparency Center. 3 steps through one olywork.com key, with the price printed before each.

## Try it

Setup line (paste into any agent): `set up olywork — https://olywork.com/llms.txt`

Then ask: "Using olywork, count the active Meta ads for Notion (facebook.com/notionhq), then pull the 20 most recent. Show me the price first. Group them by format and call to action, and give me a CSV with ad_archive_id, started, format, cta, title and hook. Then list what the same company is running in the Google Ads Transparency Center."

- **Give a Page URL, not a keyword** A Page URL returns that advertiser's ads. A keyword returns everyone bidding on the phrase.
- **Count before you pull** The Meta route bills per ad returned. The count probe is one result; it tells you what an uncapped pull would cost.
- **Ask for format and CTA** The agent groups on two fields Meta renders for every ad. Grouped output is faster to review than raw creative.
- **Add the Google side** One cheap call returns the advertiser's Google ads by domain. Two libraries, one prompt.

## The steps

| # | Step | What the agent asks | Provider used | Price | Success rate |
|---|---|---|---|---|---|
| 1 | Count the ads first | how many active ads the Page runs, as one cheap result row | Apify (`apify.meta-ads.library.search`, 4 providers, https://olywork.com/use-cases/ads-a-competitor-is-running-now) | $0.005 per result | not yet measured |
| 2 | Pull the Meta ads | active ads for a Page from the Meta Ad Library, with creative text and format | Apify (`apify.meta-ads.library.search`, 4 providers, https://olywork.com/use-cases/ads-a-competitor-is-running-now) | $0.005 per result | not yet measured |
| 3 | Pull the Google ads | the same advertiser's ads in the Google Ads Transparency Center, by domain | SerpApi (`serpapi.google.ads.transparency`, 2 providers, https://olywork.com/use-cases/ads-a-competitor-is-running-now) | $0.015 per found | not yet measured |

- Count the ads first: onlyTotal:true returns the count as a single billed result. Read it before you decide how many ads to pull.
- Pull the Meta ads: Reads the Ad Library web UI. Billed per ad returned, so cap it with resultsLimit and maxItems.
- Pull the Google ads: One flat call per domain, with format and first-shown dates per creative. Failed and empty searches are free.

At the rates above, 20 rows where every call hits comes to $0.22. The receipt below is what it actually cost, and why it differs.

## What it actually cost

Run on 2026-09-14.

- Ads counted: 113 active ads on the Page, one result row
- Meta ads pulled: 20 active ads for Notion: 10 image, 6 dynamic creative, 4 video
- Calls to action: Sign up (13), Get offer (5), Apply now (2)
- Google ads pulled: 17 creatives on notion.so: 9 text, 7 image, 1 video
- Metered on olywork's shared key: $0.015 for the Google call
- Not metered: the two Meta calls ran on this team's own Apify key, which olywork never meters; on the shared key they bill at the rate in the table, $0.105 for the probe and 20 ads

The count probe came back as one result row, then twenty ads came back in one Meta call and 17 in one Google call. The worst-case total above counts the count probe once per row because it shares the pull's endpoint; in practice it is one result. Every Meta ad opened with the same line and pointed at a sign-up; the variety is in format, not copy. The Google side is mostly text ads. The Meta calls went out on the team's own Apify key, and a team's own key is never metered, so the receipt shows the shared-key rate for them separately. A run on olywork's shared key bills them at the rate in the table.

Download the CSV of this run: https://olywork.com/workflows/mine-competitor-meta-ads-as-creative-pack.csv

## Why go through olywork.com

- **One key, not 9 accounts** olywork.com holds the provider keys. Neither you nor the agent sees them.
- **Price before the call** The provider's own rate, $0.000 markup, from a prepaid balance.
- **No subscription, no seats** Charged per call. $1.00 free per new team, no card to start.
- **Your own keys are free** Already pay Hunter? Register it and those calls are never metered.
- **Switch by changing a word** Another provider is a different word in the prompt, not a new integration.
- **Nothing to integrate** No SDK, no OAuth dance per vendor, no seats.

## Where it goes wrong

**Advertiser not found** A wrong Page URL or an advertiser with no active ads returns zero results and costs nothing.

**Keyword vs Page confusion** A keyword query returns everyone bidding on the phrase. A Page URL returns that advertiser's ads. This run used a Page URL (facebook.com/notionhq) and got 20 Notion ads, not 20 ads from assorted bidders.

**Slow Meta pulls** The Meta route blocks until the scrape finishes and is cut at five minutes. Keep the limit small or use the asynchronous pair.

**Google domain mismatch** The Google side keys on the advertiser's verified domain. A marketing subdomain returns nothing; use the root domain.

**Count-before-pull billing** The count probe bills as one result; the full pull bills per ad. Notion's 113 active ads would cost $0.565 uncapped. The run capped at 20 ads ($0.105 on olywork.com's shared key).

**Creative fields shift** Both routes read the public library pages. Field availability tracks whatever Meta and Google currently render. 5 of this run's 6 DCO ads returned template placeholders, not final copy.

**Creative media URLs expire** Meta's public media links go stale within days. If you need a lasting creative pack, download the creative assets into your own storage on the same run, not later.

**Official Library API is the wrong product for ecommerce spy** ads_archive is built around transparency rules and identity checks. It will not mirror the full commercial Ad Library UI. Use a public-library scrape route when you want active brand creatives.

**Spy SaaS seat for a one-off pack** Paying a monthly ad-spy subscription only to export a competitor's current ads is a common overbuy. Cap the ad count and bill per ad returned.

## Before you start

**What does a competitor pull cost?** It depends on how many ads they run. Notion had 113 active ads; pulling all of them would cost $0.565 on olywork.com's shared key. This run capped at 20 ($0.105).

**Is this Meta's official API?** No. It reads the public Ad Library. Meta's own ads_archive route is free but needs identity verification and returns less.

**Why did 5 ads return template placeholders?** Those are DCO (dynamic creative) ads. The library shows the template, not the rendered variants. This run's CSV has 10 IMAGE, 4 VIDEO, and 6 DCO; 5 of the DCO rows show placeholders and the sixth carried real copy.

**What about the landing pages?** 18 of the 20 ads point at fb.me (a redirect); 2 point at notion.com. Ask the agent to scrape the final destinations as a follow-up step.

**Why did the image or video link die overnight?** Meta rotates public CDN URLs. Save the file during the pull if you want a durable swipe file.

## Related

- Ads a competitor is running now: https://olywork.com/use-cases/ads-a-competitor-is-running-now
- Keywords a domain bids on: https://olywork.com/use-cases/keywords-a-domain-bids-on
- Keyword volume, CPC and competition: https://olywork.com/use-cases/keyword-volume-cpc-and-competition
- Your own campaign performance: https://olywork.com/use-cases/your-own-campaign-performance

HTML version: https://olywork.com/workflows/mine-competitor-meta-ads-as-creative-pack