# Facebook Ads Scraper (x402)

> Facebook Ads Scraper (x402) is a paid API for AI agents from x402.186-241-26-229.sslip.io, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Scrapes structured ad data from Facebook's Ad Library for given page URLs or Ad Library search URLs, returning up to 30 ads per URL.

## Facts

- Endpoint: POST https://x402.186-241-26-229.sslip.io/v1/facebook-ads?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/facebook-ads-scraper-x402-436671d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y3jRK1wYeu_Ag_pxqRDzu

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 facebook-ads-scraper-x402-436671d7 -d '<json body>'
```

Example prompt: Pull the latest 30 active Facebook ads from Nike's public page (https://www.facebook.com/nike) in the US and give me the structured ad data including page info and archive IDs.

## When to prefer this

Choose this endpoint when you need structured, pay-per-result Facebook Ad Library data without managing scrapers or browser automation yourself. It's ideal for competitive ad intelligence, agency research, and market analysis workflows where you want clean JSON output from public Facebook pages or Ad Library search URLs. Failed or empty runs are not billed, making it low-risk for exploratory queries. Prefer alternatives if you need authenticated pagination beyond 30 ads per page or private/unpublished ad data.

## Known failure modes

- Empty result (no ads found) — not charged; returns count: 0 and empty items array
- Invalid or private Facebook page URL — may return empty or null fields
- Rate limiting or Facebook blocking — scraper may return fewer results than requested
- resultsLimit capped at 30 — public Ad Library does not expose more without authenticated pagination
- Incorrect country code — falls back to ALL if unrecognized
- URL with conflicting filters — URL parameters take priority over API-level country/activeStatus settings

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count of ads found, a product identifier ('facebook-ads'), and an array of ad items each containing: adUrl, pageId, pageUrl, inputUrl, pageName, adArchiveId, pageCategories, and pageProfilePictureUrl. Fields may be null if not available from the public Ad Library.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "country": {
   "type": "string",
   "default": "ALL",
   "description": "Country code such as US or GB, or ALL. Used only when the URL has no country parameter."
  },
  "maxItems": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Maximum ads across every URL. Set 0 for no overall cap."
  },
  "startUrls": {
   "type": "array",
   "description": "Public Facebook page URLs, Ad Library search URLs, page-filter URLs, or individual ad URLs. Search URLs preserve their country, media, platform, and other URL filters."
  },
  "activeStatus": {
   "enum": [
    "all",
    "active",
    "inactive"
   ],
   "type": "string",
   "default": "all",
   "description": "Used when the URL has no active_status parameter. An existing URL setting takes priority."
  },
  "resultsLimit": {
   "type": "integer",
   "default": 30,
   "maximum": 30,
   "minimum": 1,
   "description": "Maximum ads to save for each URL. The public page currently exposes at most 30 without authenticated pagination."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "adUrl": null,
    "pageId": null,
    "pageUrl": null,
    "inputUrl": null,
    "pageName": null,
    "adArchiveId": null,
    "pageCategories": null,
    "pageProfilePictureUrl": null
   }
  ],
  "product": "facebook-ads"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/facebook-ads-scraper-x402-436671d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.186-241-26-229.sslip.io](https://www.zero.xyz/host/x402.186-241-26-229.sslip.io/llms.txt)
