# Apify Facebook Ads Library Scraper (via StableApify)

> Apify Facebook Ads Library Scraper (via StableApify) is a paid API for AI agents from stableapify.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Scrapes Facebook Ads Library for ads associated with specific pages or search URLs, returning structured ad data including creatives, targeting, and impressions.

## Facts

- Endpoint: POST https://stableapify.dev/api/actors/curious_coder/facebook-ads-library-scraper/call
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apify-facebook-ads-library-scraper-via-stableapify-52ed4ba0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PVawPs7hIZzYybDfU3K_G

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apify-facebook-ads-library-scraper-via-stableapify-52ed4ba0 -d '<json body>'
```

Example prompt: Scrape the last 30 days of active Facebook ads for Nike's page sorted by impressions in the US — get up to 50 ads and include EU reach details.

## When to prefer this

Use this endpoint when you need structured Facebook Ads Library data at scale, especially for competitive ad intelligence, brand monitoring, or market research. Prefer this over manual browsing when you need bulk data, filtering by country/date, or automated periodic scraping via an agent pipeline.

## Known failure modes

- Invalid or inaccessible Facebook URL returns empty results or scraping error
- Missing required fields (urls, period, activeStatus, sortBy, countryCode) causes schema validation failure
- Rate limiting or Facebook anti-bot measures may result in incomplete results
- Invalid country code returns no results or an error
- Payment failure over x402/MPP prevents the run from starting

## How this service works

Search Apify Store actors, start actor runs, and fetch results over x402 and MPP.

## Output

Returns a dataset of Facebook ads scraped from the Ads Library, including ad creatives, active/inactive status, impressions, date ranges, page name, country targeting, and optionally EU reach information. Each ad is a structured record with metadata fields.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "urls",
    "scrapePageAds.period",
    "scrapePageAds.activeStatus",
    "scrapePageAds.sortBy",
    "scrapePageAds.countryCode"
   ],
   "properties": {
    "urls": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "url"
      ],
      "properties": {
       "url": {
        "type": "string",
        "format": "uri"
       },
       "method": {
        "type": "string"
       },
       "headers": {
        "type": "object",
        "propertyNames": {
         "type": "string"
        },
        "additionalProperties": {
         "type": "string"
        }
       },
       "payload": {
        "type": "string"
       },
       "userData": {
        "type": "object",
        "propertyNames": {
         "type": "string"
        },
        "additionalProperties": {}
       }
      },
      "additionalProperties": false
     },
     "description": "List of facebook ads search URLs or Page URLs to scrape ads from"
    },
    "count": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": -9007199254740991,
     "description": "Leave this field empty if you want to limit number of ads scraped"
    },
    "proxy": {
     "type": "object",
     "properties": {
      "proxyUrls": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "useApifyProxy": {
       "type": "boolean"
      },
      "apifyProxyGroups": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "apifyProxyCountry": {
       "type": "string"
      }
     },
     "description": "You can use this option to customise the proxy country",
     "additionalProperties": {}
    },
    "runTag": {
     "type": "string",
     "description": "Add this value to 'runTag' column in the output"
    },
    "limitPerSource": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": -9007199254740991,
     "description": "Limit number of ads scraped per input URL. Leave it blank to scrape all available ads ℹ️ Actual number might exceed the given limit by upto 30"
    },
    "scrapeAdDetails": {
     "type": "boolean",
     "description": "Enable this option to scrape ads details such as EU Reach info"
    },
    "scrapePageAds.period": {
     "enum": [
      "",
      "last24h",
      "last7d",
      "last14d",
      "last30d"
     ],
     "type": "string",
     "defau
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apify-facebook-ads-library-scraper-via-stableapify-52ed4ba0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stableapify.dev](https://www.zero.xyz/host/stableapify.dev/llms.txt)
