Skip to content
登录 注册

ISP代理API

使用此 API 可枚举您的 ISP 代理 IP 池并管理源 IP 白名单。有关协议层面的代理使用方法(host:port、凭据),请参阅 产品 → ISP 代理

所有端点均使用 api_token 查询参数进行身份验证。请在控制面板Account → API Tokens 中生成令牌。

?api_token=YOUR_API_TOKEN

{membership} 路径参数两种形式都支持:套餐的数字 ID(控制面板套餐页面上显示的编号),或套餐的 API ID(控制面板中套餐 URL 末尾的短代码,例如 https://shifter.io/panel/membership/DeeJ)。两者指向同一个套餐。

GET https://shifter.io/api/v1/static-residential/{membership}/proxies

返回您套餐中固定的所有 IP,以及共享的端口和凭据。整个池中使用相同的端口(1337)和相同的用户名/密码,只有 IP 会变化。

ParameterInRequiredDescription
membershippathyes套餐 ID(数字或 API ID)
api_tokenqueryyes您的账户 API 令牌

示例:

Terminal window
curl "https://shifter.io/api/v1/static-residential/YOUR_PLAN_ID/proxies?api_token=YOUR_API_TOKEN"

响应:

{
"error": null,
"code": 200,
"data": [
"185.199.108.153:1337",
"185.199.108.154:1337",
"185.199.108.155:1337"
]
}

每一项的格式为 ip:port。整个池中的端口(1337)和用户名/密码都相同,只有 IP 不同;凭据可在控制面板的 My Plans → ISP Proxies 中查看。ISP 代理覆盖美国、加拿大、英国、法国、德国、西班牙和意大利。您的 IP 所在国家在购买时选定,之后固定不变,请参阅国家设置

将源 IP 加入白名单,这样您的爬虫在每次请求时都可以跳过 HTTP Basic 身份验证。白名单是面向整个账户生效的,任何加入白名单的源都可以使用池中任意固定的 IP。

GET https://shifter.io/api/v1/static-residential/{membership}/authorized-ips
ParameterInRequiredDescription
membershippathyes套餐 ID
api_tokenqueryyes您的账户 API 令牌

响应:

{
"error": null,
"code": 200,
"data": [
"198.51.100.10",
"203.0.113.42"
]
}
PUT https://shifter.io/api/v1/static-residential/{membership}/authorized-ips

用提供的值替换已授权 IP 列表。

ParameterInRequiredDescription
membershippathyes套餐 ID
api_tokenqueryyes您的账户 API 令牌
ips[]bodyyes要加入白名单的 IPv4 地址数组

示例(表单编码,带方法覆盖):

Terminal window
curl -X POST "https://shifter.io/api/v1/static-residential/YOUR_PLAN_ID/authorized-ips?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "_method=PUT&ips[]=198.51.100.10&ips[]=203.0.113.42"