按维度(products、zones、datasets、Web Scraper API 等)导出账户费用数据,与 Cost Explorer 同源。支持 JSON 或 CSV,按天按资源粒度返回。
此端点用于按您选定的维度(products、zones、datasets、Web Scraper API、collectors、domains、dataset snapshots 或 WSA snapshots),以 JSON 或 CSV 格式导出每天每资源的费用明细,数据与控制面板 Cost Explorer 完全一致。Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /zone/cost 无法满足需要时,请使用此端点。/zone/cost 端点仅作用于单个 zone,因此无法拆分 Web Scraper API 的费用(这些费用以 dataset_id 为键,而非 zone 名称),也无法回答诸如”我上月在数据中心代理和 Unlocker 上一共花了多少?“这类跨产品问题。
此端点通过 dimension 参数按 Cost Explorer 中相同的分组进行费用聚合。
| 维度 | 费用分组方式 |
|---|---|
products | 产品家族(datacenter、residential、ISP、mobile、unlocker、SERP API、Browser API 等) |
types | 网络或计费类型 |
zones | 账户中的各个 zone |
datasets | Dataset Marketplace 数据集购买 |
web_apis | Web Scraper API 的 dataset_id |
collectors | Scraper Studio collectors |
domains | 目标域名 |
ws_api_snaps | Web Scraper API 快照 |
snapshots | Dataset 快照 |
POST /costs/export/csv。CSV 会将响应转置为每天一行,每个出现在该日期范围内的资源 ID 对应一列,因此列数会随数据而变化:
filters 字段filters 对象使用 Bright Data 内部的计费结构语法,与 Cost Explorer 所用语法相同。从零构造过滤条件需要了解该结构。大多数调用方将 filters 留空({}),仅依靠 dimension 参数对响应进行约束。
下面是一个可用示例,将结果限制为 datacenter 与 Web Unlocker 产品:
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
Authorization: Bearer YOUR_API_KEYExample:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07dfLearn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
The dimension to group costs by. Same dimension semantics as the Control Panel Cost Explorer.
products, types, zones, datasets, web_apis, collectors, domains, ws_api_snaps, snapshots Inclusive start date in YYYY-MM-DD format. UTC.
Exclusive end date in YYYY-MM-DD format. UTC. The day specified is NOT included in the result. To match a calendar month, set to to the first day of the following month (e.g., from=2026-04-01&to=2026-05-01 returns all of April 2026).
Optional filter object. Uses Bright Data's internal charges-structure notation and requires knowledge of that structure to construct. Contact Bright Data support if you need help building a filter.
Example: { "props": { "product": { "whitelist": ["dc", "unblocker"] } } }
Cost breakdown grouped by day, then by resource ID. The resource ID format depends on the requested dimension (e.g., for dimension=web_apis, resource IDs are dataset IDs like gd_l1viktl72bvl7bjuj0). Amounts are billed USD for the day.