List Ads
adsap_list_adsList ALL ads inside an ad set or a campaign, live from Meta, including ads created today that have no delivery yet (which insights-based views miss). Pass exactly ONE of ad_set_id or campaign_id. Returns each ad's id, name, status, effective_status, created_time and creative id. Use this to enumerate ads before duplicating an ad set, auditing what exists, or picking an ad_id for adsap_get_ad / adsap_get_ad_status / adsap_replace_ad_creative. Deleted/archived ads are excluded unless you ask for them via effective_status. FIND ADS BY THEIR TEXT: pass text to get only the ads whose primary texts, headlines or descriptions contain that phrase, every variant included (carousel cards and Flexible ads too). Each ad comes back with text_matches (the field, the card number for a carousel card, and the full text) and current_texts: its complete primary_texts, headlines and descriptions, exactly as adsap_replace_ad_creative takes them. To change a text, send those complete lists with the edit applied (dry_run true first): no adsap_get_ad call is needed. A match that is not in current_texts (a carousel card, a Flexible ad, a catalog ad, an ad made from an existing post) cannot be changed with adsap_replace_ad_creative; say so. Upper and lower case are ignored, and line breaks or repeated spaces count as one space; emojis, punctuation and digits must match exactly. One call searches up to 500 ads; when meta.has_next is true, pass meta.paging_after as after with the same text to search the rest. Ads whose text Meta does not return are listed in meta.not_searchable. On catalog ads the headline is usually Meta's {{product.name}} placeholder, so a product name never matches. Use text instead of one adsap_get_ad per ad, for example to find every ad that still says an old offer before changing it. To change the same text in several ads, use adsap_replace_ad_text: it searches, previews every ad and applies in a few calls.
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": {
"ad_account_id": "<ad_account_id>"
},
"name": "adsap_list_ads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Optional phrase to search for in the ads' primary texts, headlines and descriptions (all variants). Only the ads that contain it are returned, each with the matching texts and its complete current texts. Case is ignored; emojis and punctuation must match exactly. | |
| after | No | Pagination cursor from a previous response's meta.paging_after, to fetch the next page. | |
| limit | No | Without text: max ads to return per page. Default 50, max 100. With text: the search stops after the page of 100 ads on which it has found at least this many matching ads (default 50). | |
| ad_set_id | No | Ad set ID (numeric) to list the ads of. Pass exactly one of ad_set_id or campaign_id. | |
| campaign_id | No | Campaign ID (numeric) to list the ads of (across all its ad sets). Pass exactly one of ad_set_id or campaign_id. | |
| ad_account_id | Yes | Ad account ID (act_xxx) the ad set or campaign belongs to. Required. Scopes the request and anchors the Meta budget check. | |
| effective_status | No | Optional server-side filter on effective_status. Common values: ACTIVE, PAUSED, ADSET_PAUSED, CAMPAIGN_PAUSED, PENDING_REVIEW, DISAPPROVED, WITH_ISSUES, IN_PROCESS, ARCHIVED, DELETED. Omit to get every non-deleted ad (Meta's default excludes DELETED and ARCHIVED). |