> ## Content Index
> Fetch the complete content index at: https://agentkey.app/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to See What Ads a Competitor Is Running on Facebook With AgentKey
- URL: https://agentkey.app/blog/see-competitor-facebook-ads-with-agentkey/
- Published: 2026-11-24T06:19:16.000Z
- Updated: 2026-11-24T06:19:16.000Z
- Description: Connect the Meta Ad Library to your AI agent with AgentKey, pull one advertiser's active ads, and count formats, offers, messages and start dates.
- Author: lxcong
- Tags: Competitor Research, #en, #ak-i18n-source, #translation-2f5381b4-9d0b-46ef-9852-626769780c9c, #ak-i18n-version-1452504f4fcb40a8

Get a counted summary of the ads one advertiser is running on Facebook and Instagram: formats, offers, messages and start dates. Connect AgentKey, then paste this into your agent:

```
Use AgentKey's Facebook Ad Library tools to summarize the ads [ADVERTISER] is running in [COUNTRY]. Check each tool's price before any paid call, stop before the total passes 3 credits, and retry a call that times out up to three times.

Find the advertiser's page ID with company search, and tell me which page you picked and why. Then list that page's active ads in that country with company ads, following the cursor until you have 60 ads or the list ends. Pages vary in size, so count ads, not pages. A full response is too large to read, so from the first call use the tool's jq option to keep only id, active, pageId, text, title, ctaText, displayFormat, the media types, startDate and linkUrl for each ad, plus totalResults and nextCursor. Before you count, confirm that the ad IDs are unique across pages and that every ad is active and belongs to that page. Tell me how many ads you collected against the 60 requested, the total number of active ads reported on the first page, the range of start dates, and whether anything in the response lets you check the sort order.

Give every ad exactly one offer and one main message, using its text and headline, with categories created from the data and a separate category for ads that state no offer. Report counts for display format, video or image, button label, offer and message, each with up to three example ad IDs. Convert startDate to a calendar date and count how many ads started on each date.

Last, get the transcript of one ad whose display format is VIDEO. If none comes back, try one more ad and stop. Tell me whether the video makes the same point as the ad text. Leave out personal names, including names inside promo codes. The library shows no spend or results, so do not call any ad a winner, and separate what the data shows from what you infer.
```

Performance and growth marketers look at a competitor's ads in the Meta Ad Library before they plan creative. The library is a scrolling page, and a large advertiser runs hundreds of ads. Reading them by hand leaves you with an impression, not a count.

An AI agent can do the counting, with one catch: in our test it could not open the Ad Library on its own. This guide shows how AgentKey supplies the ad data. We ran every step on HelloFresh's US page on November 24, 2026, and the numbers below come from that run.

AgentKey covers one part of the job. It returns the ads; your agent's model sorts them, and you check the result. The library shows no spend, reach or results for these ads, so nothing here says which ads perform.

At the end you will have:

- Counts of formats, button labels, offers and main messages, with example ad IDs.
- A list of start dates showing when the current ads went live.
- The script of one video ad, to compare with its text.
- A record of the sample size, the date and what the run cost.

## Why can't an AI agent read the Facebook Ad Library on its own?

In our test, the Ad Library refused the agent's built-in page fetch, and its web search found pages about the library but no ads. A count needs a list: the active ads for one page, each with its text, format and start date.

We asked Claude Code to get that with its built-in tools first. The page fetch failed on three Ad Library addresses: the home page, a search for the advertiser and one ad's own page. All three answered HTTP 403 Forbidden.

Two web searches returned **24 links and no list of ads**. A search limited to facebook.com gave 10 links: the library's home page, help and API pages, and three of the brand's Pages. An open search gave 14 links, none on facebook.com, most of them third-party ad trackers.

