Your Snapchat ad account performance — spend, swipes
snapchat-ads.queryGet spend, impressions and swipes for your whole Snapchat ad account
- 价格
- free按目录价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/snapchat-ads.queryBeta- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
spend is in MICRO-CURRENCY: 1000000 = 1 unit of the account currency. `swipes` is Snapchat's click. Hourly granularity is capped at a short window (about 7 days) and TOTAL/DAY at roughly 31 days per request — a longer range is an error, not a truncated result
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 路径参数 | ||||
ad_account_id | 字符串 | 必填 | UUID | 8adc3db7-8148-4fbf-999c-8d2266369d74 |
| 查询参数 | ||||
fields | 字符串 | 可选 | comma-separated metrics; omitting it returns only impressions and spend | impressions,swipes,spend,video_views,conversion_purchases,screen_time_millis |
end_time | 字符串 | 可选 | ISO 8601, same alignment rule; exclusive | 2026-07-28T00:00:00-07:00 |
breakdown | 字符串 | 可选 | campaign | adsquad | ad — returns one stats row per child entity instead of one account total | campaign |
start_time | 字符串 | 可选 | ISO 8601 WITH offset and aligned to midnight in the AD ACCOUNT's timezone — 2026-06-28T00:00:00-07:00. A non-midnight or wrong-offset value is rejected outright; required for DAY/HOUR | 2026-06-28T00:00:00-07:00 |
granularity | 字符串 | 必填 | TOTAL | DAY | HOUR | LIFETIME | DAY |
view_attribution_window | 字符串 | 可选 | 1_HOUR | 3_HOUR | 6_HOUR | 1_DAY (default) | 7_DAY | 28_DAY | |
swipe_up_attribution_window | 字符串 | 可选 | 1_DAY | 7_DAY (default) | 28_DAY | 28_DAY |
- 路径参数
ad_account_id字符串必填UUID
示例:
8adc3db7-8148-4fbf-999c-8d2266369d74- 查询参数
fields字符串可选comma-separated metrics; omitting it returns only impressions and spend
示例:
impressions,swipes,spend,video_views,conversion_purchases,screen_time_millisend_time字符串可选ISO 8601, same alignment rule; exclusive
示例:
2026-07-28T00:00:00-07:00breakdown字符串可选campaign | adsquad | ad — returns one stats row per child entity instead of one account total
示例:
campaignstart_time字符串可选ISO 8601 WITH offset and aligned to midnight in the AD ACCOUNT's timezone — 2026-06-28T00:00:00-07:00. A non-midnight or wrong-offset value is rejected outright; required for DAY/HOUR
示例:
2026-06-28T00:00:00-07:00granularity字符串必填TOTAL | DAY | HOUR | LIFETIME
示例:
DAYview_attribution_window字符串可选1_HOUR | 3_HOUR | 6_HOUR | 1_DAY (default) | 7_DAY | 28_DAY
swipe_up_attribution_window字符串可选1_DAY | 7_DAY (default) | 28_DAY
示例:
28_DAY
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/snapchat-ads.query' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/snapchat-ads.query",
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.query", {
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 计费,已含服务费。