住宅代理 API
Residential Proxies 产品通过网关用户名按请求进行配置,它没有针对账户的“管理”API。此 API 为你提供的是一种枚举地理选择器的方式,你可以将其放入用户名中(country、region、city、asn),从而让你的工具与实际可用内容保持同步。
所有端点均通过 api_key 查询参数进行认证。在面板的 Account → API Keys 下生成密钥。
?api_key=YOUR_API_KEY GET https://shifter.io/api/v1/residential/geo/countries
返回 Residential Proxies 网关上可用于 country-<iso2> 定向的所有国家。
| Parameter | In | Required | Description |
|---|---|---|---|
api_key | query | yes | 你的 API 密钥 |
示例:
curl "https://shifter.io/api/v1/residential/geo/countries?api_key=YOUR_API_KEY"响应:
[ { "code": "us", "name": "United States" }, { "code": "de", "name": "Germany" }, { "code": "gb", "name": "United Kingdom" }, { "code": "fr", "name": "France" }] GET https://shifter.io/api/v1/residential/geo/regions
返回给定国家内可用于 region-<slug> 定向的地区(州/省)。
| Parameter | In | Required | Description |
|---|---|---|---|
api_key | query | yes | 你的 API 密钥 |
country | query | yes | ISO 3166-1 alpha-2 国家代码,例如 us |
示例:
curl "https://shifter.io/api/v1/residential/geo/regions?country=us&api_key=YOUR_API_KEY"响应:
[ { "slug": "california", "name": "California" }, { "slug": "new_york", "name": "New York" }, { "slug": "texas", "name": "Texas" }] GET https://shifter.io/api/v1/residential/geo/cities
返回国家(以及可选的地区)内可用于 city-<slug> 定向的城市。
| Parameter | In | Required | Description |
|---|---|---|---|
api_key | query | yes | 你的 API 密钥 |
country | query | yes | ISO 3166-1 alpha-2 国家代码 |
region | query | no | 用于缩小结果范围的地区 slug |
示例:
curl "https://shifter.io/api/v1/residential/geo/cities?country=us®ion=california&api_key=YOUR_API_KEY"响应:
[ { "slug": "los_angeles", "name": "Los Angeles" }, { "slug": "san_francisco", "name": "San Francisco" }, { "slug": "san_diego", "name": "San Diego" }]列出 ASN
Section titled “列出 ASN” GET https://shifter.io/api/v1/residential/geo/asns
返回国家内可用于 asn-<num> 定向的 ASN。
| Parameter | In | Required | Description |
|---|---|---|---|
api_key | query | yes | 你的 API 密钥 |
country | query | yes | ISO 3166-1 alpha-2 国家代码 |
示例:
curl "https://shifter.io/api/v1/residential/geo/asns?country=us&api_key=YOUR_API_KEY"响应:
[ { "asn": 7922, "name": "Comcast" }, { "asn": 701, "name": "Verizon" }, { "asn": 22773, "name": "Cox Communications" }]- Residential Proxies 概述
- 地理定向 —— 如何将这些选择器放入用户名中
- 认证 —— 代理认证与管理 API 认证的区别