![Three routes compared: the built-in page fetch was blocked with HTTP 403 on three Ad Library addresses, the built-in web search returned 24 links with no list of ads, and AgentKey's Facebook tools returned 60 ads with text, headline, format, media and start date.](https://agentkey.app/blog/content/images/2026/11/facebook-ads-1-access.png)

We opened two of those tracker pages. One returned a 404 error, and the other showed 8 placeholder entries with no ad text and no start date.

The other route is Meta's own Ad Library API. It needs a developer account, an identity check and an access token, and Meta's documentation centers its coverage on political and issue ads and on ads shown in the European Union. We did not test it.

## Which AgentKey tools does this use?

Three tools from AgentKey's Facebook set do the reading, and the tools for finding them are free. Prices and capabilities were verified on November 24, 2026.

### 1\. Facebook Company Search

Finds advertiser pages in the Ad Library by keyword. In the AgentKey catalog it is named AnyAPI/facebook\_search\_companies.

**Pricing:** from 0.3 credits per call. Our one call was charged 0.3.

**Features:** each page comes back with its page ID, category, country, verification status and linked Instagram account. Our search returned 15 pages.

### 2\. Facebook Company Ads

Lists the ads one page is running. Its catalog name is AnyAPI/facebook\_company\_ads.

**Pricing:** from 0.3 credits per call. Each call was charged 0.3, whether it returned 30 ads or 10.

**Features:** look up by page ID; filter by country and by active status; a cursor for the next page. Each ad comes back with its ID, text, headline, button label, display format, media, platforms, start date and landing page. The catalog describes the default order as by impressions; no impression figures come back, so we could not confirm it.

### 3\. Facebook Ad Transcript

Returns the spoken words of a video ad from its ad ID. Its catalog name is AnyAPI/facebook\_ad\_transcript.

**Pricing:** from 0.3 credits per call, charged even when no transcript comes back.

**Features:** the transcript text and a flag saying whether one is available. The catalog describes it as returning the transcript of a video ad; across our run and a test run, one of three requests returned one.

### 4\. Tool discovery and price check

Your agent finds a tool, reads its parameters and sees its price before it spends anything.

**Pricing:** free.

**Features:** search the catalog in plain language; see each tool's parameters and per-call cost; check remaining credits.

The seven calls in the steps cost **2.1 credits**: one search, four pages of ads and two transcript requests. On the Lite plan, which is $12.90 a month for 500 credits, that is about 5 cents. Our full run, with one extra test call, cost 2.4 credits.

Listed prices are minimums, because calls are billed on what the data source reports.

## How to see a competitor's Facebook ads, step by step

Connect AgentKey once, then run five steps: find the page, pull the ads, count them, read the start dates, and read one video's script.

![Diagram of the five steps: find the advertiser's page, pull the active ads, count formats, offers and messages, read the start dates, read one video's script.](https://agentkey.app/blog/content/images/2026/11/facebook-ads-2-steps.png)

### Before you start

Install AgentKey with the one-line installer. It finds the agents on your machine, adds AgentKey to each, and opens a browser tab to sign in. A new account starts on the Free plan with no card.

```
curl -fsSL https://agentkey.app/install.sh | bash
```

Other install methods are in the [installation guide](https://docs.agentkey.app/connect/install?ref=agentkey.app). The [Facebook for Claude Code page](https://agentkey.app/integrations/facebook-api-for-claude-code/?ref=agentkey.app) shows what the connection gives you.

Then pick one advertiser and one country, and fix the sample size before you look at any data. We chose 60 active ads in the US.

### Step 1\. Find the advertiser's page

A brand name is not enough, because a large brand runs one page per country. Your agent calls Facebook Company Search with the brand name and picks the page by country and verification status.

Our search cost 0.3 credits and returned **15 pages**: 12 verified HelloFresh country pages and 3 unverified pages with similar names. One page was for the US.

### Step 2\. Pull the active ads

Your agent calls Facebook Company Ads with the page ID, the country and the active filter, then follows the cursor. Ask it to keep only the fields it needs, because a full page of 30 ads is too large to read.

The tool reported **348 active ads** for the page in the US. We took the first 60 in the tool's default order, in four calls for 1.2 credits. The first page held 30 ads and the next three held 10 each.

### Step 3\. Count formats, offers and messages

This step is the model's work. Ask for exactly one offer and one main message per ad, with the categories created from the data.

**Formats.** 52 of the 60 ads were labeled DCO, one ad holding two to six videos or images. Six were single videos, and 2 were labeled DPA and showed six dish photos each. By media, 43 ads used video and 17 used images.

**Offers.** Two offers covered **51 of the 60 ads**: 28 promised 10 free meals, and 23 promised 10 free meals plus free breakfast for life. Three ads carried one-off offers and 6 stated no offer in their text. The button read "Sign up" on 35 ads and "Get offer" on 25.

![Bar chart of offers in 60 active ads. 10 free meals leads with 28, 10 free meals plus free breakfast for life has 23, no offer in the ad text 6, and three one-off offers have 1 each.](https://agentkey.app/blog/content/images/2026/11/facebook-ads-3-offers.png)

**Messages.** Two messages carried **38 of the 60 ads**: 20 compared the product with takeout on price or quality, and 18 promised dinner in 30 minutes with no planning. Another 11 said in general terms that home cooking is easy, and 7 sold menu variety. Two used reviews and awards, and 2 fit none of these.

![Bar chart of main messages in 60 active ads. Cheaper or better than takeout 20, dinner in 30 minutes with no planning 18, home cooking made easy 11, menu variety and choice 7, reviews and awards 2, other 2.](https://agentkey.app/blog/content/images/2026/11/facebook-ads-4-messages.png)

### Step 4\. Read the start dates

Every ad carries the date it started running. **50 of the 60 ads started between October 21 and 23**: 29 on October 21, 20 on October 22 and 1 on October 23\. The other 10 came later: 2 on November 4, 7 on November 11 and 1 on November 20.

![Bar chart of start dates for 60 active ads. October 21 has 29, October 22 has 20, October 23 has 1, November 4 has 2, November 11 has 7, November 20 has 1.](https://agentkey.app/blog/content/images/2026/11/facebook-ads-5-start-dates.png)

Our reading is that the account relaunched most of its ads in one batch, so run length says little here about which ads last. One ad dated October 21 talks about back-to-school season, which suggests the copy is older than its start date. The 10 later ads are the more useful signal, because they show what was added after the batch.

### Step 5\. Read one video's script

Facebook Ad Transcript returns what a video ad says out loud. We asked for two ads, 0.6 credits. A DCO ad returned no transcript, and a single-video ad returned one.

That ad's text leads with five-star reviews and an award. Its video talks about groceries going to waste, a message none of the 60 ad texts used.

## How do you check the results?

Recount a slice by hand, and look for the things that distort an Ad Library sample.

- **Confirm you have the right page.** Every ad should carry the page ID you picked. In our run all 60 landing pages were on the advertiser's own site.
- **Check for repeats.** Our 60 ad IDs were unique, yet one takeout line appeared in 10 of the ads.
- **Open ten ads in one category.** Each ad has a public address ending in its ID. If more than two are mislabeled, tighten the definitions and sort again.
- **Do not read run length as success.** The library shows no spend or results for these ads. A start date says when that ad ID went live, and a relaunch resets it.
- **Do not trust text alone for video ads.** The 6 ads with no offer in their text may state one in the video. We tried one of them and no transcript was available.
- **Mind the sample.** The first 60 of 348 ads are a sample, not a ranking. They support the two leading offers and messages, not the gap between a group of 7 and a group of 11.
- **Leave personal names out.** 13 ads used a promo code built around a first name, and 4 opened with "#ad". We read those as creator content, which the library does not label.

## When should you use something else?

Use a different route when you only need a quick look, or when you need history.

If you want to glance at a few ads, open the Ad Library in a browser. It is free and public, and it shows the creative itself, which this method only describes in text.

If you need to track many advertisers every week, with saved creative and alerts, an ad intelligence product is built for that. We did not test scheduled runs with AgentKey, and one run is a snapshot of one day.

If your engineers are building a pipeline, Meta's own API gives direct access where its coverage fits your market.

This is the AgentKey blog, and AgentKey provides the tools described here. They return ads and transcripts. They do not sort them, judge them or tell you which ads work.

## Which tool should you use for each job?

Pick the tool from the question you are asking. Prices were verified on November 24, 2026.

- **Find the right advertiser page:** Facebook Company Search. From 0.3 credits per call.
- **List what a page is running:** Facebook Company Ads, filtered by country and active status. From 0.3 credits per page of 10 to 30 ads.
- **Hear what a video ad says:** Facebook Ad Transcript. From 0.3 credits per ad, charged even when no transcript exists.
- **Check a price before spending:** tool discovery and inspection. Free.

## Conclusion

You now have a way to turn one advertiser's ad library into counts of formats, offers and messages, a list of start dates, and a set of checks for each. Run it on a competitor in your own category, then run it again next month to see what changed.

[Connect Facebook to your agent through AgentKey →](https://agentkey.app/integrations/facebook-api-for-claude-code/?ref=agentkey.app)

## FAQ

### Can Claude Code read the Facebook Ad Library without AgentKey?

Not in our test. On November 24, 2026, its page fetch got HTTP 403 from the Ad Library and its web search returned no list of ads. Other agents may have different built-in access.

### How much does it cost to analyze one advertiser?

The calls in our steps cost 2.1 credits for 60 ads and two transcript requests, about 5 cents on the Lite plan. Each extra page of ads adds 0.3 credits and each transcript request adds 0.3.

### How many ads can I pull at once?

Each call returned 10 to 30 ads, and a cursor fetches the next page. We pulled 60 of 348 and did not test how far paging goes.

### Does the data show which ads perform best?

No. For these ads the library gives no spend, reach or results. Start dates show how long an ad ID has been live, and reading that as success is an inference.

### Does AgentKey sort the ads into offers and messages?

No. AgentKey returns the ads and the transcript. Your agent's model does the sorting, which is why the prompt asks for example ad IDs you can check.

### Does this cover Instagram ads too?

Yes, where the advertiser runs them. Each ad lists its platforms: all 60 in our sample listed Facebook, Instagram and Threads, and 5 also listed WhatsApp.

### Is there a free way to try it?

A new account starts on the Free plan, which includes complimentary credits and needs no card. Finding and inspecting tools does not use credits, so you can check a tool's price before any paid call.