# agdata Meta Ad Library API

> agdata Meta Ad Library API is a paid API for AI agents from agdata.shveik.dev, paid per call via x402, $0.03775/call, status unknown (last checked 2026-10-17).

Fetches public Meta (Facebook/Instagram) ads for a given advertiser or keyword, returning structured ad data for competitor research.

## Facts

- Endpoint: POST https://agdata.shveik.dev/x402/meta-ads?utm_source=zero.xyz
- Price: $0.03775/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agdata-meta-ad-library-api-00ecfa34
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oWjP_slRF3rPfyEe5TsDx

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 agdata-meta-ad-library-api-00ecfa34 -d '<json body>'
```

Example prompt: Pull up to 50 active Meta ads from Nike's Facebook page — I want to see the ad text, titles, call to action, links, image URLs, and which platforms they're running on, filtered to the US.

## When to prefer this

Choose this endpoint when you need structured, machine-readable Meta ad data (Facebook/Instagram) for a specific advertiser or keyword, especially for competitor research, ad creative analysis, or monitoring brand activity. It is preferable to manual Meta Ad Library browsing or scraping, as it returns clean JSON with all key ad attributes. Use it when you need to filter by country or active-only ads and want pay-per-call pricing with no wasted spend on empty results.

## Known failure modes

- No ads found for query — returns empty result and no charge
- Invalid page name or page ID — returns error with no charge
- Country code not recognized — returns validation error
- Both keyword and page omitted — returns error, no charge
- Rate limiting or Meta API unavailability — may return 5xx error
- Limit exceeds 100 — rejected by schema validation

## How this service works

Meta ad library API for AI agents, for competitor research: send a keyword or an advertiser (name or page id) and get its public ads as JSON: advertiser, start and end date, whether it is still running, platforms, text, title, call to action, link, format and image URLs. Filter by country and by active or all ads; up to 100 per call, each ad once. Pay per call in stablecoins; an empty search is not charged and ads you paid for but did not get are refunded.

## Output

A JSON array of up to 100 ads, each containing: advertiser name, ad start and end dates, whether the ad is still active, platforms it ran on (Facebook/Instagram/etc.), ad text body, title, call-to-action label, destination link, ad format, and image URLs. Empty searches are not billed; any ads paid for but not returned are refunded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "page": {
   "type": "string",
   "maxLength": 100,
   "minLength": 2
  },
  "limit": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1
  },
  "active": {
   "type": "boolean"
  },
  "country": {
   "type": "string"
  },
  "keyword": {
   "type": "string",
   "maxLength": 100,
   "minLength": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agdata-meta-ad-library-api-00ecfa34/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agdata.shveik.dev](https://www.zero.xyz/host/agdata.shveik.dev/llms.txt)
