> ## 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.

# 获取定价方案

> 使用 Bright Data 账号管理 API 的 GET /pricing_plans 列出账户当前的定价方案和所有可用方案，以及每个方案按产品和价格组划分的价格。请求无需参数，成功时返回 200 OK 和 JSON 格式的 plans 数组，可按 is_current 字段筛选当前方案。

`GET /pricing_plans` 端点返回账户当前的定价方案以及账户可用的其他方案，并包含每个方案的各产品价格。所有价格均以美元计。

<Tip>
  将您的 API key 粘贴到授权字段中。要获取 API key，请[创建账号](https://www.bright.cn/?hs_signup=1\&utm_source=docs\&utm_campaign=playground)，并查看[如何生成新的 API key？](/cn/api-reference/authentication#如何生成新的-api-key？)
</Tip>

## 此端点需要哪种 API key 权限？

`GET /pricing_plans` 需要 `billing.read` 权限。具有**管理员**或**财务**[权限级别](/cn/api-reference/authentication#api-key-拥有哪些权限级别？)的 API key 拥有该权限。运维、限制或用户权限级别的 API key 无法调用此端点。

## 如何获取我当前的定价方案？

使用管理员或财务权限的 API key 调用 `GET /pricing_plans`。此端点不接受任何参数：

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.brightdata.com/pricing_plans"
```

响应中包含一个 `plans` 数组。`is_current` 为 `true` 的条目即为您的当前方案。如只需输出该方案，可使用 [jq](https://jqlang.org/) 过滤响应：

```bash theme={null}
curl -s -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.brightdata.com/pricing_plans" \
  | jq '.plans[] | select(.is_current)'
```

## 响应结构是怎样的？

`plans` 数组中的每个条目描述一个方案：

| 字段               | 类型      | 说明                                |
| ---------------- | ------- | --------------------------------- |
| `id`             | string  | 方案标识符                             |
| `name`           | string  | 方案名称                              |
| `precommit`      | number  | 方案的每月预付承诺金额，单位为美元                 |
| `is_current`     | boolean | 账户当前使用的方案为 `true`，其他可用方案为 `false` |
| `product_prices` | object  | 方案价格，以内部产品键为键                     |

`product_prices` 的键与[费用明细导出](/cn/api-reference/account-management-api/Export_cost_breakdown)过滤条件中使用的内部产品键相同，例如 `dc`（数据中心代理）和 `res_static`（ISP 代理）。每个值包含产品 `name` 和 `price_groups` 数组。每个价格组包含 `name`、`prices` 对象，部分产品还包含 `unlim_ip_tier_prices` 对象。

## 如何理解 prices 对象？

`prices` 中的每个键是一个计费单位，每个值是该单位的美元价格。例如，`"prices": {"gb": 8}` 表示每 GB \$8。

| 键     | 计费单位                  |
| ----- | --------------------- |
| `gb`  | 1 GB 流量               |
| `req` | 1,000 个请求（CPM），而非单个请求 |

其他可能的键包括 `compute_hour`、`record`、`total`、`files_archive`、`files_cache`、`req_content`、`block` 和 `page_load`。具体出现哪些键取决于产品。

## 哪些产品会返回 unlim\_ip\_tier\_prices？

只有数据中心代理（`dc`）和 ISP 代理（`res_static`）会返回 `unlim_ip_tier_prices`。该对象将每个 IP 档位规模映射为对应的美元价格。

## 此端点有速率限制或特定错误吗？

没有。`GET /pricing_plans` 没有针对此端点的速率限制，也没有针对此端点的错误代码。

## 相关端点

* [费用明细导出](/cn/api-reference/account-management-api/Export_cost_breakdown)。按产品、zone、数据集或爬虫拆分的每日账户费用。
* [总余额](/cn/api-reference/account-management-api/Get_total_balance_through_API)。当前余额以及下一个账单周期的待付余额。


## OpenAPI

````yaml cn-openapi GET /pricing_plans
openapi: 3.0.1
info:
  title: Bright Data API
  description: 将 Bright Data API 集成到您的流程中，以实现高端的爬取精度
  version: 1.0.0
servers:
  - url: https://api.brightdata.com
security:
  - bearerAuth: []
paths:
  /pricing_plans:
    get:
      description: >-
        获取账户当前的定价方案以及可用的定价方案，并返回每个方案的各产品价格。所有价格均以美元计。需要 `billing.read`
        权限（管理员或财务权限级别的 API key）。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  plans:
                    type: array
                    description: 您的当前方案以及账户可用的方案。
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: 方案标识符。
                        name:
                          type: string
                          description: 方案名称。
                        precommit:
                          type: number
                          description: 方案的每月预付承诺金额，单位为美元。
                        is_current:
                          type: boolean
                          description: 账户当前使用的方案为 `true`，其他可用方案为 `false`。
                        product_prices:
                          type: object
                          description: >-
                            方案价格，以内部产品键为键（与费用明细导出过滤条件中的键相同，例如 `dc` 或
                            `res_static`）。
                          additionalProperties:
                            type: object
                            properties:
                              name:
                                type: string
                                description: 产品名称。
                              price_groups:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                      description: 价格组名称。
                                    prices:
                                      type: object
                                      description: >-
                                        以美元计的价格，以计费单位为键。例如 `{"gb": 8}` 表示每 GB
                                        $8。`req` 表示每 1,000
                                        个请求（CPM）。可能的键：`gb`、`req`、`compute_hour`、`record`、`total`、`files_archive`、`files_cache`、`req_content`、`block`、`page_load`。具体出现哪些键取决于产品。
                                      additionalProperties:
                                        type: number
                                    unlim_ip_tier_prices:
                                      type: object
                                      description: >-
                                        以 IP 档位规模为键的美元价格。仅 `dc`（数据中心代理）和
                                        `res_static`（ISP 代理）产品返回此字段。
                                      additionalProperties:
                                        type: number
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。


        **认证方法:**

        1. 从 Bright Data 账户设置获取您的 API Key:
        https://brightdata.com/cp/setting/users

        2. 在请求的 Authorization 头中包含 API Key

        3. 格式: `Authorization: Bearer YOUR_API_KEY`


        **示例:**

        ```

        Authorization: Bearer
        b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df

        ```


        了解如何获取 Bright Data API Key:
        https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key？
      bearerFormat: API Key

````