# StableSocial Facebook Ad Library Search

> StableSocial Facebook Ad Library Search is a paid API for AI agents from stablesocial.dev, paid per call via x402, $0.06/call, status unknown (last checked 2026-09-16).

Search the Facebook Ad Library for ads by keyword, country, status, type, and media format with filtering and pagination support

## Facts

- Endpoint: POST https://stablesocial.dev/api/sc/facebook/adLibrary/search/ads
- Price: $0.06/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablesocial-facebook-ad-library-search-dabc720d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NQcHWCYIN8011A-rbGweg

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 stablesocial-facebook-ad-library-search-dabc720d -d '<json body>'
```

Example prompt: Search the Facebook Ad Library for all active ads mentioning 'climate change' in the US, sorted by total impressions, and include political and issue ads only — give me results from January 2024 to today.

## When to prefer this

Choose this endpoint when you need pay-per-request, no-subscription access to Facebook Ad Library data without managing Meta API credentials or OAuth flows. Ideal for agents doing competitive ad research, political ad monitoring, or brand tracking across countries without committing to a subscription. Prefer this over direct Meta API access when you need quick, authenticated-free queries with micropayment billing.

## Known failure modes

- Invalid or missing query string returns an error
- Country code not in valid 2-letter ISO format causes rejection
- Invalid date format (not YYYY-MM-DD) causes request failure
- Payment not included or insufficient USDC causes 402 response
- Invalid enum values for status, ad_type, media_type, or sort_by cause validation errors
- Empty result set returned when no ads match the query criteria
- Cursor expiration may cause pagination to fail on stale sessions

## How this service works

Pay-per-request access to social media data from TikTok, Instagram, Facebook, Reddit, and LinkedIn. No auth, no subscriptions.

## Output

Returns a list of Facebook ad records matching the search criteria, including ad creative details, impression ranges, active status, media type, advertiser info, and a pagination cursor for fetching additional results. If trim is set to true, returns a reduced version of each ad record.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "trim": {
   "type": "boolean",
   "description": "Set to true for a trimmed down version of the response"
  },
  "query": {
   "type": "string",
   "minLength": 1,
   "description": "Keyword to search for"
  },
  "cursor": {
   "type": "string",
   "description": "Cursor to paginate through results"
  },
  "status": {
   "enum": [
    "ALL",
    "ACTIVE",
    "INACTIVE"
   ],
   "type": "string",
   "description": "Status of the ad. Defaults to ACTIVE."
  },
  "ad_type": {
   "enum": [
    "all",
    "political_and_issue_ads"
   ],
   "type": "string",
   "description": "Search for all ads or only political and issue ads"
  },
  "country": {
   "type": "string",
   "description": "This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL."
  },
  "sort_by": {
   "enum": [
    "total_impressions",
    "relevancy_monthly_grouped"
   ],
   "type": "string",
   "description": "Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions."
  },
  "end_date": {
   "type": "string",
   "description": "Impressions end date. Needs to be in YYYY-MM-DD format."
  },
  "media_type": {
   "enum": [
    "ALL",
    "IMAGE",
    "VIDEO",
    "MEME",
    "IMAGE_AND_MEME",
    "NONE"
   ],
   "type": "string",
   "description": "Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme."
  },
  "start_date": {
   "type": "string",
   "description": "Impressions start date. Needs to be in YYYY-MM-DD format."
  },
  "search_type": {
   "enum": [
    "keyword_unordered",
    "keyword_exact_phrase"
   ],
   "type": "string",
   "description": "If you want to search by exact phrase or not"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablesocial-facebook-ad-library-search-dabc720d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablesocial.dev](https://www.zero.xyz/host/stablesocial.dev/llms.txt)
