facebook_ad_library_search
Search Meta Ad Library by keyword — active/inactive, media type, date range, platforms, cursor, and spend/impressions when Meta publishes them. Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Keyword, brand, or advertiser to search Meta Ad Library (min 2 characters). | |
| trim | No | When true, omit cards/images/videos typed arrays (media[] stays). Captapi payloads are already lean vs Meta nested snapshots. | |
| cache | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. | |
| limit | No | Max items to return (default 20, max 200). Flat 2 credits per call. | |
| cursor | No | Pagination cursor from a previous nextCursor. Pages through the current Meta HTML result batch. | |
| status | No | Ad delivery status: ACTIVE (default), INACTIVE, or ALL. Use ACTIVE for "what are they running now?". | |
| ad_type | No | all (default) or political_and_issue_ads. Spend/impressions are typically only filled for political/issue ads. | |
| country | No | Two-letter ISO country code (e.g. US, GB, DE). Default US. | |
| sort_by | No | Meta sort mode: total_impressions or relevancy_monthly_grouped. | |
| end_date | No | Only ads with delivery start on/before this date (YYYY-MM-DD). | |
| platforms | No | Comma-separated publisher platforms to keep: FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK, THREADS. | |
| media_type | No | Creative filter: ALL (default), IMAGE, VIDEO, MEME, IMAGE_AND_MEME, or NONE. | |
| start_date | No | Only ads with delivery start on/after this date (YYYY-MM-DD). | |
| search_type | No | keyword_unordered (default) or keyword_exact_phrase. |