treg.to / Workflows / Facebook Ads Library API: pull a competitor's live ads and what they bid on in Google
3 steps · 2 providers · $0.000 markup

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 treg.to key, with the price printed before each.
$1.00 of free credit once per new verified account · no provider signup · no card
used in this run
ApifySerpApi
Try it

One prompt runs the whole thing

1Set your agent up, once
in your agent's chat
set up treg — https://treg.to/llms.txt
2Ask for the list
the prompt
Using treg, 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.
works in
ChatGPTClaudeClaude CodeCodexCursorGemini CLI

Why this prompt works

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

What ChatGPT calls, and what each call costs

Prices are the provider’s own rate, read from the catalog when this page loads, with $0.000 added by treg.to. Success rates are treg.to’s own served calls over the last 30 days.

#StepWhat the agent asksProvider usedPriceSuccess rate
1Count the ads firstonlyTotal:true returns the count as a single billed result. Read it before you decide how many ads to pull.how many active ads the Page runs, as one cheap result rowApifyApify3 providers do this step$0.005 per result100% (260 calls, 8.6s median)
2Pull the Meta adsReads the Ad Library web UI. Billed per ad returned, so cap it with resultsLimit and maxItems.active ads for a Page from the Meta Ad Library, with creative text and formatApifyApify3 providers do this step$0.005 per result100% (260 calls, 8.6s median)
3Pull the Google adsOne flat call per domain, with format and first-shown dates per creative. Failed and empty searches are free.the same advertiser's ads in the Google Ads Transparency Center, by domainSerpApiSerpApi1 provider do this step$0.015 per foundnot yet measured
At the rates above, 20 rows where every call hits comes to $0.22 (20 × $0.005 + 20 × $0.005 + 1 × $0.015). The receipt below is what it actually cost.
The receipt

What it actually cost

Run on 2026-09-14, 20 ads in.

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 treg's shared key
$0.015 for the Google call
Not metered
the two Meta calls ran on this team's own Apify key, which treg 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 treg's shared key bills them at the rate in the table.

Download the CSV of this run

Why treg.to

Why go through treg.to

One key, not 9 accounts

treg.to 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.

The detail

Where it goes wrong

Advertiser not found

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

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.

Creative fields shift

Both routes read the public library pages. Field availability tracks whatever Meta and Google currently render.

Questions

Before you start

What does a competitor pull cost?

It depends on how many ads they run. The Meta route bills per ad at the rate above; cap the count.

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.

Can I pull TikTok or LinkedIn ads too?

Yes. The catalog has routes for both; the competitor-ads hub page compares them.

What about the landing pages?

Ask the agent to scrape the link URLs from the CSV with a web-scrape route as a follow-up step.