
Linkfox Amazon Ads Report
- 250 installs
- 64 repo stars
- Updated August 3, 2026
- linkfox-ai/linkfox-skills
Pull and interpret Amazon Ads performance reports for LinkFox users to track spend, ACOS, campaigns, and optimization opportunities.
About
Fetches and summarizes Amazon Ads reporting data for LinkFox ecommerce users, translating campaign metrics into actionable spend, performance, and optimization views after auth is in place.
- Amazon Ads report retrieval
- Campaign performance metrics
- Spend and ACOS tracking
- Seller optimization insight
- linkfox-ai/linkfox-skills reporting
Linkfox Amazon Ads Report by the numbers
- 250 all-time installs (skills.sh)
- +38 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #267 of 853 Sales & Marketing skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/linkfox-ai/linkfox-skills --skill linkfox-amazon-ads-reportAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 250 |
|---|---|
| repo stars | ★ 64 |
| Last updated | August 3, 2026 |
| Repository | linkfox-ai/linkfox-skills ↗ |
What it does
Pull and interpret Amazon Ads performance reports for LinkFox users to track spend, ACOS, campaigns, and optimization opportunities.
Files
Amazon Ads 报告获取
报告一站式获取:脚本自动完成报告的创建、等待(约 2–10 分钟)、下载和解压,直接返回可读的结构化数据。 脚本本身不做"该选哪些列 / 该怎么分组"的业务判断,这些由 agent 先查 references/report-types/ 下对应的 .md 文件,再显式传给脚本。
依赖 `linkfox-amazon-ads-auth`(脚本启动自动检查;未安装时 exit 42,stderr 打 DEPENDENCY_MISSING)。
⚠️ 多账号场景:调用前必须解析好 profileId
用户经常只说自然语言("美国站"、"日本站"、"我的店铺"),本 skill 的所有脚本都必须拿到数字 profileId 才能调。按下列顺序处理,不要跳过:
1. 先调 linkfox-amazon-ads-auth 的 authorized_stores.py 拉出用户已授权的账号 × 站点清单。 2. 根据用户提到的站点(映射到 countryCode,如 美国→US)匹配候选 profile:
- 只有 1 个候选 → 静默取对应 profileId,继续调用;不要把 profileId 数字播报给用户。
- ≥ 2 个候选(同站点下多个授权账号) → 必须向用户澄清,用
accountName问:"你在美国站授权了 A 和 B 两个账号,这次用哪个?" - 0 个候选 → 告知用户该站点未授权,引导去
linkfox-amazon-ads-auth做授权。
3. 严禁让用户直接报 profileId 数字。 4. 严禁在歧义下"挑第一个"或"选默认"绕过澄清。
完整决策表见 linkfox-amazon-ads-auth SKILL.md 的 Usage Scenarios 第 4 节。
Core Concepts
- 覆盖:SP / SB / SD 全部报告类型(以
references/report-types/下存在的.md为准;ST / DSP 暂未覆盖) - 一站式:脚本内部自动完成报告创建 → 等待生成(约 2–10 分钟)→ 下载 → 解压,调用方只需等最终结果
- 单脚本:
get_report.py(覆盖 SP / SB 全部 adProduct) - 元数据 vs. 运行参数:
- 每个报告类型的可用字段(timeUnit / groupBy / filters / 全部列名)集中在
references/report-types/<adProduct-dir>/<reportTypeId>.md - 脚本运行参数(等待间隔、访问链接时效等)见本文件和
references/api.md
可用脚本
| 脚本 | 职责 |
|---|---|
get_report.py ⭐ | 一站式执行。必填 adProduct / groupBy / columns,由 agent 从 report-types/ 提取后传入 |
check_auth_dependency.py | 检测 linkfox-amazon-ads-auth 是否安装 |
完整脚本参数、响应结构见 references/api.md。
Agent 调用流程
Agent 触达"拉取亚马逊广告报告"类需求时,必须按下列顺序:
1. 定 reportTypeId:按用户意图挑选(如"上周花费"→ spCampaigns;"哪个商品卖得好"→ spAdvertisedProduct / sbPurchasedProduct;"用户搜什么词找到我"→ spSearchTerm) 2. 查 reference:打开 references/report-types/<adProduct-dir>/<reportTypeId>.md
- frontmatter 给出:
adProduct/groupBy(Configuration 表推荐的) /timeUnit(可枚举) /format/dateRange/filters - Base metrics 表 给出:此报告类型允许的全部列名
3. 向用户咨询可定制条件(用户答"默认/随便"时跳过,进入第 4 步的默认选择):
timeUnit:DAILY(按日拆分)还是 SUMMARY(汇总)columns扩展:是否要归因列(sales7d / purchases7d / acosClicks7d / roasClicks7d)、视频指标、newToBrand 等filters:是否过滤 campaignStatus / keywordType / adStatus 等
4. 按用户回复或默认构造 columns(见下节 "默认条件") 5. 调脚本:adProduct / groupBy / columns 三个必填字段显式传入
默认条件(用户未指定时使用)
| 条件 | 默认规则 |
|---|---|
timeUnit | 日期跨度 ≤ 7 天 → DAILY;> 7 天 → SUMMARY |
columns 身份维度 | DAILY 时必含 date;SUMMARY 时必含 startDate + endDate;再追加该报告的主键字段(参考 frontmatter 中 groupBy 对应的主键,如 campaignId+campaignName / advertisedAsin+advertisedSku / searchTerm / keyword 等) |
columns 基础指标 | impressions / clicks / cost(以该报告 Base metrics 存在的为准) |
columns 归因指标 | 仅当用户提到"销售/转化/ROI/ACOS"等意图时追加:sales7d / purchases7d / acosClicks7d / roasClicks7d(以 Base metrics 存在者为准) |
filters | 不加(全量返回) |
groupBy | 取 frontmatter groupBy 数组的第一个值(即 Configuration 表里 Amazon 官方推荐的主维度) |
请求示例
所有 example 都显式传入三个必填字段(adProduct / groupBy / columns)。
1. SP 广告活动报告(最常见)
python scripts/get_report.py '{
"profileId": 1234567890, "region": "NA",
"reportTypeId": "spCampaigns",
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": ["campaign"],
"columns": ["date","campaignId","campaignName","impressions","clicks","cost"],
"startDate": "2026-04-27","endDate": "2026-05-03",
"timeUnit": "DAILY"
}'2. SP 搜索词报告(含归因)
python scripts/get_report.py '{
"profileId": 1234567890, "region": "NA",
"reportTypeId": "spSearchTerm",
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": ["searchTerm"],
"columns": ["searchTerm","keyword","matchType","impressions","clicks","cost",
"sales7d","sales14d","purchases7d","acosClicks14d","roasClicks14d",
"startDate","endDate"],
"startDate": "2026-04-01","endDate": "2026-04-30",
"timeUnit": "SUMMARY",
"filters": [{"field":"keywordType","values":["BROAD","PHRASE","EXACT"]}]
}'3. SB 广告组报告
python scripts/get_report.py '{
"profileId": 1234567890, "region": "NA",
"reportTypeId": "sbAdGroup",
"adProduct": "SPONSORED_BRANDS",
"groupBy": ["adGroup"],
"columns": ["adGroupId","adGroupName","impressions","clicks","cost","purchases","sales","startDate","endDate"],
"startDate": "2026-04-01","endDate": "2026-04-30"
}'4. SD 广告活动报告
python scripts/get_report.py '{
"profileId": 1234567890, "region": "NA",
"reportTypeId": "sdCampaigns",
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["campaign"],
"columns": ["date","campaignId","campaignName","impressions","clicks","cost","purchases","sales"],
"startDate": "2026-04-27","endDate": "2026-05-03",
"timeUnit": "DAILY"
}'5. 轮询一个已有 reportId(救回上次超时 / 手工恢复)
当上次运行因为客户端轮询窗口太短退出、但报告在 Amazon 侧仍在跑时,直接传入 reportId 即可跳过创建,继续轮询并下载。此模式下只需 profileId / region / reportId,其余字段不必填。
python scripts/get_report.py '{
"profileId": 1234567890, "region": "NA",
"reportId": "7df1ef5d-45ba-40cc-b607-ff2148cf4f5e",
"maxAttempts": 60, "pollInterval": 30
}'自动恢复:如果调用方未传reportId、且 Amazon 对同参数请求触发去重(返回 HTTP 425The Request is a duplicate of : <uuid>),脚本会自动解析出老 reportId 并转为轮询该老报告,无需重试。
响应格式
成功:
{
"success": true,
"reportId": "4ee811a0-...",
"reportTypeId": "spCampaigns",
"startDate": "2026-04-28", "endDate": "2026-05-04",
"downloadPath": "C:/.../tmp/report_data.json",
"extractedFileHttpUrl": "http://127.0.0.1:51234/download",
"extractedFileHttpServeSeconds": 300
}失败:
{"error":"Upstream HTTP 400","httpStatus":400,
"body":"{\"code\":\"400\",\"detail\":\"startDate to endDate range (32 days) must not exceed maximum range (31 days)\"}"}调用原则
- 用户指定了 reportTypeId 就只拉那一种,不擅自替换
- 报告失败(非 2xx 或 status=FAILED)时如实告知错误原因,不盲目重试
- 成功后把报告的本地文件路径和访问链接完整展示给用户,并提醒访问链接有时效(默认 5 分钟内有效,过期需重新拉取)
- 超时不是失败:当脚本返回
status=STILL_PROCESSING(exit code=2),说明客户端已等满默认 10 分钟但报告仍在 Amazon 侧生成。此时 必须向用户说明情况并询问是否继续等待,绝不能当成失败处理。参考回复:"报告还在 Amazon 侧生成中(已等 10 分钟),要继续等吗?可以选:A. 再等 ~20 分钟(maxAttempts=60)、B. 再等 ~1 小时(maxAttempts=120)、C. 先停,我稍后用 reportId 回来。" 用户选 A/B → 用resumeHint.params切到仅轮询模式续跑
常见错误
| 状态 | 含义 | 建议 |
|---|---|---|
Missing required parameters: adProduct/groupBy/columns | 调用方未显式传入三必填 | 回到 "Agent 调用流程" 第 2 步,从 references/report-types/<adProduct-dir>/<reportTypeId>.md 读出并补上 |
HTTP 401 | accessToken 过期 | 调 ads-auth 的 refresh_token.py 后重试 |
HTTP 403 | 未关联广告账户或权限不足 | 到 Amazon Ads 后台检查经理账户/广告账户关联 |
HTTP 400 "must not exceed maximum range" | 日期跨度超限(多数 31 天) | 拆分拉取后本地合并;具体上限看对应 .md frontmatter dateRange.maxSpanDays |
HTTP 400 含 columns/groupBy 校验错 | 列名拼写错 / 与 reportTypeId 不匹配 / 超出 Base metrics | 对照 .md 文件 Base metrics 表核对 |
status=FAILED 含 failureReason | 上游生成失败 | 多为日期窗口或权限问题,按 failureReason 具体处理 |
status=STILL_PROCESSING (exit 2) | 客户端轮询窗口耗尽但报告仍在生成 | 不是失败。stdout 已含 reportId 与 resumeHint.params。询问用户是否继续等,用该 params(带 reportId + 更大 maxAttempts)切到仅轮询模式续跑 |
HTTP 425 "duplicate of" | 同参数已有在跑的报告 | 脚本自动解析并转为轮询该老 reportId,正常情况下调用方无需干预 |
| exit 42 | 依赖 skill 未安装 | 先装 linkfox-amazon-ads-auth |
日期与数据
- 日期跨度上限:多数报告 31 天;
sbPurchasedProduct是 731 天;spGrossAndInvalids/sbGrossAndInvalids/sdGrossAndInvalids是 365 天(以 frontmatter 为准) - 回溯窗口:SP 默认 95 天、SB 60 天、GrossAndInvalids 365 天;具体以 frontmatter
dateRange.dataRetentionDays为准 - 数据延迟约 12 小时;
endDate >= 今天脚本 stderr 警告但不拦截 - 空数据不等于报错:账号当期无投放时报告会成功生成,JSON 可能为
[]或指标全 0
Not Applicable
- Brand Analytics / Retail Analytics / Attribution 报告 → 不在本 skill
- 报告删除 / 修改 / 定时任务 → 不在本 skill
- 实体元数据(campaign 名、keyword 匹配类型等)→
linkfox-amazon-ads-manager - 授权 / token →
linkfox-amazon-ads-auth
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply: 1. The functionality or purpose described in this skill does not match actual behavior 2. The skill's results do not match the user's intent 3. The user expresses dissatisfaction or praise about this skill 4. Anything you believe could be improved
Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.
<!-- LF_LARGE_RESPONSE_BLOCK -->
Handling Large Responses
To avoid overflowing the agent context, persist the response to disk and extract only the fields you need:
python scripts/response_io.py run --script scripts/check_auth_dependency.py --out-dir <DIR> '<params>'
python scripts/response_io.py read <file> --fields "<paths>" # or --path "<JMESPath>"Pick--out-diroutside any git working tree (e.g./tmp/...on Unix,%TEMP%/...on Windows). Persisted responses may contain PII, pricing, or auth-sensitive data — do not commit them. Files are not auto-deleted; clean up when the task is done.
This skill exposes multiple entry scripts:check_auth_dependency.py,get_report.py. Pass--script scripts/<name>.pyto choose the one you need.
run writes the full response to a file and emits only a schema preview + file path. read projects specific fields, with --limit/--offset for slicing and --format json|jsonl|csv|table for output.
When to prefer this pattern — apply your judgment based on the response characteristics, e.g.:
- High field count per record, or fields you don't need
- Batch/paginated results (multiple items per call)
- Long-text fields (descriptions, reviews, HTML, time series)
- Output reused across later steps rather than consumed immediately
For small, single-use responses, calling the main script directly is fine.
⚠️ The preview is a truncated schema + sample, not the full data. Any field-level decision must read from the persisted file via read. <!-- /LF_LARGE_RESPONSE_BLOCK -->
--- For more high-quality, professional cross-border e-commerce skills, visit [LinkFox Skills](https://skill.linkfox.com/).
linkfox-amazon-ads-report — 参数与字段参考
Amazon Ads 报告自动化获取(SP / SB 覆盖;SD / ST / DSP 暂未覆盖)。授权见 linkfox-amazon-ads-auth;广告管理见 linkfox-amazon-ads-manager。
📌 报告类型的真相源:每个reportTypeId的完整规格(可用 columns / groupBy / filters / timeUnit / 日期约束 / 官方示例)在references/report-types/<adProduct-dir>/<reportTypeId>.md,按 adProduct 分目录:
- report-types/sp/(Sponsored Products)- report-types/sb/(Sponsored Brands)>
目录总览见 report-types/index.md。本文件仅给运行时脚本参数与通用规则。支持的报告类型
完整列表见 report-types/index.md 及各 adProduct 子目录下的 index.md。常用快速索引:
| reportTypeId | 业务含义 | 文件 |
|---|---|---|
spCampaigns | 广告活动级(SP) | report-types/sp/spCampaigns.md |
spAdvertisedProduct | 投放商品级(SP) | report-types/sp/spAdvertisedProduct.md |
spSearchTerm | 搜索词级(SP) | report-types/sp/spSearchTerm.md |
spTargeting | 定向/关键词级(SP) | report-types/sp/spTargeting.md |
sbCampaigns / sbAdGroup / sbAds / ... | Sponsored Brands | report-types/sb/*.md |
输入参数
脚本支持两种模式:
- 全链路模式(默认):创建报告 → 轮询 → 下载。需要下表全部必填字段。
- 仅轮询模式:入参中显式传入
reportId(见下方"可选流程参数"),跳过创建,只需profileId/region,其余全部可省略。用于救回上次客户端超时但报告仍在跑的场景。
必填(全链路模式)
| 参数 | 类型 | 说明 |
|---|---|---|
profileId | number | 从 ads-auth 获取 |
region | string | NA / EU / FE |
reportTypeId | string | 见 report-types/index.md 各 adProduct 子目录下的完整列表 |
adProduct | string | 取自对应 .md 文件的 frontmatter(SPONSORED_PRODUCTS / SPONSORED_BRANDS) |
groupBy | list | 取自对应 .md 文件的 frontmatter |
columns | list | 取自对应 .md 文件 Base metrics 表的子集 |
startDate | string | YYYY-MM-DD(含当天) |
endDate | string | YYYY-MM-DD(含当天) |
可选业务参数
| 参数 | 默认 | 说明 |
|---|---|---|
name | {reportTypeId}_{startDate}_{endDate} | 报告显示名 |
timeUnit | SUMMARY | DAILY(每天一行) / SUMMARY(整期一行) |
format | GZIP_JSON | 响应文件格式 |
filters | 空 | 过滤条件数组,字段与取值见对应 .md 文件 |
可选流程参数
| 参数 | 默认 | 说明 |
|---|---|---|
reportId | 无 | 若显式传入,脚本进入仅轮询模式:跳过创建步骤,直接对该 reportId 轮询与下载。此时只要 profileId / region + reportId,其他字段可省 |
pollInterval | 30 | 轮询间隔秒 |
maxAttempts | 20 | 最大轮询次数(默认 10 分钟上限) |
skipDepCheck | false | 跳过依赖检查 |
serveExtractedFileHttp | true | 是否启本机 HTTP 服务 |
serveHost | 127.0.0.1 | 绑定地址(仅本机可访问) |
servePort | 0 | 端口(0=系统分配) |
serveSeconds | 300 | HTTP 服务存活秒 |
includeAmazonSourceUrl | false | 响应中带预签名 URL |
日期限制
- 跨度上限:以对应
.md文件 frontmatter 的dateRange.maxSpanDays为准(多数 31 天;sbPurchasedProduct731 天;GrossAndInvalids 系列 365 天)。超出返回 HTTP 400"must not exceed maximum range"。 - 回溯上限:以
dateRange.dataRetentionDays为准(SP 多为 95 天,SB 60 天)。 - 数据延迟:~12 小时;
endDate >= 今天脚本会 stderr 警告但不拦截。建议endDate <= 昨天。
各报告类型的列
每个 reportTypeId 的完整 Base metrics 列表、allowed groupBy、filters 枚举值,统一在 report-types/<adProduct-dir>/<reportTypeId>.md 中维护:
.md的 frontmatter 提供adProduct/groupBy/timeUnit(可选值)/format/filters/dateRange- Base metrics 表列出此报告类型支持的全部列名;调用方按业务需要选子集
归因窗口后缀约定:_1d / _7d / _14d / _30d 表示 1/7/14/30 天归因窗口(点击或曝光归因的销售额、订单量、件数等)。具体每个字段支持哪些窗口,以对应 .md 文件的 Base metrics 表为准(不是所有字段都有全部 4 个窗口版本)。
工作流与输出
脚本流程:依赖检查 → 取 token → 创建报告 → 等待生成(每 pollInterval 秒查询一次状态)→ 下载 GZIP_JSON(Amazon 预签名 URL 约 1 小时有效)→ 解压为可读 JSON → 通过本机 127.0.0.1 上的临时 HTTP 服务对调用方暴露(serveSeconds 后自动关闭)→ 输出调用结果 JSON(含本地文件路径与访问链接)。
status 枚举:PENDING / PROCESSING / COMPLETED / FAILED。
成功响应
{
"success": true,
"reportId": "4ee811a0-6aaa-4ceb-9d31-d3bcecf85430",
"status": "COMPLETED",
"reportTypeId": "spCampaigns",
"startDate": "2026-04-28", "endDate": "2026-05-04",
"pollAttempts": 13, "elapsedSeconds": 255,
"downloadPath": "C:/.../tmp/report-xxx.json",
"extractedFileHttpUrl": "http://127.0.0.1:51234/report-xxx.json",
"serveExpiresAt": "2026-05-06T14:54:03+08:00"
}失败响应
a) 创建阶段非 2xx:
{"error":"Upstream HTTP 400","httpStatus":400,
"body":"{\"code\":\"400\",\"detail\":\"startDate to endDate range (32 days) must not exceed maximum range (31 days)\"}"}b) 报告生成失败(failureReason 从上游透传):
{"success":false,"error":"Report generation failed with status=FAILED",
"reportId":"4ee811a0-...","status":"FAILED",
"failureReason":"Requested columns are not supported for this report type.",
"pollAttempts":3}c) 轮询超时(报告未坏,仅客户端等待窗口耗尽 — exit code = 2):
{
"success": false,
"status": "STILL_PROCESSING",
"reportId": "4ee811a0-...",
"reportTypeId": "spCampaigns",
"profileId": 1234567890,
"lastStatus": "PROCESSING",
"pollAttempts": 20,
"elapsedSeconds": 600,
"message": "客户端已等 ~600 秒(20 次轮询)报告仍在 Amazon 侧生成,并未失败。用 reportId 切换到仅轮询模式即可继续等待。",
"resumeHint": {
"mode": "poll-only",
"note": "传入 reportId + 更大的 maxAttempts 继续轮询同一份报告",
"params": {"profileId": 1234567890, "region": "NA", "reportId": "4ee811a0-...", "maxAttempts": 60, "pollInterval": 30}
}
}调用方收到此响应应视为"未完成"而非"失败",询问用户是否继续等待,直接把 resumeHint.params 作为入参续调 get_report.py。
错误码
| httpStatus / exit | 含义 | 建议 |
|---|---|---|
| 200 | 成功 | 消费 extractedFileHttpUrl 或 downloadPath |
| 400 | 入参错(日期超限 / reportTypeId 非法 / columns 不适配) | 按 detail 修正 |
| 401 | accessToken 过期 | 调 ads-auth 的 refresh_token.py 后重试 |
| 403 | profileId 无权限 | 核对 profileId |
| 404 | reportId 不存在或已过期 | 重新发起报告 |
| 422 | columns / groupBy 与 reportTypeId 不适配 | 对照 report-types/<adProduct-dir>/<reportTypeId>.md 的 Base metrics / frontmatter 核对 |
| 425 | 同参数已有在跑的报告,Amazon 做了去重;body 形如 "The Request is a duplicate of : <reportId>" | 脚本自动解析该 reportId 并无缝转为轮询该老报告,正常情况下无需干预;若调用方自行处理,也可把 reportId 拿出来,下次改用仅轮询模式({..., "reportId":"<uuid>"}) |
| 429 | 限流(~30 req/min/profile) | 间隔 30s 重试 |
status=FAILED | 上游生成失败 | 看 failureReason |
status=STILL_PROCESSING (exit 2) | 客户端轮询窗口耗尽但报告仍在 Amazon 侧生成 | 非失败。stdout 已输出 reportId 与 resumeHint.params。询问用户是否继续等,用 params 切到仅轮询模式续跑(maxAttempts=60 约 30 分钟 / =120 约 1 小时) |
| exit 42 | 依赖 skill 未安装 | 先装 linkfox-amazon-ads-auth |
调用示例
# 1. SP 广告活动汇总(DAILY,一周)
python get_report.py '{"profileId":1111111111,"region":"NA",
"reportTypeId":"spCampaigns",
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["campaign"],
"columns":["date","campaignId","campaignName","impressions","clicks","cost"],
"startDate":"2026-04-27","endDate":"2026-05-03",
"timeUnit":"DAILY"}'
# 2. SP 搜索词 + 多归因窗口 + 过滤仅看关键词匹配
python get_report.py '{"profileId":1111111111,"region":"NA",
"reportTypeId":"spSearchTerm",
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["searchTerm"],
"columns":["searchTerm","keyword","matchType","impressions","clicks","cost",
"sales7d","sales14d","sales30d",
"purchases7d","purchases14d","purchases30d",
"acosClicks14d","roasClicks14d","startDate","endDate"],
"startDate":"2026-04-01","endDate":"2026-04-30",
"timeUnit":"SUMMARY",
"filters":[{"field":"keywordType","values":["BROAD","PHRASE","EXACT"]}]}'
# 3. SP 投放商品 + 长时间等待 + 不启本机 HTTP
python get_report.py '{"profileId":1111111111,"region":"NA",
"reportTypeId":"spAdvertisedProduct",
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["advertiser"],
"columns":["advertisedAsin","advertisedSku","impressions","clicks","cost",
"sales7d","acosClicks7d","roasClicks7d","startDate","endDate"],
"startDate":"2026-04-01","endDate":"2026-04-30",
"timeUnit":"SUMMARY",
"maxAttempts":60,"pollInterval":20,"serveExtractedFileHttp":false}'
# 4. 仅轮询一个已有 reportId(救回上次超时)
python get_report.py '{"profileId":1111111111,"region":"NA",
"reportId":"7df1ef5d-45ba-40cc-b607-ff2148cf4f5e",
"maxAttempts":60,"pollInterval":30}'---
Feedback API
与上面的工具 API base URL 不同:
curl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \
-H "Content-Type: application/json" \
-d '{"skillName":"linkfox-amazon-ads-report","sentiment":"POSITIVE",
"category":"OTHER","content":"报告拉取顺利"}'sentiment:POSITIVE/NEUTRAL/NEGATIVEcategory:BUG/COMPLAINT/SUGGESTION/OTHER
Amazon Ads Report Types
按 adProduct 分类。每个 .md 文件名即 reportTypeId,内容为官方原文 + YAML frontmatter 结构化字段,用于构造 POST /reporting/reports 请求体。
目录
| adProduct | 目录 |
|---|---|
| SPONSORED_PRODUCTS | `sp/` |
| SPONSORED_BRANDS | `sb/` |
| SPONSORED_DISPLAY | `sd/` |
Sponsored Television (ST) / Amazon DSP 暂未覆盖,后续版本支持。
数据源
https://advertising.amazon.com/API/docs/en-us/guides/reporting/v3/report-types
Sponsored Brands (SB) Report Types
adProduct = SPONSORED_BRANDS
| reportTypeId | 状态 |
|---|---|
| `sbAdGroup` | ✅ |
| `sbAds` | ✅ |
| `sbCampaigns` | ✅ |
| `sbCampaignPlacement` | ✅ |
| `sbGrossAndInvalids` | ✅ |
| `sbPromptAdExtension` | ✅ |
| `sbPurchasedProduct` | ✅ |
| `sbSearchTerm` | ✅ |
| `sbTargeting` | ✅ |
SB Ad Group
Ad group reports contain performance data broken down at the ad group level. Ad group reports include all campaigns of the requested sponsored ad type that have performance activity for the requested days. For example, a Sponsored Brands ad group report returns performance data for all Sponsored Brands ad groups that received impressions on the chosen dates.
Note
For Sponsored Products, there is not a separate ad group report. You can get ad group-level data using the ad group groupBy in a campaign report.
Note
This report currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled=False won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbAdGroup |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | adGroup |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| adGroupId |
| adGroupName |
| adStatus |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| brandedSearches |
| brandedSearchesClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| endDate |
| impressions |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewsClicks |
| newToBrandECPDetailPageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandPurchasesPercentage |
| newToBrandPurchasesRate |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandSalesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| newToBrandUnitsSoldPercentage |
| purchases |
| purchasesClicks |
| purchasesPromoted |
| sales |
| salesClicks |
| salesPromoted |
| startDate |
| unitsSold |
| unitsSoldClicks |
| video5SecondViewRate |
| video5SecondViews |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
Group by adGroup
Additional metrics: N/A
Filters:
- adStatus (values: ENABLED, PAUSED, ARCHIVED)
Group by campaign
Additional metrics: N/A
Sample call
Ad group summary report grouped by ad group
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data '{
"name": "SB ad group report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_BRANDS",
"groupBy": [
"adGroup"
],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"adGroupId",
"startDate",
"endDate"
],
"reportTypeId": "sbAdGroup",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SB Ads
Advertised product reports contain performance data for campaigns at the ad level.
Note
This report is currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled set to FALSE won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbAds |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | ads |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToList |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| addToListFromClicks |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromClicks |
| adGroupId |
| adGroupName |
| adId |
| brandedSearches |
| brandedSearchesClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| endDate |
| impressions |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewsClicks |
| newToBrandECPDetailPageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandPurchasesPercentage |
| newToBrandPurchasesRate |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandSalesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| newToBrandUnitsSoldPercentage |
| purchases |
| purchasesClicks |
| purchasesPromoted |
| sales |
| salesClicks |
| salesPromoted |
| startDate |
| unitsSold |
| unitsSoldClicks |
| video5SecondViewRate |
| video5SecondViews |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewableImpressions |
Group by ads
Additional metrics: N/A
Filters:
- adStatus (values: ENABLED, PAUSED, ARCHIVED)
Sample call
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data '{
"name":"SB advertised product report 9/5-9/10",
"startDate":"2023-09-05",
"endDate":"2023-09-10",
"configuration":{
"adProduct":"SPONSORED_BRANDS",
"groupBy":["ads"],
"columns":["impressions","clicks","cost","campaignId","adId","adGroupId"],
"reportTypeId":"sbAds",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'SB Campaign Placement
Placement reports contain performance data broken down by ad placement.
Note
For Sponsored Products, there is not a separate placement report. You can get placement-level data using the 'campaignPlacement' groupBy in a campaign report.
Note
This report is currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled set to FALSE won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbCampaignPlacement |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| brandedSearches |
| brandedSearchesClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| endDate |
| impressions |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewsClicks |
| newToBrandECPDetailPageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandPurchasesPercentage |
| newToBrandPurchasesRate |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandSalesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| newToBrandUnitsSoldPercentage |
| purchases |
| purchasesClicks |
| purchasesPromoted |
| sales |
| salesClicks |
| salesPromoted |
| startDate |
| unitsSold |
| unitsSoldClicks |
| video5SecondViewRate |
| video5SecondViews |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewableImpressions |
| viewClickThroughRate |
Group by campaignPlacement
Additional metrics: placementClassification
Group by campaign
Additional metrics: N/A
Sample call
Campaign placement summary report
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxx' \
--data '{
"name": "SB placement report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_BRANDS",
"groupBy": [
"campaignPlacement"
],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"placementClassification",
"startDate",
"endDate"
],
"reportTypeId": "sbCampaignPlacement",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SB Campaigns
Campaign reports contain performance data broken down at the campaign level. Campaign reports include all campaigns of the requested sponsored ad type that have performance activity for the requested days. For example, a Sponsored Products campaign report returns performance data for all Sponsored Products campaigns that received impressions on the chosen dates. Campaign reports can also be grouped by ad group and placement for more granular data.
Note
You can only use a filter that is supported by all groupBy values included in a report configuration. For campaign reports, this means that filters are only supported when you include a single groupBy value.
Note
This report currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled=False won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbCampaigns |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| brandedSearches |
| brandedSearchesClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| endDate |
| impressions |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewsClicks |
| newToBrandECPDetailPageView |
| brandStorePageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandPurchasesPercentage |
| newToBrandPurchasesRate |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandSalesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| newToBrandUnitsSoldPercentage |
| purchases |
| purchasesClicks |
| purchasesPromoted |
| sales |
| salesClicks |
| salesPromoted |
| startDate |
| topOfSearchImpressionShare |
| unitsSold |
| unitsSoldClicks |
| video5SecondViewRate |
| video5SecondViews |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewableImpressions |
| viewClickThroughRate |
Group by campaign
Additional metrics: campaignBudgetAmount, campaignBudgetCurrencyCode, campaignBudgetType, longTermSales, longTermROAS, topOfSearchImpressionShare
Filters:
- campaignStatus (values: ENABLED, PAUSED, ARCHIVED)
Sample calls
Campaign summary report grouped by campaign
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxx' \
--data '{
"name": "SB campaigns report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_BRANDS",
"groupBy": [
"campaign"
],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"startDate",
"endDate"
],
"reportTypeId": "sbCampaigns",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SB Gross and Invalid Traffic
Gross and invalid traffic report provides Sponsored Products, Sponsored Brands and Sponsored Display advertisers transparency into the nature of traffic on their campaigns. This report include all campaigns of the requested ad type and provides transparency on gross and invalid traffic metrics at campaign level for the requested days. For example, a Sponsored Products gross and invalid traffic report returns gross and invalid traffic metrics for all Sponsored Products campaigns that received impressions on the chosen dates.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbGrossAndInvalids |
| Maximum date range | 365 days |
| Data retention | 365 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign |
| format | GZIP_JSON or CSV |
Sponsored Products, Sponsored Brands, and Sponosred Display all support the same columns and configurations for the gross and invalid traffic report.
Base metrics
| Field |
|---|
| campaignName |
| campaignStatus |
| clicks |
| date |
| endDate |
| grossClickThroughs |
| grossImpressions |
| impressions |
| invalidClickThroughRate |
| invalidClickThroughs |
| invalidImpressionRate |
| invalidImpressions |
| startDate |
Group by campaign
Additional metrics: N/A
Filters:
- campaignStatus (values: ENABLED, PAUSED, ARCHIVED)
SB Prompt Ad Extension
Prompt Ad Extension reports contain performance data for Sponsored Products and Sponsored Brands ads that include metrics for AI-powered prompt ads. Prompts are designed to help shoppers discover products through conversational experiences on Amazon by surfacing relevant product information through intelligent suggestions and guiding questions.
About Prompts
Prompts are a new ad format that integrates into your existing Sponsored Products and Sponsored Brands campaigns with zero additional setup required. They enhance product discovery at crucial shopper decision points by:
- Showcasing your product expertise at scale during critical shopper decision moments
- Engaging high-intent shoppers with relevant product information
- Anticipating and answering shopper questions about your products
Prompts with clicks will show in your existing Sponsored Products or Sponsored Brands reporting, and you can pause individual prompts through the Amazon Ads console.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbPromptAdExtension |
| Maximum date range | 90 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | promptAdExtension |
| format | GZIP_JSON or XLSX |
Base metrics
| Field |
|---|
| date |
| startDate |
| endDate |
| campaignId |
| campaignName |
| adGroupId |
| adGroupName |
| marketplaceId |
| adId |
| adName |
| creativeExtensionId |
| creativeExtensionType |
| portfolioName |
| campaignBudgetCurrencyCode |
| promptText |
| impressions |
| clicks |
| clickThroughRate |
| costPerClick |
| cost |
| spend |
| viewableImpressions |
| acosClicks7d |
| acosClicks14d |
| roasClicks7d |
| roasClicks14d |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| purchasesOtherSku1d |
| purchasesOtherSku7d |
| purchasesOtherSku14d |
| purchasesOtherSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| unitsSoldOtherSku1d |
| unitsSoldOtherSku7d |
| unitsSoldOtherSku14d |
| unitsSoldOtherSku30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| salesOtherSku1d |
| salesOtherSku7d |
| salesOtherSku14d |
| salesOtherSku30d |
| purchaseClickRate7d |
| purchaseClickRate14d |
| newToBrandPurchases |
| newToBrandPurchasesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldPercentage |
| newToBrandSales |
| newToBrandSalesPercentage |
Group by promptAdExtension
Additional metrics: N/A
Filters:
- marketplaceId (values: US)
Sample call
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data '{
"name":"SB prompt ad extension report 4/13-4/16",
"startDate":"2026-04-13",
"endDate":"2026-04-16",
"configuration":{
"adProduct":"SPONSORED_BRANDS",
"groupBy":["promptAdExtension"],
"columns":["date","campaignId","campaignName","adGroupId","adGroupName","adId","adName","creativeExtensionId","promptText","impressions","clicks","cost","purchases7d","sales7d","newToBrandPurchases","newToBrandSales"],
"reportTypeId":"sbPromptAdExtension",
"timeUnit":"DAILY",
"format":"GZIP_JSON"
}
}'SB Purchased Product
Sponsored Brands purchased product reports contain performance data for products that were purchased as a result of your campaign.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbPurchasedProduct |
| Maximum date range | 731 days |
| Data retention | 731 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | purchasedAsin |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| campaignId |
| adGroupId |
| date |
| startDate |
| endDate |
| campaignBudgetCurrencyCode |
| campaignName |
| campaignPriceTypeCode |
| adGroupName |
| attributionType |
| purchasedAsin |
| ordersClicks14d |
| productName |
| productCategory |
| sales14d |
| salesClicks14d |
| orders14d |
| unitsSold14d |
| newToBrandSales14d |
| newToBrandPurchases14d |
| newToBrandUnitsSold14d |
| newToBrandSalesPercentage14d |
| newToBrandPurchasesPercentage14d |
| newToBrandUnitsSoldPercentage14d |
| unitsSoldClicks14d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
Group by purchasedAsin
Additional metrics: N/A
Filters: N/A
Sample call
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxx' \
--data-raw '{
"name":"SB purchased product report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_BRANDS",
"groupBy":["purchasedAsin"],
"columns":["purchasedAsin","attributionType","adGroupName","campaignName","sales14d","startDate","endDate"],
"reportTypeId":"sbPurchasedProduct",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'SB Search Term
Search term reports contain search term performance metrics broken down by targeting expressions and keywords. Note that search term reports only include impressions that resulted in at least one ad click. Use the keywordType filter to include either targeting expressions or keywords in your report.
Note
If a placement does not have a search keyword associated with it on a product detail page, the search term in the report will be an asterisk *.Note
This report is currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled set to FALSE won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbSearchTerm |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | searchTerm |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| adGroupId |
| adGroupName |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| endDate |
| impressions |
| keywordBid |
| keywordId |
| keywordText |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| matchType |
| purchases |
| purchasesClicks |
| sales |
| salesClicks |
| searchTerm |
| startDate |
| unitsSold |
| video5SecondViewRate |
| video5SecondViews |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewableImpressions |
| viewClickThroughRate |
Group by searchTerm
Additional metrics: adKeywordStatus
Filters:
- keywordType (values: BROAD, PHRASE, EXACT, TARGETING_EXPRESSION, TARGETING_EXPRESSION_PREDEFINED)
Sample call
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxx' \
--data '{
"name": "SP search terms report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_BRANDS",
"groupBy": [
"searchTerm"
],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"adGroupId",
"startDate",
"endDate",
"matchType",
"keywordId",
"searchTerm"
],
"filters": [
{
"field": "keywordType",
"values": [
"BROAD",
"PHRASE",
"EXACT"
]
}
],
"reportTypeId": "sbSearchTerm",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SB Targeting
Targeting reports contain performance metrics broken down by both targeting expressions and keywords.
Note
Targeting reports are not supported for Sponsored TV non-endemic advertisers.
Requesting keywords vs. targets
To see only targeting expressions, set the keywordType filter to TARGETING_EXPRESSION and TARGETING_EXPRESSION_PREDEFINED. To see only keywords, set the keywordType filter to BROAD, PHRASE, and EXACT.
Note
This report currently available in preview. During the preview period, data related to Sponsored Brands campaigns with flag isMultiAdGroupsEnabled=False won't be available. Once version 3 reporting supports all Sponsored Brands campaigns, we will announce general availability in the release notes.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sbTargeting |
| Maximum date range | 31 days |
| Data retention | 60 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | targeting |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| adGroupId |
| adGroupName |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| brandedSearches |
| brandedSearchesClicks |
| campaignBudgetAmount |
| campaignBudgetCurrencyCode |
| campaignBudgetType |
| campaignId |
| campaignName |
| campaignStatus |
| clicks |
| cost |
| costType |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| endDate |
| impressions |
| keywordBid |
| keywordId |
| adKeywordStatus |
| keywordText |
| keywordType |
| matchType |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewsClicks |
| newToBrandECPDetailPageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandPurchasesPercentage |
| newToBrandPurchasesRate |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandSalesPercentage |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| newToBrandUnitsSoldPercentage |
| purchases |
| purchasesClicks |
| purchasesPromoted |
| sales |
| salesClicks |
| salesPromoted |
| startDate |
| targetingExpression |
| targetingId |
| targetingText |
| targetingType |
| topOfSearchImpressionShare |
| unitsSold |
Group by targeting
Additional metrics: N/A
Filters:
- adKeywordStatus (values: ENABLED, PAUSED, ARCHIVED)
- keywordType (values: BROAD, PHRASE, EXACT, TARGETING_EXPRESSION, TARGETING_EXPRESSION_PREDEFINED, THEME)
Sample call
Keywords only
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxx' \
--data '{
"name": "SB keywords report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_BRANDS",
"groupBy": [
"targeting"
],
"columns": [
"adGroupId",
"campaignId",
"keywordId",
"matchType",
"keywordText",
"impressions",
"clicks",
"cost",
"startDate",
"endDate"
],
"filters": [
{
"field": "keywordType",
"values": [
"BROAD",
"PHRASE",
"EXACT"
]
}
],
"reportTypeId": "sbTargeting",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'Sponsored Display (SD) Report Types
adProduct = SPONSORED_DISPLAY
| reportTypeId | 状态 |
|---|---|
| `sdAdGroup` | ✅ |
| `sdAdvertisedProduct` | ✅ |
| `sdCampaigns` | ✅ |
| `sdGrossAndInvalids` | ✅ |
| `sdPurchasedProduct` | ✅ |
| `sdTargeting` | ✅ |
SD Ad Group
Ad group reports contain performance data broken down at the ad group level. Ad group reports include all campaigns of the requested sponsored ad type that have performance activity for the requested days. For Sponsored Display, ad group reports can also be grouped by matchedTarget for more granular data.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdAdGroup |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | adGroup or matchedTarget |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToCartViews |
| adGroupId |
| adGroupName |
| addToList |
| addToListFromClicks |
| addToListFromViews |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| qualifiedBorrowsFromViews |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromViews |
| bidOptimization |
| brandedSearches |
| brandedSearchesClicks |
| brandedSearchesViews |
| brandedSearchRate |
| campaignBudgetCurrencyCode |
| campaignId |
| campaignName |
| clicks |
| cost |
| cumulativeReach |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| eCPBrandSearch |
| endDate |
| impressions |
| impressionsViews |
| newToBrandPurchases |
| kindleEditionNormalizedPagesRead |
| kindleEditionNormalizedPagesReadFromClicks |
| kindleEditionNormalizedPagesReadFromViews |
| kindleEditionNormalizedPagesRoyalties |
| kindleEditionNormalizedPagesRoyaltiesFromClicks |
| kindleEditionNormalizedPagesRoyaltiesFromViews |
| newToBrandPurchasesClicks |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| purchases |
| purchasesClicks |
| purchasesPromotedClicks |
| sales |
| salesClicks |
| salesPromotedClicks |
| startDate |
| unitsSold |
| unitsSoldClicks |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewClickThroughRate |
Group by adGroup
Additional metrics: cumulativeReach, impressionsFrequencyAverage, newToBrandDetailPageViewClicks, newToBrandDetailPageViewRate, newToBrandDetailPageViews, newToBrandDetailPageViewViews, newToBrandECPDetailPageView
Filters: N/A
Group by matchedTarget
Additional metrics: matchedTargetAsin
Filters: N/A
Sample calls
Ad group summary report grouped by ad group
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data '{
"name": "SD ad group report",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["adGroup"],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"adGroupId",
"adGroupName",
"startDate",
"endDate"
],
"reportTypeId": "sdAdGroup",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SD Advertised Product
Advertised product reports contain performance data for products that are advertised as part of your Sponsored Display campaigns.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdAdvertisedProduct |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | advertiser |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartRate |
| addToCartViews |
| addToCartClicks |
| adGroupId |
| adGroupName |
| adId |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| addToListFromViews |
| qualifiedBorrowsFromClicks |
| qualifiedBorrowsFromViews |
| royaltyQualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromViews |
| bidOptimization |
| brandedSearches |
| brandedSearchesClicks |
| brandedSearchesViews |
| brandedSearchRate |
| campaignBudgetCurrencyCode |
| campaignId |
| campaignName |
| clicks |
| cost |
| cumulativeReach |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| eCPBrandSearch |
| endDate |
| impressions |
| impressionsFrequencyAverage |
| impressionsViews |
| kindleEditionNormalizedPagesRead |
| kindleEditionNormalizedPagesReadFromClicks |
| kindleEditionNormalizedPagesReadFromViews |
| kindleEditionNormalizedPagesRoyalties |
| kindleEditionNormalizedPagesRoyaltiesFromClicks |
| kindleEditionNormalizedPagesRoyaltiesFromViews |
| newToBrandDetailPageViewClicks |
| newToBrandDetailPageViewRate |
| newToBrandDetailPageViews |
| newToBrandDetailPageViewViews |
| newToBrandECPDetailPageView |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| promotedAsin |
| promotedSku |
| purchases |
| purchasesClicks |
| purchasesPromotedClicks |
| sales |
| salesClicks |
| salesPromotedClicks |
| startDate |
| unitsSold |
| unitsSoldClicks |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewClickThroughRate |
Group by advertiser
Additional metrics: N/A
Filters: N/A
Sample calls
Advertised product summary report
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxxxx' \
--data-raw '{
"name": "SD advertised product report 3/5-3/10",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["advertiser"],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"newToBrandSalesClicks",
"detailPageViews"
],
"reportTypeId": "sdAdvertisedProduct",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SD Campaigns
Campaign reports contain performance data broken down at the campaign level. Campaign reports include all campaigns of the requested sponsored ad type that have performance activity for the requested days. For Sponsored Display, campaign reports can also be grouped by matchedTarget for more granular data.
Note
You can only use a filter that is supported by all groupBy values included in a report configuration. For campaign reports, this means that filters are only supported when you include a single groupBy value.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdCampaigns |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign or matchedTarget |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToCartViews |
| addToList |
| addToListFromClicks |
| addToListFromViews |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| qualifiedBorrowsFromViews |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromViews |
| brandedSearches |
| brandedSearchesClicks |
| brandedSearchesViews |
| brandedSearchRate |
| campaignBudgetCurrencyCode |
| campaignId |
| campaignName |
| clicks |
| cost |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| eCPBrandSearch |
| endDate |
| impressions |
| impressionsViews |
| kindleEditionNormalizedPagesRead |
| kindleEditionNormalizedPagesReadFromClicks |
| kindleEditionNormalizedPagesReadFromViews |
| kindleEditionNormalizedPagesRoyalties |
| kindleEditionNormalizedPagesRoyaltiesFromClicks |
| kindleEditionNormalizedPagesRoyaltiesFromViews |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandSalesClicks |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| purchases |
| purchasesClicks |
| purchasesPromotedClicks |
| sales |
| salesClicks |
| salesPromotedClicks |
| startDate |
| unitsSold |
| unitsSoldClicks |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewClickThroughRate |
Group by campaign
Additional metrics: campaignBudgetAmount, campaignStatus, costType, cumulativeReach, impressionsFrequencyAverage, longTermSales, longTermROAS, newToBrandDetailPageViewClicks, newToBrandDetailPageViewRate, newToBrandDetailPageViews, newToBrandDetailPageViewViews, newToBrandECPDetailPageView, newToBrandSales
Filters: N/A
Group by matchedTarget
Additional metrics: matchedTargetAsin
Filters: N/A
Sample calls
Campaign summary report grouped by campaign
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxx' \
--data '{
"name": "SD campaigns report",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["campaign"],
"columns": [
"impressions",
"clicks",
"cost",
"campaignId",
"campaignName",
"startDate",
"endDate"
],
"reportTypeId": "sdCampaigns",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SD Gross and Invalid Traffic
Gross and invalid traffic reports provide Sponsored Display advertisers transparency into the nature of traffic on their campaigns. The report includes all campaigns of the requested ad type and provides transparency on gross and invalid traffic metrics at the campaign level for the requested days.
Note
Sponsored Products, Sponsored Brands, and Sponsored Display all support the same columns and configurations for the gross and invalid traffic report.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdGrossAndInvalids |
| Maximum date range | 365 days |
| Data retention | 365 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign |
| format | GZIP_JSON or CSV |
Base metrics
| Field |
|---|
| campaignName |
| campaignStatus |
| clicks |
| date |
| endDate |
| grossClickThroughs |
| grossImpressions |
| impressions |
| invalidClickThroughRate |
| invalidClickThroughs |
| invalidImpressionRate |
| invalidImpressions |
| startDate |
Group by campaign
Additional metrics: N/A
Filters:
- campaignStatus (values: ENABLED, PAUSED, ARCHIVED)
Sample calls
Gross and invalid traffic summary report
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxx' \
--data '{
"name": "SD Gross and Invalid Traffic",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["campaign"],
"columns": [
"campaignName",
"grossImpressions",
"grossClickThroughs",
"invalidClickThroughs",
"invalidClickThroughRate",
"startDate",
"endDate"
],
"reportTypeId": "sdGrossAndInvalids",
"timeUnit": "SUMMARY",
"format": "CSV"
}
}'SD Purchased Product
Sponsored Display purchased product reports contain performance data for products that were purchased as part of brand-halo activity associated with your campaigns (purchased ASINs that differ from the promoted ASIN).
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdPurchasedProduct |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | asin |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| adGroupId |
| adGroupName |
| asinBrandHalo |
| addToList |
| addToListFromClicks |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromClicks |
| addToListFromViews |
| qualifiedBorrows |
| qualifiedBorrowsFromViews |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromViews |
| campaignBudgetCurrencyCode |
| campaignId |
| campaignName |
| conversionsBrandHalo |
| conversionsBrandHaloClicks |
| date |
| endDate |
| kindleEditionNormalizedPagesRead |
| kindleEditionNormalizedPagesReadFromClicks |
| kindleEditionNormalizedPagesReadFromViews |
| kindleEditionNormalizedPagesRoyalties |
| kindleEditionNormalizedPagesRoyaltiesFromClicks |
| kindleEditionNormalizedPagesRoyaltiesFromViews |
| promotedAsin |
| promotedSku |
| salesBrandHalo |
| salesBrandHaloClicks |
| startDate |
| unitsSoldBrandHalo |
| unitsSoldBrandHaloClicks |
Group by asin
Additional metrics: N/A
Filters: N/A
Sample calls
Purchased product summary report
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxx' \
--data-raw '{
"name": "SD purchased product report",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["asin"],
"columns": [
"promotedAsin",
"asinBrandHalo",
"adGroupName",
"campaignName",
"salesBrandHalo",
"conversionsBrandHalo",
"campaignId",
"adGroupId"
],
"reportTypeId": "sdPurchasedProduct",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'SD Targeting
Targeting reports contain performance metrics broken down by targeting expressions. For Sponsored Display, targeting reports can also be grouped by matchedTarget to surface the actual ASIN that matched.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | sdTargeting |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | targeting or matchedTarget |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| addToCart |
| addToCartClicks |
| addToCartRate |
| addToCartViews |
| adGroupId |
| adGroupName |
| addToList |
| addToListFromClicks |
| addToListFromViews |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| qualifiedBorrowsFromViews |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| royaltyQualifiedBorrowsFromViews |
| brandedSearches |
| brandedSearchesClicks |
| brandedSearchesViews |
| brandedSearchRate |
| campaignBudgetCurrencyCode |
| campaignId |
| campaignName |
| clicks |
| cost |
| date |
| detailPageViews |
| detailPageViewsClicks |
| eCPAddToCart |
| eCPBrandSearch |
| endDate |
| impressions |
| impressionsViews |
| kindleEditionNormalizedPagesRead |
| kindleEditionNormalizedPagesReadFromClicks |
| kindleEditionNormalizedPagesReadFromViews |
| kindleEditionNormalizedPagesRoyalties |
| kindleEditionNormalizedPagesRoyaltiesFromClicks |
| kindleEditionNormalizedPagesRoyaltiesFromViews |
| newToBrandPurchases |
| newToBrandPurchasesClicks |
| newToBrandSales |
| newToBrandSalesClicks |
| newToBrandUnitsSold |
| newToBrandUnitsSoldClicks |
| purchases |
| purchasesClicks |
| purchasesPromotedClicks |
| sales |
| salesClicks |
| salesPromotedClicks |
| startDate |
| targetingExpression |
| targetingId |
| targetingText |
| unitsSold |
| unitsSoldClicks |
| videoCompleteViews |
| videoFirstQuartileViews |
| videoMidpointViews |
| videoThirdQuartileViews |
| videoUnmutes |
| viewabilityRate |
| viewClickThroughRate |
Group by targeting
Additional metrics: adKeywordStatus, newToBrandDetailPageViewClicks, newToBrandDetailPageViewRate, newToBrandDetailPageViews, newToBrandDetailPageViewViews, newToBrandECPDetailPageView
Filters: N/A
Group by matchedTarget
Additional metrics: matchedTargetAsin
Filters: N/A
Sample calls
Targeting summary report grouped by targeting
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxx' \
--data '{
"name": "SD targeting report",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["targeting"],
"columns": [
"adGroupId",
"campaignId",
"targetingId",
"targetingText",
"targetingExpression",
"impressions",
"clicks",
"cost",
"purchases",
"sales",
"startDate",
"endDate"
],
"reportTypeId": "sdTargeting",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'Targeting report grouped by matchedTarget
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxx' \
--data '{
"name": "SD targeting matched-target report",
"startDate": "2025-03-05",
"endDate": "2025-03-10",
"configuration": {
"adProduct": "SPONSORED_DISPLAY",
"groupBy": ["matchedTarget"],
"columns": [
"adGroupId",
"campaignId",
"matchedTargetAsin",
"impressions",
"clicks",
"cost",
"purchases",
"sales",
"startDate",
"endDate"
],
"reportTypeId": "sdTargeting",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'Sponsored Products (SP) Report Types
adProduct = SPONSORED_PRODUCTS
| reportTypeId | 状态 |
|---|---|
| `spAdvertisedProduct` | ✅ |
| `spCampaigns` | ✅ |
| `spGrossAndInvalids` | ✅ |
| `spPromptAdExtension` | ✅ |
| `spPurchasedProduct` | ✅ |
| `spSearchTerm` | ✅ |
| `spTargeting` | ✅ |
SP Advertised Product
Advertised product reports contain performance data for products that are advertised as part of your campaigns.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spAdvertisedProduct |
| Maximum date range | 31 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | advertiser |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| date |
| startDate |
| endDate |
| campaignName |
| campaignId |
| adGroupName |
| adGroupId |
| adId |
| addToList |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| portfolioId |
| impressions |
| clicks |
| costPerClick |
| clickThroughRate |
| cost |
| spend |
| campaignBudgetCurrencyCode |
| campaignBudgetAmount |
| campaignBudgetType |
| campaignStatus |
| advertisedAsin |
| advertisedSku |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| salesOtherSku7d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| unitsSoldOtherSku7d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| acosClicks7d |
| acosClicks14d |
| roasClicks7d |
| roasClicks14d |
Group by advertiser
Additional metrics: N/A
Filters
- adCreativeStatus (values: ENABLED, PAUSED, ARCHIVED)
Sample call
Endpoint: POST https://advertising-api.amazon.com/reporting/reports
Headers:
Content-Type: application/vnd.createasyncreportrequest.v3+json
Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx
Amazon-Advertising-API-Scope: xxxxxxx
Authorization: Bearer Atza|xxxxxxxxxxxxxBody:
{
"name": "SP advertised product report 7/5-7/10",
"startDate": "2022-07-05",
"endDate": "2022-07-10",
"configuration": {
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": ["advertiser"],
"columns": ["impressions", "clicks", "cost", "campaignId", "advertisedAsin"],
"reportTypeId": "spAdvertisedProduct",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}SP Campaigns
Campaign reports contain performance data broken down at the campaign level. Campaign reports include all campaigns of the requested sponsored ad type that have performance activity for the requested days. For example, a Sponsored Products campaign report returns performance data for all Sponsored Products campaigns that received impressions on the chosen dates. Campaign reports can also be grouped by ad group and placement for more granular data.
Note
You can only use a filter that is supported by all groupBy values included in a report configuration. For campaign reports, this means that filters are only supported when you include a single groupBy value.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spCampaigns |
| Maximum date range | 31 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign, adGroup, or campaignPlacement |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| impressions |
| addToList |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| clicks |
| cost |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| date |
| startDate |
| endDate |
| campaignBiddingStrategy |
| costPerClick |
| clickThroughRate |
| spend |
Group by campaign
Additional metrics: campaignName, campaignId, campaignStatus, campaignBudgetAmount, campaignBudgetType, campaignRuleBasedBudgetAmount, campaignApplicableBudgetRuleId, campaignApplicableBudgetRuleName, campaignBudgetCurrencyCode, topOfSearchImpressionShare
Filters:
- campaignStatus (values: ENABLED, PAUSED, ARCHIVED)
Group by adGroup
Additional metrics: adGroupName, adGroupId, adStatus
Filters:
- adStatus (values: ENABLED, PAUSED, ARCHIVED)
Group by campaignPlacement
Additional metrics: placementClassification, campaignName, campaignId, campaignStatus, campaignBudgetAmount, campaignBudgetType, campaignRuleBasedBudgetAmount, campaignApplicableBudgetRuleId, campaignApplicableBudgetRuleName, campaignBudgetCurrencyCode, topOfSearchImpressionShare
Filters:
- campaignSite (values: AmazonBusiness)
Note
Amazon Business performance data is available starting 9/5/2024 onwards only.
>
The Amazon Business Bid Adjustment and Reporting for Sponsored Products will be coming soon to Bulksheets.
>
Other groupBy parameters apart from campaignPlacement are not supported.
Sample calls
Campaign daily report grouped by campaign and ad group
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxx' \
--data-raw '{
"name":"SP campaigns report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["campaign","adGroup"],
"columns":["impressions","clicks","cost","campaignId","adGroupId","date"],
"reportTypeId":"spCampaigns",
"timeUnit":"DAILY",
"format":"GZIP_JSON"
}
}'Campaign summary report grouped by campaign and placement
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data-raw '{
"name":"SP campaigns report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["campaign","campaignPlacement"],
"columns":["impressions","clicks","cost","campaignId","placementClassification","startDate","endDate"],
"reportTypeId":"spCampaigns",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'Campaign summary report grouped by placement for Amazon Business
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data-raw '{
"name":"SP campaigns report 9/07-9/10",
"startDate":"2024-09-07",
"endDate":"2024-09-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["campaignPlacement"],
"columns":["impressions","clicks","cost","campaignId","placementClassification","startDate","endDate"],
"filters": [{"field":"campaignSite","values":["AmazonBusiness"]}],
"reportTypeId":"spCampaigns",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'Note
Grouping by campaignPlacement will generate the same report as grouping by campaign and campaignPlacement.
SP Gross and Invalid Traffic
Gross and invalid traffic report provides Sponsored Products, Sponsored Brands and Sponsored Display advertisers transparency into the nature of traffic on their campaigns. This report include all campaigns of the requested ad type and provides transparency on gross and invalid traffic metrics at campaign level for the requested days. For example, a Sponsored Products gross and invalid traffic report returns gross and invalid traffic metrics for all Sponsored Products campaigns that received impressions on the chosen dates.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spGrossAndInvalids |
| Maximum date range | 365 days |
| Data retention | 365 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | campaign |
| format | GZIP_JSON or CSV |
Sponsored Products, Sponsored Brands, and Sponosred Display all support the same columns and configurations for the gross and invalid traffic report.
Base metrics
| Field |
|---|
| campaignName |
| campaignStatus |
| clicks |
| date |
| endDate |
| grossClickThroughs |
| grossImpressions |
| impressions |
| invalidClickThroughRate |
| invalidClickThroughs |
| invalidImpressionRate |
| invalidImpressions |
| startDate |
Group by campaign
Additional metrics: N/A
Filters:
- campaignStatus (values: ENABLED, PAUSED, ARCHIVED)
Sample call
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxx' \
--data '{
"name": "SP Gross and Invalid Traffic",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": [
"campaign"
],
"columns": [
"campaignName",
"grossImpressions",
"grossClickThroughs",
"invalidClickThroughs",
"invalidClickThroughRate",
"startDate",
"endDate"
],
"reportTypeId": "spGrossAndInvalids",
"timeUnit": "SUMMARY",
"format": "CSV"
}
}'SP Prompt Ad Extension
Prompt Ad Extension reports contain performance data for Sponsored Products and Sponsored Brands ads that include metrics for AI-powered prompt ads. Prompts are designed to help shoppers discover products through conversational experiences on Amazon by surfacing relevant product information through intelligent suggestions and guiding questions.
About Prompts
Prompts are a new ad format that integrates into your existing Sponsored Products and Sponsored Brands campaigns with zero additional setup required. They enhance product discovery at crucial shopper decision points by:
- Showcasing your product expertise at scale during critical shopper decision moments
- Engaging high-intent shoppers with relevant product information
- Anticipating and answering shopper questions about your products
Prompts with clicks will show in your existing Sponsored Products or Sponsored Brands reporting, and you can pause individual prompts through the Amazon Ads console.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spPromptAdExtension |
| Maximum date range | 90 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | promptAdExtension |
| format | GZIP_JSON or XLSX |
Base metrics
| Field |
|---|
| date |
| startDate |
| endDate |
| campaignId |
| campaignName |
| adGroupId |
| adGroupName |
| marketplaceId |
| advertisedSku |
| advertisedAsin |
| adId |
| creativeExtensionId |
| creativeExtensionType |
| promptText |
| impressions |
| clicks |
| clickThroughRate |
| costPerClick |
| cost |
| spend |
| viewableImpressions |
| acosClicks7d |
| acosClicks14d |
| roasClicks7d |
| roasClicks14d |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| purchasesOtherSku1d |
| purchasesOtherSku7d |
| purchasesOtherSku14d |
| purchasesOtherSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| unitsSoldOtherSku1d |
| unitsSoldOtherSku7d |
| unitsSoldOtherSku14d |
| unitsSoldOtherSku30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| salesOtherSku1d |
| salesOtherSku7d |
| salesOtherSku14d |
| salesOtherSku30d |
Group by promptAdExtension
Additional metrics: N/A
Filters:
- marketplaceId (values: US)
Sample call
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxxx' \
--data '{
"name":"SP prompt ad extension report 11/1-1/23",
"startDate":"2025-11-01",
"endDate":"2026-01-23",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["promptAdExtension"],
"columns":["date","campaignId","campaignName","adGroupId","adGroupName","adId","creativeExtensionId","promptText","impressions","clicks","cost","purchases7d","sales7d"],
"reportTypeId":"spPromptAdExtension",
"timeUnit":"DAILY",
"format":"GZIP_JSON"
}
}'SP Purchased Product
Sponsored Products purchased product reports contain performance data for products that were purchased, but were not advertised as part of a campaign. The purchased product report contains both targeting expressions and keyword IDs. After you have received your report, you can filter on keywordType to distinguish between targeting expressions and keywords.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spPurchasedProduct |
| Maximum date range | 31 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | asin |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| date |
| startDate |
| endDate |
| addToList |
| addToListFromClicks |
| qualifiedBorrows |
| qualifiedBorrowsFromClicks |
| royaltyQualifiedBorrows |
| royaltyQualifiedBorrowsFromClicks |
| portfolioId |
| campaignName |
| campaignId |
| adGroupName |
| adGroupId |
| keywordId |
| keyword |
| keywordType |
| advertisedAsin |
| purchasedAsin |
| advertisedSku |
| campaignBudgetCurrencyCode |
| matchType |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| unitsSoldOtherSku1d |
| unitsSoldOtherSku7d |
| unitsSoldOtherSku14d |
| unitsSoldOtherSku30d |
| salesOtherSku1d |
| salesOtherSku7d |
| salesOtherSku14d |
| salesOtherSku30d |
| purchasesOtherSku1d |
| purchasesOtherSku7d |
| purchasesOtherSku14d |
| purchasesOtherSku30d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
Group by asin
Additional metrics: N/A
Filters: N/A
Sample call
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxxx' \
--data-raw '{
"name":"SP purchased product report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["asin"],
"columns":["purchasedAsin","advertisedAsin","adGroupName","campaignName","sales14d","campaignId","adGroupId","keywordId","keywordType","keyword"],
"reportTypeId":"spPurchasedProduct",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'SP Search Term
Search term reports contain search term performance metrics broken down by targeting expressions and keywords. Note that search term reports only include impressions that resulted in at least one ad click. Use the keywordType filter to include either targeting expressions or keywords in your report.
Note
If a placement does not have a search keyword associated with it on a product detail page, the search term in the report will be an asterisk *.Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spSearchTerm |
| Maximum date range | 31 days |
| Data retention | 65 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | searchTerm |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| impressions |
| addToList |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| clicks |
| costPerClick |
| clickThroughRate |
| cost |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| salesOtherSku7d |
| unitsSoldOtherSku7d |
| acosClicks7d |
| acosClicks14d |
| roasClicks7d |
| roasClicks14d |
| keywordId |
| keyword |
| campaignBudgetCurrencyCode |
| date |
| startDate |
| endDate |
| portfolioId |
| searchTerm |
| campaignName |
| campaignId |
| campaignBudgetType |
| campaignBudgetAmount |
| campaignStatus |
| keywordBid |
| adGroupName |
| adGroupId |
| keywordType |
| matchType |
| targeting |
| adKeywordStatus |
Group by searchTerm
Additional metrics: adKeywordStatus
Filters:
- keywordType (values: BROAD, PHRASE, EXACT, TARGETING_EXPRESSION, TARGETING_EXPRESSION_PREDEFINED)
Sample calls
Targeting expressions only
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxx' \
--data-raw '{
"name":"SP search term report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["searchTerm"],
"columns":["impressions","clicks","cost","campaignId","adGroupId","date","targeting","searchTerm","keywordType","keywordId"],
"filters": [
{
"field": "keywordType",
"values": [
"TARGETING_EXPRESSION",
"TARGETING_EXPRESSION_PREDEFINED"
]
}
],
"reportTypeId":"spSearchTerm",
"timeUnit":"DAILY",
"format":"GZIP_JSON"
}
}'Keywords only
curl --location --request POST 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxx' \
--data-raw '{
"name":"SB search terms report 7/5-7/10",
"startDate":"2022-07-05",
"endDate":"2022-07-10",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["searchTerm"],
"columns":["impressions","clicks","cost","campaignId","adGroupId","startDate","endDate","keywordType","keyword","matchType","keywordId","searchTerm"],
"filters": [
{
"field": "keywordType",
"values": [
"BROAD",
"PHRASE",
"EXACT"
]
}
],
"reportTypeId":"spSearchTerm",
"timeUnit":"SUMMARY",
"format":"GZIP_JSON"
}
}'SP Targeting
Targeting reports contain performance metrics broken down by both targeting expressions and keywords.
Note
Targeting reports are not supported for Sponsored TV non-endemic advertisers.
Requesting keywords vs. targets
To see only targeting expressions, set the keywordType filter to TARGETING_EXPRESSION and TARGETING_EXPRESSION_PREDEFINED. To see only keywords, set the keywordType filter to BROAD, PHRASE, and EXACT.
Configuration
| Configuration | Value |
|---|---|
| reportTypeId | spTargeting |
| Maximum date range | 31 days |
| Data retention | 95 days |
| timeUnit | SUMMARY or DAILY |
| groupBy | targeting |
| format | GZIP_JSON |
Base metrics
| Field |
|---|
| impressions |
| addToList |
| qualifiedBorrows |
| royaltyQualifiedBorrows |
| clicks |
| costPerClick |
| clickThroughRate |
| cost |
| purchases1d |
| purchases7d |
| purchases14d |
| purchases30d |
| purchasesSameSku1d |
| purchasesSameSku7d |
| purchasesSameSku14d |
| purchasesSameSku30d |
| unitsSoldClicks1d |
| unitsSoldClicks7d |
| unitsSoldClicks14d |
| unitsSoldClicks30d |
| sales1d |
| sales7d |
| sales14d |
| sales30d |
| attributedSalesSameSku1d |
| attributedSalesSameSku7d |
| attributedSalesSameSku14d |
| attributedSalesSameSku30d |
| unitsSoldSameSku1d |
| unitsSoldSameSku7d |
| unitsSoldSameSku14d |
| unitsSoldSameSku30d |
| kindleEditionNormalizedPagesRead14d |
| kindleEditionNormalizedPagesRoyalties14d |
| salesOtherSku7d |
| unitsSoldOtherSku7d |
| acosClicks7d |
| acosClicks14d |
| roasClicks7d |
| roasClicks14d |
| keywordId |
| keyword |
| campaignBudgetCurrencyCode |
| date |
| startDate |
| endDate |
| portfolioId |
| campaignName |
| campaignId |
| campaignBudgetType |
| campaignBudgetAmount |
| campaignStatus |
| keywordBid |
| adGroupName |
| adGroupId |
| keywordType |
| matchType |
| targeting |
| topOfSearchImpressionShare |
Group by targeting
Additional metrics: adKeywordStatus
Filters:
- adKeywordStatus (values: ENABLED, PAUSED, ARCHIVED)
- keywordType (values: BROAD, PHRASE, EXACT, TARGETING_EXPRESSION, TARGETING_EXPRESSION_PREDEFINED)
Sample calls
Targeting expressions only
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxx' \
--data '{
"name": "SP targeting report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": [
"targeting"
],
"columns": [
"adGroupId",
"campaignId",
"targeting",
"keywordId",
"matchType",
"impressions",
"clicks",
"cost",
"purchases1d",
"purchases7d",
"purchases14d",
"purchases30d",
"startDate",
"endDate"
],
"filters": [
{
"field": "keywordType",
"values": [
"TARGETING_EXPRESSION",
"TARGETING_EXPRESSION_PREDEFINED"
]
}
],
"reportTypeId": "spTargeting",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'Keywords only
curl --location 'https://advertising-api.amazon.com/reporting/reports' \
--header 'Content-Type: application/vnd.createasyncreportrequest.v3+json' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Authorization: Bearer Atza|xxxxxxxxx' \
--data '{
"name": "SP keywords report 9/5-9/10",
"startDate": "2023-09-05",
"endDate": "2023-09-10",
"configuration": {
"adProduct": "SPONSORED_PRODUCTS",
"groupBy": [
"targeting"
],
"columns": [
"adGroupId",
"campaignId",
"keywordId",
"matchType",
"keyword",
"impressions",
"clicks",
"cost",
"purchases1d",
"purchases7d",
"purchases14d",
"purchases30d",
"startDate",
"endDate"
],
"filters": [
{
"field": "keywordType",
"values": [
"BROAD",
"PHRASE",
"EXACT"
]
}
],
"reportTypeId": "spTargeting",
"timeUnit": "SUMMARY",
"format": "GZIP_JSON"
}
}'#!/usr/bin/env python3
"""
Dependency Check - linkfox-amazon-ads-report
============================================
本脚本用于判断当前运行环境里是否已经安装 / 加载了依赖 skill
`linkfox-amazon-ads-auth`。
用法:
python check_auth_dependency.py # 默认检查
python check_auth_dependency.py --json # 以 JSON 输出结果
退出码约定(供 agent 程序化解析):
0 → 依赖已满足(找到 linkfox-amazon-ads-auth 的 SKILL.md)
42 → DEPENDENCY_MISSING: 未找到依赖 skill,agent 需要触发安装流程
stderr 结构化信号:
- 若依赖缺失,stderr 第一行会以 `DEPENDENCY_MISSING:` 开头,
后跟 JSON payload,包含所需 skill 名与建议的安装动作。
- 成功时 stderr 以 `DEPENDENCY_OK:` 开头。
注意:
这是一个**不联网**的本地探测脚本。它只检查文件系统上常见的 skill 安装路径。
"""
from __future__ import annotations
import argparse
import json
import os
import sys
from pathlib import Path
REQUIRED_SKILL = "linkfox-amazon-ads-auth"
DEPENDENCY_EXIT_CODE = 42
def _split_path_list(raw: str | None) -> list[Path]:
if not raw or not raw.strip():
return []
parts = [p.strip() for p in raw.split(os.pathsep) if p.strip()]
return [Path(p).expanduser() for p in parts]
def candidate_skill_roots() -> list[Path]:
roots: list[Path] = []
for env_var in ("LINKFOX_SKILLS_DIR", "SKILLS_DIR", "CURSOR_SKILLS_DIR"):
p = os.environ.get(env_var)
if p:
roots.append(Path(p).expanduser())
roots.extend(_split_path_list(os.environ.get("HERMES_SKILLS_EXTERNAL_DIRS")))
for env_var in ("OPENCLAW_WORKSPACE", "OPENCLAW_ROOT", "OPENCLAW_WORKDIR"):
ws = os.environ.get(env_var)
if ws:
w = Path(ws).expanduser()
roots.append(w / "skills")
roots.append(w / ".agents" / "skills")
oc_skills = os.environ.get("OPENCLAW_SKILLS_DIR")
if oc_skills:
roots.append(Path(oc_skills).expanduser())
try:
cwd = Path.cwd()
roots.append(cwd / "skills")
roots.append(cwd / ".agents" / "skills")
except OSError:
pass
here = Path(__file__).resolve()
if len(here.parents) >= 3:
roots.append(here.parents[2])
home = Path.home()
roots.extend([
home / ".claude" / "skills",
home / ".cursor" / "skills",
home / ".cursor" / "skills-cursor",
home / ".linkfox" / "skills",
])
roots.extend([
home / ".openclaw" / "skills",
home / ".hermes" / "skills",
])
seen: set[Path] = set()
unique: list[Path] = []
for r in roots:
try:
rr = r.resolve()
except OSError:
rr = r
if rr not in seen:
seen.add(rr)
unique.append(r)
return unique
def _hermes_category_skill_md(hermes_skills_root: Path) -> Path | None:
if not hermes_skills_root.is_dir():
return None
for category_dir in sorted(hermes_skills_root.iterdir()):
if not category_dir.is_dir():
continue
name = category_dir.name
if name.startswith(".") or name == ".hub":
continue
candidate = category_dir / REQUIRED_SKILL / "SKILL.md"
if candidate.is_file():
return candidate
return None
def _hermes_plugin_skill_md(home: Path) -> Path | None:
plugins_root = home / ".hermes" / "plugins"
if not plugins_root.is_dir():
return None
for plugin_dir in sorted(plugins_root.iterdir()):
if not plugin_dir.is_dir():
continue
candidate = plugin_dir / "skills" / REQUIRED_SKILL / "SKILL.md"
if candidate.is_file():
return candidate
return None
def locate_dependency() -> Path | None:
home = Path.home()
for root in candidate_skill_roots():
target = root / REQUIRED_SKILL / "SKILL.md"
if target.is_file():
return target
hermes_default = home / ".hermes" / "skills"
found = _hermes_category_skill_md(hermes_default)
if found is not None:
return found
hsh = os.environ.get("HERMES_SKILLS_HOME")
if hsh:
found = _hermes_category_skill_md(Path(hsh).expanduser())
if found is not None:
return found
found = _hermes_plugin_skill_md(home)
if found is not None:
return found
return None
def searched_locations_for_report() -> list[str]:
home = Path.home()
out: list[str] = [str(p) for p in candidate_skill_roots()]
out.append(str(home / ".hermes" / "skills"))
out.append(str(home / ".hermes" / "plugins"))
hsh = os.environ.get("HERMES_SKILLS_HOME")
if hsh:
out.append(str(Path(hsh).expanduser()))
seen: set[str] = set()
unique: list[str] = []
for s in out:
if s not in seen:
seen.add(s)
unique.append(s)
return unique
def emit(as_json: bool, ok: bool, payload: dict) -> None:
prefix = "DEPENDENCY_OK:" if ok else "DEPENDENCY_MISSING:"
body = json.dumps(payload, ensure_ascii=False)
if as_json:
out = dict(payload)
out["status"] = "ok" if ok else "missing"
print(json.dumps(out, ensure_ascii=False, indent=2))
print(f"{prefix} {body}", file=sys.stderr)
def main() -> None:
parser = argparse.ArgumentParser(description="Check required dependency skill availability.")
parser.add_argument("--json", action="store_true", help="Emit machine-readable JSON on stdout.")
args = parser.parse_args()
found = locate_dependency()
if found is not None:
emit(as_json=args.json, ok=True, payload={
"skill": REQUIRED_SKILL,
"skillMdPath": str(found),
})
sys.exit(0)
payload = {
"missingSkill": REQUIRED_SKILL,
"reason": (
f"linkfox-amazon-ads-report 依赖 `{REQUIRED_SKILL}`,"
"但在常见 skill 安装路径下未找到其 SKILL.md。"
),
"searchedRoots": searched_locations_for_report(),
"suggestedActions": [
f"If a skill installer tool is available (e.g. install_skill / skill marketplace MCP), invoke it to install '{REQUIRED_SKILL}' immediately.",
"Otherwise, ask the user to install the skill from https://skill.linkfox.com/ and retry.",
"Do NOT bypass the dependency by calling /amazonAds/authorizeUrl or /amazonAds/storeTokens directly from this skill.",
],
"marketplaceUrl": "https://skill.linkfox.com/",
}
emit(as_json=args.json, ok=False, payload=payload)
sys.exit(DEPENDENCY_EXIT_CODE)
if __name__ == "__main__":
main()