One Snapchat campaign's performance — spend, swipes
snapchat-ads.campaign.statsGet spend, impressions and swipes for one Snapchat campaign
- 价格
- free按目录价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/snapchat-ads.campaign.statsBeta- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
identical shape to the account-level report, scoped to one campaign; /adsquads/{id}/stats and /ads/{id}/stats are the same again further down. LIFETIME granularity ignores start_time/end_time and returns the campaign's all-time totals
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 路径参数 | ||||
campaign_id | 字符串 | 必填 | UUID from the campaigns list | 92e1c28a-a331-45b4-8c26-fd3e0eea8c39 |
| 查询参数 | ||||
fields | 字符串 | 可选 | impressions,swipes,spend,conversion_purchases,attachment_total_view_time_millis | |
end_time | 字符串 | 可选 | 2026-07-28T00:00:00-07:00 | |
breakdown | 字符串 | 可选 | adsquad | ad — one row per child of this campaign | adsquad |
start_time | 字符串 | 可选 | ISO 8601 aligned to ad-account-timezone midnight | 2026-06-28T00:00:00-07:00 |
granularity | 字符串 | 必填 | TOTAL | DAY | HOUR | LIFETIME | TOTAL |
swipe_up_attribution_window | 字符串 | 可选 | 7_DAY | |
- 路径参数
campaign_id字符串必填UUID from the campaigns list
示例:
92e1c28a-a331-45b4-8c26-fd3e0eea8c39- 查询参数
fields字符串可选示例:
impressions,swipes,spend,conversion_purchases,attachment_total_view_time_millisend_time字符串可选示例:
2026-07-28T00:00:00-07:00breakdown字符串可选adsquad | ad — one row per child of this campaign
示例:
adsquadstart_time字符串可选ISO 8601 aligned to ad-account-timezone midnight
示例:
2026-06-28T00:00:00-07:00granularity字符串必填TOTAL | DAY | HOUR | LIFETIME
示例:
TOTALswipe_up_attribution_window字符串可选示例:
7_DAY
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
Beta
curl -X GET 'https://toolswitch.dev/v1/tools/snapchat-ads.campaign.stats' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/snapchat-ads.campaign.stats",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/snapchat-ads.campaign.stats", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为 Beta,地址与鉴权方式可能变更。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。