Your Meta ads' spend, impressions, clicks, conversions
meta-ads.insightsGet spend, impressions, clicks and conversions for your Meta ads
- 价格
- free按供应商原价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- 2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/meta-ads.insights?limit=2&date_preset=last_7d预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
conversions are NOT top-level fields: they arrive inside `actions` as [{action_type, value}] and you pick the action_type that matches the campaign's objective (purchase, lead, link_click). Attribution defaults to the ad account's setting unless action_attribution_windows is passed. A large request answers with a report_run_id for async polling instead of data
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 路径参数 | ||||
object_id | 字符串 | 必填 | ANY level of the hierarchy: act_… for the whole account, or a campaign / ad set / ad id to scope it down | act_1234567890 |
| 查询参数 | ||||
level | 字符串 | 可选 | account | campaign | adset | ad — the granularity of the ROWS returned, independent of object_id | campaign |
limit | 整数 | 可选 | 100 | |
fields | 字符串 | 必填 | comma-separated metrics | spend,impressions,clicks,ctr,cpc,cpm,reach,frequency,actions,action_values |
breakdowns | 字符串 | 可选 | e.g. age,gender or publisher_platform — not every breakdown combines with every metric | publisher_platform |
time_range | 字符串 | 可选 | JSON as a string: {"since":"2026-07-01","until":"2026-07-28"} | |
date_preset | 字符串 | 可选 | today | yesterday | last_7d | last_14d | last_30d | this_month | maximum — mutually exclusive with time_range | last_30d |
time_increment | 字符串 | 可选 | 1 for a daily series; omit for one aggregate row | 1 |
- 路径参数
object_id字符串必填ANY level of the hierarchy: act_… for the whole account, or a campaign / ad set / ad id to scope it down
示例:
act_1234567890- 查询参数
level字符串可选account | campaign | adset | ad — the granularity of the ROWS returned, independent of object_id
示例:
campaignlimit整数可选示例:
100fields字符串必填comma-separated metrics
示例:
spend,impressions,clicks,ctr,cpc,cpm,reach,frequency,actions,action_valuesbreakdowns字符串可选e.g. age,gender or publisher_platform — not every breakdown combines with every metric
示例:
publisher_platformtime_range字符串可选JSON as a string: {"since":"2026-07-01","until":"2026-07-28"}
date_preset字符串可选today | yesterday | last_7d | last_14d | last_30d | this_month | maximum — mutually exclusive with time_range
示例:
last_30dtime_increment字符串可选1 for a daily series; omit for one aggregate row
示例:
1
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/meta-ads.insights?limit=2&date_preset=last_7d' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/meta-ads.insights?limit=2&date_preset=last_7d",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/meta-ads.insights?limit=2&date_preset=last_7d", {
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());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。