get_campaigns
Retrieve Meta Ads campaigns for a specific account with optional filters for status and pagination. Use this tool to access detailed campaign data and manage ad performance effectively.
Instructions
Get campaigns for a Meta Ads account with optional filtering.
Note: By default, the Meta API returns a subset of available fields.
Other fields like 'effective_status', 'special_ad_categories',
'lifetime_budget', 'spend_cap', 'budget_remaining', 'promoted_object',
'source_campaign_id', etc., might be available but require specifying them
in the API call (currently not exposed by this tool's parameters).
Args:
access_token: Meta API access token (optional - will use cached token if not provided)
account_id: Meta Ads account ID (format: act_XXXXXXXXX)
limit: Maximum number of campaigns to return (default: 10)
status_filter: Filter by effective status (e.g., 'ACTIVE', 'PAUSED', 'ARCHIVED').
Maps to the 'effective_status' API parameter, which expects an array
(this function handles the required JSON formatting). Leave empty for all statuses.
after: Pagination cursor to get the next set of results
Input Schema
Name | Required | Description | Default |
---|---|---|---|
access_token | No | ||
account_id | No | ||
after | No | ||
limit | No | ||
status_filter | No |
Input Schema (JSON Schema)
{
"properties": {
"access_token": {
"default": null,
"title": "Access Token",
"type": "string"
},
"account_id": {
"default": null,
"title": "Account Id",
"type": "string"
},
"after": {
"default": "",
"title": "After",
"type": "string"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
},
"status_filter": {
"default": "",
"title": "Status Filter",
"type": "string"
}
},
"title": "get_campaignsArguments",
"type": "object"
}