跳转到主要内容
GET
/
zone
/
count_available_ips
cURL
curl --request GET \
  --url https://api.brightdata.com/zone/count_available_ips \
  --header 'Authorization: Bearer <token>'
{
  "count": 1234
}
将您的 API key 粘贴到授权字段中。要获取 API key,请创建账号,并查看如何生成新的 API key?
  • 当前区域计划的可用 IP:
curl "https://api.brightdata.com/count_available_ips?zone=ZONE" -H "Authorization: Bearer API_KEY"
  • 抽象计划,专用 IP:
dedicated IPs
curl "https://api.brightdata.com/count_available_ips?plan=\{\"ips_type\":\"dedicated\"\}" -H "Authorization: Bearer API_KEY"
  • 抽象计划,共享 IP 位于美国:
curl "https://api.brightdata.com/count_available_ips?plan=\{\"country\":\"us\",\"ips_type\":\"shared\"\}" -H "Authorization: Bearer API_KEY"
  • 抽象计划,专用 IP 位于美国:
curl "https://api.brightdata.com/count_available_ips?plan=\{\"country\":\"us\",\"ips_type\":\"dedicated\"\}" -H "Authorization: Bearer API_KEY"
  • 抽象计划,共享 IP 位于美国丹佛:
curl "https://api.brightdata.com/count_available_ips?plan=\{\"ips_type\":\"shared\",\"country_city\":\"us-denver\",\"city\":true\}" -H "Authorization: Bearer API_KEY"
  • 抽象计划,共享 IP 位于美国,仅限特定域:amazon.com, fb.com:
curl "https://api.brightdata.com/count_available_ips?plan=\{\"ips_type\":\"selective\",\"country\":\"us\",\"domain_whitelist\":\"amazon.com%20fb.com\"\}" -H "Authorization: Bearer API_KEY"
  • 抽象计划,共享 IP 位于美国,地理 IP 数据库:同时保存在 maxmind 和 dbip:
curl "https://api.brightdata.com/count_available_ips?plan=\{\"ips_type\":\"shared\",\"country\":\"us\",\"geo_db\":\{\"maxmind\":true,\"dbip\":true\}\}" -H "Authorization: Bearer API_KEY"

授权

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?

查询参数

zone
string

区域名称

plan
object

响应

200 - application/json

成功

The response is of type object.