# Facebook Ad Library Search

> Facebook Ad Library Search is a paid API for AI agents from social.duoleads.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Searches the public Meta Ad Library by keyword and returns matching Facebook and Instagram ads with full creative and targeting details.

## Facts

- Endpoint: GET https://social.duoleads.com/v1/facebook/ads?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/facebook-ad-library-search-e09f1970
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D5DrSiZ9fcOjc1fjZC8pY

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-ad-library-search-e09f1970
```

Example prompt: Search the Meta Ad Library for active Facebook and Instagram ads about 'running shoes' and show me the ad text, landing URLs, and which brands are running them.

## When to prefer this

Use this endpoint when you need to search the Meta Ad Library by keyword across Facebook and Instagram ads — specifically for competitive ad research, monitoring what creatives competitors are running, finding landing page URLs from ads, or gathering ad copy inspiration. Prefer this over scraping Facebook directly since it handles pagination, returns structured data in a shared social schema, and only charges for successful matches.

## Known failure modes

- No ads found for the keyword returns an empty items array (not charged)
- Invalid or malformed query string returns a bad-input error (not charged)
- Expired or invalid cursor returns a pagination error
- Rate limiting or upstream Meta API unavailability may cause transient failures
- Very broad keywords may return many pages requiring multiple cursor-based calls

## How this service works

Facebook Ad Library Search: search the public Meta Ad Library by keyword for ads on Facebook and Instagram. Per ad the page name, ad text, active status, start and end dates, publisher platforms, call to action, landing link and media links in the shared social schema; next_cursor gives the next page. Competitor ad research. Bad input is free; not found or no match is not charged.

## Output

A JSON object containing a list of ad items, each with: ad ID, Facebook Ad Library URL, ad text, title, page name, author followers, active status, start/end dates, publisher platforms (FACEBOOK/INSTAGRAM), call-to-action text, landing URL, media image URLs, and language. Also includes the search query echo, a next_cursor for pagination, a request ID, and a disclaimer about data provenance. The 'complete' flag indicates whether all results fit in one page.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "description": "Search text (1-200 characters)."
      },
      "cursor": {
       "type": "string",
       "maxLength": 512,
       "description": "next_cursor of the previous page."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-10-15T12:00:00.000Z",
  "items": [
   {
    "ad": {
     "cta_text": "Shop now",
     "end_date": "2026-10-14T00:00:00.000Z",
     "link_url": "https://example.invalid/shoes",
     "is_active": true,
     "page_name": "Synthetic Shop",
     "start_date": "2026-10-13T00:00:00.000Z",
     "publisher_platforms": [
      "FACEBOOK",
      "INSTAGRAM"
     ]
    },
    "id": "1300000000000001",
    "url": "https://www.facebook.com/ads/library?id=1300000000000001",
    "lang": null,
    "text": "Synthetic shoes, 60% off this week only.",
    "type": "ad",
    "title": "Synthetic shoes",
    "author": {
     "handle": null,
     "verified": null,
     "followers": 7,
     "display_name": "Synthetic Shop"
    },
    "metrics": {
     "likes": null,
     "views": null,
     "replies": null,
     "reposts": null
    },
    "link_url": "https://example.invalid/shoes",
    "platform": "facebook",
    "parent_id": null,
    "created_at": "2026-10-13T00:00:00.000Z",
    "media_urls": [
     "https://scontent.xx.fbcdn.invalid/ad1.jpg"
    ]
   }
  ],
  "query": {
   "q": "synthetic shoes",
   "cursor": null
  },
  "source": "public data via third-party provider; not affiliated with the platform",
  "complete": true,
  "platform": "facebook",
  "disclaimer": "Public data via third-party providers; not affiliated with or endorsed by any platform. Do not use to profile, target or train AI on individuals.",
  "request_id": "01KEXAMPLE0000000000000000",
  "next_cursor": "AQHRsyntheticcursor"
 }
}
```

## More

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