跳转到主要内容
POST
/
zone
cURL
curl --request POST \
  --url https://api.brightdata.com/zone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "zone": {
    "name": "zone-name",
    "type": "serp"
  },
  "plan": {
    "type": "static",
    "domain_whitelist": "<string>",
    "ips_type": "shared",
    "bandwidth": "bandwidth",
    "ip_alloc_preset": "shared_block",
    "ips": 0,
    "country": "any",
    "country_city": "any",
    "mobile": "false",
    "serp": "false",
    "city": "false",
    "asn": "false",
    "vip": "false",
    "vips_type": "shared",
    "vips": "0",
    "vip_country": "<string>",
    "vip_country_city": "any",
    "pool_ip_type": "<string>",
    "ub_premium": false,
    "solve_captcha_disable": true,
    "custom_headers": false
  }
}
'
警告: 此 API 可能会修改您的账户设置、影响您的操作或产生费用。
将您的 API 密钥粘贴到授权字段。要获取 API 密钥,请创建账户,并了解如何生成新的 API 密钥

授权

Authorization
string
header
必填

在 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?

请求体

application/json
zone
object
必填
示例:
{ "name": "zone-name", "type": "serp" }
plan
object
必填

响应

201

区域已添加