Query advertising campaigns
query_advertising_campaignsReturns advertising campaign performance or daily campaign performance. Summary reports support standardized campaign attribute and aggregated metric filters. When the user specifies any supported attribute or metric condition, pass it through filters in the first call; do not retrieve unfiltered pages and filter locally. Paginate only the filtered result. Always retain and present each campaign's current budget from budget.currencyAmount with budget.currencyCode. For budget changes, show current budget -> planned budget before requesting confirmation. Results can proceed to AD_CAMPAIGN_CHANGE for customer-confirmed daily-budget, ENABLED/PAUSED state, or name changes, and Sponsored Products, Sponsored Display, or Sponsored Brands campaigns can proceed to AD_AD_GROUP_CREATE. MCP reporting and workflow metric date ranges use yyyy-MM-dd and include both startDate and endDate, with at most 95 calendar days per range. For longer read-only reports, split into non-overlapping windows: endDate = startDate plus 94 days, capped at the requested end date; the next startDate is the previous endDate plus 1 day. Apply the same limit independently to comparison ranges. Do not average ratios such as ACOS or ROAS across windows; recompute them from summed base metrics. Do not automatically split advertising write plans or metric-based selectors; obtain a supported analysis window from the user. Keyword ranking trends have separate limits: DAILY supports up to 90 inclusive days and RAW up to 31 inclusive days. For keyword ranking trends, use these interval-specific limits when splitting read-only reports. This reporting limit does not apply to campaign scheduling dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of items to return. Defaults to 100 and cannot exceed 100. | |
| offset | No | Zero-based pagination offset. | |
| sortBy | No | Advertising performance sort field. | |
| states | No | Comma-separated campaign state filters. Allowed values are enabled, paused, and archived. | |
| endDate | Yes | End business date in yyyy-MM-dd format. Date range is inclusive and can contain at most 95 days. For longer read-only reports, use non-overlapping windows of up to 95 days. | |
| filters | No | Server-side campaign filters. When the user supplies a supported condition, use this object in the first request instead of scanning unfiltered pages. Paginate only if the filtered response has more results. | |
| storeId | Yes | Store ID from the Stores API, formatted as sellerId:marketplaceId. | |
| sortOrder | No | Sort order. | |
| startDate | Yes | Start business date in yyyy-MM-dd format. Date range is inclusive and can contain at most 95 days. For longer read-only reports, use non-overlapping windows of up to 95 days. | |
| reportType | No | Report type. | |
| campaignIds | No | Comma-separated campaign ID filters, up to 100 values. Omit to include all campaigns. | |
| campaignName | No | Fuzzy campaign name filter. | |
| portfolioIds | No | Portfolio IDs limiting the campaigns. | |
| campaignTypes | No | Comma-separated campaign type filters. Allowed values are sponsoredProducts, sponsoredBrands, and sponsoredDisplay. | |
| targetingTypes | No | Comma-separated targeting type filters. Allowed values are auto and manual. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||