Search the Meta Ad Library
facebook_ads_searchSearch the Meta Ad Library by keyword: 30 ads a page with country, status, media, category, language, placement and date filters.
Ads whose text matches q, 30 a page, by impressions (default) or most recent. The first page carries count, Meta’s estimate of all matches (capped at 50,001). Filters: country (default ALL), status (default active), media_type, ad_type (special categories), language, publisher_platforms, start_date/end_date (delivery window). Each ad: ad_archive_id, page_id/page_name, start_date/end_date (Unix seconds), publisher_platform, collation_count, and snapshot (text, title, link, CTA, images, videos, cards). For one advertiser’s ads use facebook_ads_company.
Cost: 2 credits per call, refunded automatically if the call fails. Read-only, public data only. Results include cost_credits and credits_remaining.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"q": "<q>"
},
"name": "facebook_ads_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Keyword or phrase. | |
| after | No | The previous page’s `page_info.end_cursor`; keep the other filters the same. | |
| status | No | active (default), inactive, or all. | |
| ad_type | No | all (default), or one of Meta’s special ad categories: political_and_issue_ads, housing, employment, credit, financial. | |
| country | No | ISO 3166-1 alpha-2 country the ads reached (US, GB, DE…), or ALL (default). | |
| sort_by | No | total_impressions (default, high to low), relevancy_monthly_grouped (most recent), or total_active_time (longest-running first, within each page of 30). | |
| end_date | No | YYYY-MM-DD: only ads delivered on or before this day. | |
| language | No | Comma-separated ISO 639-1 languages of the ad text (en,es). | |
| media_type | No | all (default), image, video, meme (image with text), image_and_meme, none (text only). | |
| start_date | No | YYYY-MM-DD: only ads delivered on or after this day. | |
| search_type | No | keyword_unordered (default: all the words, any order) or keyword_exact_phrase. | |
| publisher_platforms | No | Comma-separated placements: facebook, instagram, audience_network, messenger, whatsapp, threads, oculus. |