Facebook Page Ads API
Get every ad an advertiser runs on Facebook, Instagram, Messenger, Threads and the Audience Network, from its page ID. The same filters as the ads search narrow the list by country, status, platform, media type, language and dates, and a cursor walks through advertisers with thousands of ads.
A second endpoint returns the advertiser’s page profile: category, likes, linked Instagram account and followers, verification and an estimate of how many ads are active right now.
No credit card needed. One API key works on every endpoint.
Quick example
https://api.scrapeadlibrary.com/v1/pages/{page_id}/adshttps://api.scrapeadlibrary.com/v1/pages/{page_id}curl "https://api.scrapeadlibrary.com/v1/pages/15087023444/ads?country=US&platforms=instagram&limit=50" \
-H "X-API-Key: sal_your_api_key"
curl "https://api.scrapeadlibrary.com/v1/pages/15087023444" -H "X-API-Key: sal_your_api_key"Page profile response
{
"data": {
"id": "15087023444",
"name": "Nike",
"is_person": false,
"category": "Sportswear Store",
"like_count": 39000000,
"instagram": { "username": "nike", "followers": 300000000, "verified": true },
"verified": true,
"profile_picture_url": "https://scontent.xx.fbcdn.net/...",
"cover_photo_url": "https://scontent.xx.fbcdn.net/...",
"about": "...",
"deleted": false,
"active_ads_estimate": 14386,
"url": "https://www.facebook.com/ads/library/?view_all_page_id=15087023444"
},
"credits_used": 1,
"cached": false
}Illustrative values: a real response carries the live data of the ads and advertisers you ask for.
The list of ads has the same shape as the ads search: data, total_estimate, has_more and next_cursor.
Page profile fields
| Field | Type | Description |
|---|---|---|
| id, name | string | Page ID and name. |
| category | string | null | The page category, e.g. Sportswear Store. |
| like_count | integer | null | Facebook likes of the page. |
| object | null | Linked Instagram username, followers and verification. | |
| verified | boolean | Whether the page has a verified badge. |
| active_ads_estimate | integer | null | How many ads the page is running now, as Meta estimates. |
| is_person | boolean | True for person profiles: then no picture is returned. |
| url | string | The page’s view in the Meta Ad Library. |
Parameters of the page ads endpoint
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| page_id | path | digits | required | The ID of the advertiser page. |
| country | query | string | ALL | ISO 3166 alpha-2 country code (e.g. IT, US) or ALL |
| status | query | enum | active | active | inactive | all |
| ad_type | query | enum | all | all | political (political and issue ads) |
| media_type | query | enum | all | all | image | video | meme | none |
| platforms | query | csv | all | Any of facebook, instagram, messenger, audience_network, threads |
| languages | query | csv | all | ISO 639-1 language codes (e.g. en,it) |
| active_from | query | date | - | YYYY-MM-DD. With active_to: ads that were running at some point in the window |
| active_to | query | date | - | YYYY-MM-DD, end of the window |
| match | query | enum | any | any | exact (exact phrase) |
| sort | query | enum | relevance | relevance | impressions (most impressions first) |
| limit | query | integer | 30 | Ads per page, 1-50 |
| cursor | query | string | - | next_cursor of the previous page; the other parameters must be identical |
What people build with it
Competitor ad archives
Download every active ad of each competitor once a day and keep your own history of their creatives and offers.
Agency audits
Before a pitch, list everything a prospect is running on Facebook and Instagram, by format and platform.
Launch detection
Compare today’s ads of a page with yesterday’s to spot new products, promotions and markets as they launch.
Advertiser enrichment
Add category, likes, Instagram followers and the number of running ads to the companies in your CRM.
Pricing
The ads of a page cost 1 credit per 10 ads returned, rounded up; the page profile costs 1 credit. Empty results and errors are free.
- 100 free credits every month, no credit card
- Then $1 per 1,000 credits, pay as you go
- Only successful calls are billed: errors cost nothing
- Credits never expire; bulk packs from 10,000 credits for $9
Also in the MCP server for AI assistants
The ScrapeAdLibrary MCP server gives Claude, Cursor and other MCP clients the same data as tools: get_page and get_page_ads. Ask “what is this brand advertising on Instagram right now?” and the assistant fetches the page and its ads.
Run it with uvx scrapeadlibrary-mcp and your API key in SCRAPEADLIBRARY_API_KEY; the MCP server guide has the configuration for each client. Tool calls are billed like API calls.
Facebook Page Ads API: FAQ
- How do I find the page ID of an advertiser?
- Search the advertiser by name with GET /v1/pages/search, read page.id from any ad in the search results, or take view_all_page_id from the advertiser’s Ad Library link.
- Can I get the inactive ads of a page too?
- Yes, with status=all or status=inactive. Inactive commercial ads stay in the Ad Library only when they were delivered in the EU (for one year) or are political or issue ads.
- How many ads does a page have?
- GET /v1/pages/{page_id} returns active_ads_estimate, and every page of ads returns total_estimate for the filters you used.
- How much does it cost to download all the ads of a page?
- 1 credit per 10 ads returned: an advertiser with 500 active ads costs 50 credits. The page profile costs 1 credit.
- Does it work for Instagram-only advertisers?
- Every ad in the Ad Library belongs to a Facebook page, Instagram ads included: filter them with platforms=instagram.
Related APIs
- Facebook Ads Search APISearch the Ad Library by keyword or advertiser, with country, platform, media and date filters.
- Facebook Ad Details APIOne ad with its creatives, payers and EU (DSA) reach by country, age and gender.
- Facebook Advertiser Search APIFind the advertisers that ran ads on a keyword, with their page ID and category.
- Free Ad Library searchTry the data in the browser: a few free searches a day, no account.
Every parameter and error code is in the page ads reference.
Every ad of any advertiser, as JSON
Create a free account and list the ads of the first page you think of. 100 free credits every month.