# Apify Facebook Ads Scraper (via StableApify)

> Apify Facebook Ads 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/Meta Ad Library ads for given page or brand URLs, returning structured ad data including active/inactive status, audience details, and page info.

## Facts

- Endpoint: POST https://stableapify.dev/api/actors/apify/facebook-ads-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-scraper-via-stableapify-0a70530c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZIH03Dk5oWF2-JVb5SKEk

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-scraper-via-stableapify-0a70530c -d '<json body>'
```

Example prompt: Can you scrape all active Facebook ads from Coca-Cola's Meta Ad Library page at https://www.facebook.com/ads/library/?id=cocacola and give me the audience details for each ad, up to 500 results?

## When to prefer this

Choose this endpoint when you need structured Facebook/Meta Ad Library data for one or more brand pages, especially for competitive intelligence, ad monitoring, or marketing research. It is ideal when you want to programmatically access ad creatives, audience details, or historical/inactive ads that are publicly visible on the Meta Ad Library. Prefer this over manual browsing or generic web scrapers because it returns normalized, structured data and supports bulk URL inputs with fine-grained filters.

## Known failure modes

- Invalid or inaccessible Facebook/Meta Ad Library URL returns an error or empty dataset
- Rate limiting or bot detection by Facebook may cause incomplete results
- Payment failure (insufficient USDC balance for x402) blocks the call
- Actor run timeout if resultsLimit is very large or pages have many ads
- Missing required fields (startUrls or activeStatus) causes validation error
- Private or removed pages return no results

## How this service works

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

## Output

A dataset of structured Facebook ad records including ad creative details, active/inactive status, optional per-ad audience targeting information, and optional advertiser about-page data. If onlyTotal is set, returns a single item with the total ad count per page.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "startUrls",
    "activeStatus"
   ],
   "properties": {
    "onlyTotal": {
     "type": "boolean",
     "description": "If checked, you will scrape only the total count of ads. The output will be saved as a single dataset item per page."
    },
    "startUrls": {
     "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": "Add a URL of a Facebook Page or brand URL from Meta Ad Library. You can add multiple URLs using the Bulk edit option."
    },
    "activeStatus": {
     "enum": [
      "",
      "active",
      "inactive"
     ],
     "type": "string",
     "default": "",
     "description": "Select active status for ads"
    },
    "resultsLimit": {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": 1,
     "description": "⚠️ If you leave this field empty, you will get as many results as possible."
    },
    "isDetailsPerAd": {
     "type": "boolean",
     "description": "If checked, you will scrape extra audience details scraped for each ad."
    },
    "includeAboutPage": {
     "type": "boolean",
     "description": "If checked, the scraper will extract the about page information for all unique pages or urls."
    }
   },
   "description": "Normalized actor input. See field descriptions for the simplified shape; native Apify input also accepted (passed through).",
   "additionalProperties": {}
  },
  "options": {
   "type": "object",
   "properties": {
    "build": {
     "type": "string",
     "maxLength": 100,
     "minLength": 1
    },
    "memory": {
     "type": "integer",
     "maximum": 32768,
     "minimum": 128
    },
    "maxItems": {
     "type": "integer",
     "maximum": 100000,
     "minimum": 1
    }
   },
   "description": "Optional Apify run options.",
   "addi
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apify-facebook-ads-scraper-via-stableapify-0a70530c/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)
