---
title: "Facebook Ads Library API: structured data | Scrape.ly"
description: "Extract public ads from the Meta Ad Library by page, keyword, or Ad Library URL: creatives, run dates, platforms, and delivery status, ready for competitor ad research."
url: https://scrape.ly/api/facebook-ads-library-api
markdown: https://scrape.ly/api/facebook-ads-library-api.md
---

G2

4.7/5

[Excellent](https://www.trustpilot.com/review/scrape.ly)

[Trustpilot](https://www.trustpilot.com/review/scrape.ly)

# Turn Facebook Ads Library into structured data

Extract public ads from the Meta Ad Library by page, keyword, or Ad Library URL: creatives, run dates, platforms, and delivery status, ready for competitor ad research.

[Try Facebook Ads Library API](https://scrape.ly/store/echofield/facebook-ads-scraper.md)

01 Integration

## Integrate Facebook Ads Library API your way

Connect to Scrape.ly using Python, JavaScript, HTTP, cURL, OpenAPI, or MCP and start extracting Facebook Ads Library data in minutes.

from scrapely_client import ScrapelyClient

client = ScrapelyClient ( 'YOUR_TOKEN' , api_url = 'https\://api.scrape.ly' )

run = client. actor ( 'echofield/facebook-ads-scraper' ) . call (

run_input = {

'startUrls' : \[ { 'url' : 'https\://www\.facebook.com/ads/library/?view_all_page_id=15087023444' } ] ,

'resultsLimit' : 10 ,

}

)

for item in client. dataset ( run.default_dataset_id ) . iterate_items () :

print ( item )

02 Input & Output

## Send a page or keyword, get every active ad

Pass page names, keywords, Ad Library URLs, and date ranges into Scrape.ly. Get structured outputs with ad creatives and copy, start and end dates, platforms, active status, and page details, and more.

Input

1 2 3 4 5 6 7 8

```
{
 "startUrls":[
  {
   "url":"https://www.facebook.com/ads/library/?view_all_page_id=15087023444"
  }
 ],
 "resultsLimit":10
}
```

Output

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

```
{
 "pageName":"Nike",
 "pageID":"15087023444",
 "adArchiveID":"1203948576612345",
 "isActive":true,
 "startDateFormatted":"2026-10-02",
 "publisherPlatform":[
  "FACEBOOK",
  "INSTAGRAM"
 ],
 "snapshot":{
  "body":"Built for your fastest mile yet.",
  "cta_text":"Shop now"
 }
}
```

03 How it works

## Start extracting Facebook Ads Library data in four simple steps

Scrape.ly keeps the setup simple so you can move from signup to live Facebook Ads Library data without wasting time on scraping infrastructure.

[Get started for free](https://my.scrape.ly/register)

Step 1

### Create your Scrape.ly account

Create your account and get access to ready-made APIs, scrapers, and automation tools.

Step 2

### Get your Scrape.ly API token

Copy your API token from the Scrape.ly dashboard and use it to authenticate your requests.

Step 3

### Connect Facebook Ads Library API

Choose Python, JavaScript, HTTP, or MCP and connect Scrape.ly to your app or workflow.

Step 4

### Fetch Facebook Ads Library data

Send your page names, keywords, Ad Library URLs, and date ranges, then receive clean structured data ready for analysis.

04 Why Scrape.ly

## Everything you need to extract data reliably

Scrape.ly gives you ready-made APIs, proxy support, monitoring, exports, integrations, and scalable infrastructure in one platform.

### Never Get Blocked

Use built-in proxy support to reduce blocks, rate limits, and failed requests.

### Export Any Format

Get results in JSON, CSV, Excel, XML, HTML table, RSS, or other workflow-friendly formats.

### Monitor Every Run

Track scraper status, performance, failures, retries, and outputs from one dashboard.

### Built-In Integrations

Connect with webhooks, APIs, automation tools, cloud apps, and internal systems.

### Scalable Infrastructure

Run small tests or high-volume extraction jobs without rebuilding your scraping stack.

### Developer-Friendly

Use clean APIs, SDKs, docs, examples, and structured outputs built for real workflows.

05 AI-Ready Data

## Feed Facebook Ads Library data into your tools instantly

Connect Scrape.ly with your apps, dashboards, sheets, agents, and automation workflows to turn Facebook Ads Library data into action.

[Browse integrations](https://scrape.ly/integrations.md) [API Reference](https://scrape.ly/docs/api-overview.md)

![AI-ready data workflow illustration](https://scrape.ly/assets/pages/api/ai-ready-data/ai-ready.svg)

[13 ready-made scrapers All Facebook scrapers on one page Real output, live prices per 1,000 results, and how to run each one. See them](https://scrape.ly/scrapers/facebook.md)

06 Explore APIs

## More Facebook Ads Library APIs on Scrape.ly

Browse ready-made Facebook Ads Library scrapers and APIs available inside Scrape.ly and choose the one that fits your workflow.

![Facebook Ad Library Scraper logo](https://scrape.ly/cdn-cgi/image/width=132,fit=scale-down,format=auto/https://api.scrape.ly/v2/actors/f35880c097054919a/picture.webp?v=218c8049fb0e1eea0e2ca43215664d9c)

### [Facebook Ad Library Scraper](https://scrape.ly/store/echofield/facebook-ads-scraper.md)

scrape.ly/store/echofield/facebook-ads-scraper

---

[Echofield](https://scrape.ly/users/echofield.md "Developed by Echofield")

Social media E-commerce

---

899 monthly users

[Try for free](https://my.scrape.ly/store/echofield~facebook-ads-scraper?intent=signup)

### Check other related APIs

[View all](https://scrape.ly/api.md)

[Twitter (X) API](https://scrape.ly/api/twitter-x-api.md)

[Threads API](https://scrape.ly/api/threads-api.md)

[Reddit API](https://scrape.ly/api/reddit-api.md)

[YouTube API](https://scrape.ly/api/youtube-api.md)

[Pinterest API](https://scrape.ly/api/pinterest-api.md)

[Instagram API](https://scrape.ly/api/instagram-api.md)

07 FAQ

## Common questions about Facebook Ads Library API

Quick answers about using Scrape.ly's Facebook Ads Library API, available data, setup, and legal usage.

Got more questions? [Reach out to us](mailto:hello@scrape.ly?subject=Facebook%20Ads%20Library%20API%20question\&body=I%20have%20a%20question%20about%20the%20Facebook%20Ads%20Library%20API.)

### How is this different from an official Facebook Ads Library API?

---

Official APIs, where they exist, usually need approval, keys, or paid tiers and limit which public data you can pull. Scrape.ly's Facebook Ads Library API collects the public data shown on Facebook Ads Library and returns it as structured JSON, with no approval process.

### Can I try the Facebook Ads Library API for free?

### What data can I get from the Facebook Ads Library API?

### Is it legal to scrape Facebook Ads Library data?

### How do I get started with the Facebook Ads Library API?

G2

4.7/5

[Excellent](https://www.trustpilot.com/review/scrape.ly)

[Trustpilot](https://www.trustpilot.com/review/scrape.ly)

## The internet is full of data. Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

[Get Started Free](https://my.scrape.ly/register) [Chat with Support](mailto:hello@scrape.ly?subject=Question%20about%20Scrape.ly\&body=Hi%2C%20I%20have%20a%20question%20about%20Scrape.ly.)

No credit card. No setup calls.
