ISP代理API
使用此 API 可枚举您的 ISP 代理 IP 池并管理源 IP 白名单。有关协议层面的代理使用方法(host:port、凭据),请参阅 产品 → ISP 代理。
所有端点均使用 api_token 查询参数进行身份验证。请在控制面板的 Account → API Tokens 中生成令牌。
?api_token=YOUR_API_TOKEN{membership} 路径参数是您的套餐 ID,可在控制面板的套餐页面中查看。
GET https://shifter.io/api/v1/static-residential/{membership}/proxies
返回您套餐中固定的所有 IP,以及共享的端口和凭据。整个池中使用相同的端口(1337)和相同的用户名/密码,只有 IP 会变化。
| Parameter | In | Required | Description |
|---|---|---|---|
membership | path | yes | 套餐 ID |
api_token | query | yes | 您的账户 API 令牌 |
示例:
curl "https://shifter.io/api/v1/static-residential/MEMBERSHIP_ID/proxies?api_token=YOUR_API_TOKEN"响应:
{ "proxies": [ { "ip": "185.199.108.153", "port": 1337, "username": "pool-xyz", "password": "...", "country": "us", "asn": 7922, "isp": "Comcast", "assigned_at": "2026-01-15T12:03:44Z" }, { "ip": "185.199.108.154", "port": 1337, "username": "pool-xyz", "password": "...", "country": "gb", "asn": 5089, "isp": "Virgin Media", "assigned_at": "2026-01-15T12:03:44Z" } ]}country 字段是该 IP 所在国家/地区的 ISO 3166-1 alpha-2 代码。ISP 代理可用于 us、gb、fr、de、es 和 it。您的 IP 所在的国家/地区在购买时一次性确定,此后不再变更,详见国家/地区设置。
已授权的源 IP
Section titled “已授权的源 IP”将源 IP 加入白名单,这样您的爬虫在每次请求时都可以跳过 HTTP Basic 身份验证。白名单是面向整个账户生效的,任何加入白名单的源都可以使用池中任意固定的 IP。
列出已授权的 IP
Section titled “列出已授权的 IP” GET https://shifter.io/api/v1/static-residential/{membership}/authorized-ips
| Parameter | In | Required | Description |
|---|---|---|---|
membership | path | yes | 套餐 ID |
api_token | query | yes | 您的账户 API 令牌 |
响应:
{ "ips": ["198.51.100.10", "203.0.113.42"]}更新已授权的 IP
Section titled “更新已授权的 IP” PUT https://shifter.io/api/v1/static-residential/{membership}/authorized-ips
用提供的值替换已授权 IP 列表。
| Parameter | In | Required | Description |
|---|---|---|---|
membership | path | yes | 套餐 ID |
api_token | query | yes | 您的账户 API 令牌 |
ips[] | body | yes | 要加入白名单的 IPv4 地址数组 |
示例(表单编码,带方法覆盖):
curl -X POST "https://shifter.io/api/v1/static-residential/MEMBERSHIP_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"