跳转到主要内容
GET
/
zone
/
route_ips
cURL
curl --request GET \
  --url https://api.brightdata.com/zone/route_ips \
  --header 'Authorization: Bearer <token>'
[
  {
    "ip": "10.0.0.0",
    "country": "us"
  },
  {
    "ip": "1.1.1.1",
    "country": "gb"
  },
  {
    "ip": "1.1.2.2",
    "country": "hk"
  }
]
将您的 API key 粘贴到授权字段中。要获取 API key,请创建账号,并查看如何生成新的 API key?

Authorizations

Authorization
string
header
required

在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer 令牌。

如何认证:

  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?

Query Parameters

zone
string
required

区域

country
string

2 字母国家代码

list_countries
boolean

返回 [{ip, country},..] JSON 数组而非纯 IP 列表

Response

200 - application/json

list_countries=true 时,返回 JSON 数组;否则返回以换行分隔的 IP 列表

list_countries=true 时,返回 JSON 数组

ip
string

IP 地址

Example:

"1.1.1.1"

country
string

2 字母国家代码

Example:

"us"