Amazon Advertising • Analytics
compare_periods
Compare Time Periods
Compare performance between two date ranges, showing percent changes and trends. Compares metrics like sales, spend, ACOS, ROAS between current and previous periods.
Use Cases
Compare this week vs last week
Month-over-month analysis
Track performance trends
Identify improving/declining campaigns
Example Prompts
Try these natural language queries with your AI assistant:
Compare last week to the week before
How does this month compare to last month?
Show me campaigns that improved this week
Which keywords dropped in performance?
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| profile_id | string | Required | The profile ID (hash or number) |
| current_start | string | Required | Current period start date in YYYY-MM-DD format |
| current_end | string | Required | Current period end date in YYYY-MM-DD format |
| previous_start | string | Optional | Previous period start date (auto-calculated if not provided) |
| previous_end | string | Optional | Previous period end date (auto-calculated if not provided) |
| group_by | string | Optional | How to group comparison: overall, campaign, keyword |
| limit | number | Optional | Number of results for grouped comparisons (default: 20) |
| sort_by | string | Optional | Metric to sort by: sales, spend, acos, roas, clicks, impressions, conversions |
Returns
Response
Comparison data with current values, previous values, and percent changes