GTM Tech Stack

October 26, 2026

Meta Ad Library API · what it shows for US ads, and how to track competitor ads in code

Visit SearchApi

Meta’s Ad Library API covers every ad type only for ads shown in the UK and EU. Meta says it also covers political ads shown anywhere. It has no stated fee. For US commercial ads and four other ad libraries, SearchApi Developer is $40 a month for 10,000 searches.

You want to see a competitor’s Facebook and Instagram ads in your own code. An ad library is a public archive of ads that ran. An API is a way for your code to ask a service for data.

Meta runs both. Its Ad Library website is open to anyone. As of October 26, 2026, its Ad Library API covers far less than the website shows.

Notebook sketch of a world map with only the UK and EU shaded in, and a small ad card labelled US competitor sitting in the dark part of the map
The API lights up the UK and EU. A US-only ad sits in the dark.

The short answer

Use Meta’s Ad Library API if your competitors run ads in the UK or EU, or if you study political ads. As of October 26, 2026, Meta states no fee for the API.

Use SearchApi if your competitors run ads only in the US, or if you also want LinkedIn, Google, TikTok or Reddit ads. SearchApi Developer is $40 a month for 10,000 searches, as of October 26, 2026. Run one test search for a US advertiser before you build on it, because SearchApi says ad types can depend on the country.

Don’t expect exact spend from any ad library. Meta shows spend only for political ads, and only as a range.

What Meta’s API covers

As of October 26, 2026, Meta’s API covers two kinds of ads you can search.

The first kind is ads about social issues, elections or politics. Meta says this covers ads shown anywhere in the world in the past seven years. Run one test search for the country you need before you build on it.

The second kind is ads of any type shown in the UK or EU in the past year.

A US company that runs normal ads only in the US fits neither box. Its ads won’t show up in the API.

Notebook sketch of two boxes, the left labelled any ad, UK and EU, past year, the right labelled political ads, Meta says: anywhere, seven years, and a US product ad beyond both boxes
Two boxes, and a US product ad fits neither.

Access takes two steps and a few days

Step one is identity confirmation. Meta says to go to Facebook.com/ID and follow the confirmation process, which “can take a few days.”

Step two is a Meta for Developers app. That is the app record your code uses to make requests.

Notebook sketch of three numbered steps, step one labelled confirm ID with a note reading can take a few days, step two labelled create developer app, step three labelled first request
Plan for a wait at step one.

Spend shows only as a range

For political ads, Meta adds total amount spent and total impressions as ranges. An impression is one time an ad appears on a screen.

For UK and EU ads, Meta shows estimated impressions and reach. No ad library, official or not, gives a competitor’s exact ad spend.

One API key for five ad libraries

As of October 26, 2026, SearchApi has engines for the Meta Ad Library, LinkedIn Ad Library, Google Ads Transparency Center, TikTok Ads Library and Reddit Ad Library. One API key, the password your code sends, works on all five.

Its Meta engine searches all ad types by default. It can filter to active ads, a country, or a ranking by newest or by impressions, high to low. SearchApi adds that ad type “availability may depend on the selected country.”

A page ID is the number that names one Facebook page. SearchApi’s Page Search finds it, and the Meta engine uses it to pull one advertiser’s ads.

As of October 26, 2026, SearchApi bills only for searches that succeed.

Notebook sketch of one large API key with five plugs labelled Meta, LinkedIn, Google, TikTok and Reddit
One API key, five ad libraries.

Long ad histories break a plain GET request

Results come in pages. A pagination token is the code your script sends to ask for the next page.

SearchApi’s docs say the Meta token can grow from 2KB to 5KB to 8KB or more per page. Sent in a web address, that can cause 413 or 414 errors, which mean the request is too large.

The fix is a POST request, which sends the token in the body of the request. Build your script that way from day one if you track a big advertiser.

Notebook sketch of a web address bar bursting as a token grows from 2KB to 5KB to 8KB, with an arrow to an envelope labelled POST body holding the token
Put the growing token in a POST body.

What tracking 50 competitors costs

The math: on October 26, 2026 prices.

  • 50 competitor pages on Meta, checked weekly. At about 3 result pages each, that is about 600 searches a month, inside SearchApi Developer at $40 a month for 10,000 searches.
  • The same 50 competitors on LinkedIn and Google too. That is about 1,800 searches a month at the same 3-page guess, still inside the $40 a month plan.
  • EU-shown ads through Meta’s own API. That costs $0 a month in API fees, after ID confirmation and app setup.

If every competitor you care about runs ads in the UK or EU, Meta’s own API is free and comes straight from Meta.

What to do this week

List 10 competitors and write down where each one runs ads.

If they all run ads in the UK or EU, start the Facebook.com/ID check today, since it can take a few days. If any run only in the US, run one SearchApi Meta search on that advertiser’s page and check that its ads come back before you build the full tracker.

Try SearchApi

Next · SearchApi tool page covers every SearchApi plan · Web search APIs compares search APIs · SerpApi alternatives lists more search APIs.

Sources · Meta Ad Library API, checked October 26, 2026 · SearchApi pricing, checked October 26, 2026 · SearchApi Meta Ad Library docs, LinkedIn Ad Library docs, Google Ads Transparency Center docs and TikTok Ads Library docs, all read October 26, 2026.

Open the live tool this note is about.