# AnyAPI Facebook Ads Library Scraper

> AnyAPI Facebook Ads Library Scraper is a paid API for AI agents from api.getanyapi.com, paid per call via x402, $0.0225/call, status unknown (last checked 2026-09-14).

Scrapes Facebook Ads Library to retrieve active and historical ad data for a given advertiser or search query

## Facts

- Endpoint: POST https://api.getanyapi.com/v1/run/facebook.ads_library
- Price: $0.0225/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/anyapi-facebook-ads-library-scraper-e8b19336
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D_eLGu9V9GpcyF2RB35Fo

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 anyapi-facebook-ads-library-scraper-e8b19336 -d '<json body>'
```

Example prompt: Pull all active Facebook ads from the Meta Ads Library for Nike in the United States and show me their ad creatives and copy.

## When to prefer this

Choose this endpoint when you need programmatic access to Facebook/Meta Ads Library data — especially for competitive ad research, creative intelligence, or monitoring what ads a brand is running — without managing your own scraper or dealing with Meta's restrictive official API. Best for one-off or pay-per-use queries where a subscription-based ad intelligence tool is overkill.

## Known failure modes

- Advertiser name or page ID not found — returns empty results or error
- Facebook Ads Library access restrictions for certain ad categories (e.g. political ads) may limit data
- Rate limiting or scraping blocks from Meta may cause failed or incomplete responses
- Invalid country code or unsupported filter parameters may return errors
- Service downtime or upstream scraping failure returns non-200 response

## How this service works

1,200+ scraping and data APIs behind one key. Pay per request in real dollars. No subscriptions, nothing monthly, nothing to cancel.

## Output

Returns a JSON payload containing a list of ads from the Facebook Ads Library matching the query, including ad creative details, ad copy, advertiser information, active/inactive status, estimated reach, spend range, and dates the ads started and stopped running.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "Yelp search input",
 "example": {
  "limit": 5,
  "query": "pizza",
  "location": "Chicago, IL"
 },
 "required": [
  "query",
  "location"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "maximum": 20,
   "minimum": 1,
   "description": "Maximum number of results to return (1 to 20, default 20)."
  },
  "query": {
   "type": "string",
   "description": "Search term or category to look for (e.g. sushi)."
  },
  "location": {
   "type": "string",
   "description": "City and state defining the search area (e.g. San Francisco, CA)."
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/anyapi-facebook-ads-library-scraper-e8b19336/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.getanyapi.com](https://www.zero.xyz/host/api.getanyapi.com/llms.txt)
