# Facebook Ad Search

Search the Meta Ad Library by keyword and get matching ads (advertiser, creative text, CTA, platforms, and run dates) with cursor pagination.

|  |  |
| --- | --- |
| Tool id | `anyapi.facebook-ads-search` |
| Platform | [Facebook](https://www.orcarouter.ai/tools/facebook.md) |
| Capability | [Ads](https://www.orcarouter.ai/tools/facebook/ads-search.md) |
| Price | $0.00121 per call |
| Health | OK |
| p50 latency | — |
| Success (7 days) | — |
| Runs (30 days) | 25 |
| Idempotent | no |
| Data class | scraped |

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Keyword to search the Meta Ad Library for (e.g. "protein powder"). |
| `adType` | string | no | Restrict to all ads (default) or only political and issue ads. |
| `country` | string | no | Two-letter country code to scope results. Omit for all countries. |
| `cursor` | string | no | Opaque pagination cursor from a previous response's nextCursor. |
| `endDate` | string | no | Filter to ads with impressions on or before this date, in YYYY-MM-DD format. |
| `mediaType` | string | no | Creative media type filter. |
| `searchType` | string | no | Match mode for the query: loose keyword match (keyword_unordered, the default) or exact phrase (keyword_exact_phrase). |
| `sortBy` | string | no | Sort order: impressions (highest first, the default) or recent (most recent). |
| `startDate` | string | no | Filter to ads with impressions on or after this date, in YYYY-MM-DD format. |
| `status` | string | no | Ad status filter. |

## Call it

```bash
curl -sS https://api.orcarouter.ai/v1/tools/anyapi.facebook-ads-search/run \
  -H "Authorization: Bearer $ORCAROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"<query>"}}'
```

```python
import os, requests

resp = requests.post(
    "https://api.orcarouter.ai/v1/tools/anyapi.facebook-ads-search/run",
    headers={"Authorization": f"Bearer {os.environ['ORCAROUTER_API_KEY']}"},
    json={"input":{"query":"<query>"}},
)
print(resp.json())
```

## Alternatives

| Tool | Source | Price | Health |
| --- | --- | --- | --- |
| [Facebook Company Ads](https://www.orcarouter.ai/tools/facebook/ads-search/facebook-company-ads.md) | — | $0.00121 per call | OK |
| [Facebook Ad Details](https://www.orcarouter.ai/tools/facebook/ads-search/facebook-ad-details.md) | — | $0.00132 per call | OK |
| [Facebook Ad Transcript](https://www.orcarouter.ai/tools/facebook/ads-search/facebook-ad-transcript.md) | — | $0.00132 per call | OK |
| [Facebook Ad Creative Details](https://www.orcarouter.ai/tools/facebook/ads-search/facebook-ad-details-full.md) | — | $0.005082 per call | OK |

## FAQ

### How much does Facebook Ad Search cost?

Facebook Ad Search costs $0.00121 per call: 1,000 calls cost $1.21.

### What does a $10 budget buy with Facebook Ad Search?

About 8264 calls at $0.00121 per call.

### What inputs does Facebook Ad Search need?

Required inputs: query.

### How do I call Facebook Ad Search?

Send POST /v1/tools/{id}/run with your OrcaRouter API key and a JSON body {"input": {…}}, where {id} is the tool id POST /v1/tools/discover returns for it.

---

Markdown version of https://www.orcarouter.ai/tools/facebook/ads-search/facebook-ads-search
