APIs / Social media / Facebook Ad Library

1 credit per call5 endpointsChecked working 6 Dec 2026

Facebook Ad Library API

Facebook Ad Library API for ad search by keyword, page, country and ad type, ad details, advertisers and EU transparency reports as JSON.

Facebook Ad Library
GET/v1/facebook-ad-library/search?query=climate&country=US&ad_type=POLITICAL_AND_ISSUE_ADS
curl "https://api.perceptlayer.com/v1/facebook-ad-library/search?query=climate&country=US&ad_type=POLITICAL_AND_ISSUE_ADS" \
  -H "X-API-Key: $API_KEY"
cURL1 credit per successful call
Run this call below or from your dashboard to see a live response.

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/facebook-ad-library/search?query=climate&country=US&ad_type=POLITICAL_AND_ISSUE_ADS" \
  -H "X-API-Key: $API_KEY"

Facebook Ad Library · 5 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

Note
Endpoints marked “Needs terms” return personal or social data. They work once you accept the restricted-endpoint terms in your dashboard.
EndpointRequired parametersReturnsCost
GET/v1/facebook-ad-library/ad-details
ad_archive_idpage_id+1 optionalNeeds terms
ad_archive_idpage_idadvertiseruk_transparencyresponse_time_ms
1 credit
GET/v1/facebook-ad-library/advertisers
query+2 optionalNeeds terms
advertisersadvertisers_countresponse_time_ms
1 credit
GET/v1/facebook-ad-library/eu-report
section+2 optionalNeeds terms
report_parameterssection_datareach_noteresponse_time_ms
1 credit
GET/v1/facebook-ad-library/filters
none+3 optionalNeeds terms
empty_facet_listsempty_facet_lists_noteresponse_time_ms
1 credit
GET/v1/facebook-ad-library/search
none+13 optionalNeeds terms
search_parametersadsads_countpaginationresponse_time_ms
1 credit

Overview

About the Facebook Ad Library API

What you can get

The Facebook Ad Library API returns public Ad Library data as JSON through 5 endpoints. All of them are restricted endpoints: the restricted-endpoint terms apply, and they don't permit collecting personal data without a lawful basis or using it to contact people.

  • Search: search takes a query or page_id, with country, ad_type (ALL, POLITICAL_AND_ISSUE_ADS, CREDIT_ADS, FINANCIAL_PRODUCTS_AND_SERVICES_ADS, EMPLOYMENT_ADS, HOUSING_ADS or UNCATEGORIZED_ADS), media_type, active_status (ALL, ACTIVE or INACTIVE), publisher_platforms[], start_date and cursor.
  • Ads: ad-details takes an ad_archive_id and page_id, with country.
  • Advertisers and filters: advertisers takes a query, with country and ad_type; filters takes the same.
  • EU report: eu-report takes a section (overview, searches, campaign-tracker, advertisers, locations or download-availability), with country and time_preset.

How a call works

Search ads by keyword: GET /v1/facebook-ad-library/search?query=climate&country=US&ad_type=POLITICAL_AND_ISSUE_ADS with your key in the X-API-Key header. Search pages with cursor. Every successful call costs 1 credit; failed calls cost nothing.

Social mediaJSONRESTMCPSome endpoints need terms

More social media APIs

Use cases

Review competitors' active ads by keyword and country

Use the Facebook Ad Library API to review competitors' active ads by keyword and country

Research issue and political ads in a market

Use the Facebook Ad Library API to research issue and political ads in a market

Track how a brand's ads change over time

Use the Facebook Ad Library API to track how a brand's ads change over time

Report on ad activity from the EU transparency data

Use the Facebook Ad Library API to report on ad activity from the EU transparency data

FAQ

Questions

Do I need a Meta developer app?

No. You call this Facebook Ad Library API with your Perceptlayer key in the `X-API-Key` header, so there's no Meta app to register. You do need to accept the restricted-endpoint terms first.

How much does the Facebook Ad Library API cost?

Each successful call costs one credit. New accounts get free credits to start, and credit packs bring the price down as you scale.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Is this the official Facebook Ad Library API?

No. Perceptlayer is an independent service and is not affiliated with Facebook Ad Library. It returns Facebook Ad Library data as JSON with a Perceptlayer key, so there is no Facebook Ad Library developer account, app review or partner approval to get first. It only reads data: if Facebook Ad Library has an official API and you need to act on your own Facebook Ad Library account, such as posting, managing orders or reading private data, use that one.

Should I build a Facebook Ad Library scraper instead?

You can, but a Facebook Ad Library scraper is code you maintain: page changes break it, requests get blocked, and Facebook Ad Library's terms govern how you collect data. The Facebook Ad Library API gives you 5 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first. Some of these endpoints return social or personal data and need the restricted-endpoint terms; collect only what you have a lawful basis for.

Try the Facebook Ad Library API with 100 free credits

No credit card. Failed calls are never billed.