Skip to content
登录 注册

住宅代理 API

Residential Proxies 产品通过网关用户名按请求进行配置,它没有针对账户的“管理”API。此 API 为你提供的是一种枚举地理选择器的方式,你可以将其放入用户名中(countryregioncityasn),从而让你的工具与实际可用内容保持同步。

所有端点均通过 api_key 查询参数进行认证。在面板Account → API Keys 下生成密钥。

?api_key=YOUR_API_KEY
GET https://shifter.io/api/v1/residential/geo/countries

返回 Residential Proxies 网关上可用于 country-<iso2> 定向的所有国家。

ParameterInRequiredDescription
api_keyqueryyes你的 API 密钥

示例:

Terminal window
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> 定向的地区(州/省)。

ParameterInRequiredDescription
api_keyqueryyes你的 API 密钥
countryqueryyesISO 3166-1 alpha-2 国家代码,例如 us

示例:

Terminal window
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> 定向的城市。

ParameterInRequiredDescription
api_keyqueryyes你的 API 密钥
countryqueryyesISO 3166-1 alpha-2 国家代码
regionqueryno用于缩小结果范围的地区 slug

示例:

Terminal window
curl "https://shifter.io/api/v1/residential/geo/cities?country=us&region=california&api_key=YOUR_API_KEY"

响应:

[
{ "slug": "los_angeles", "name": "Los Angeles" },
{ "slug": "san_francisco", "name": "San Francisco" },
{ "slug": "san_diego", "name": "San Diego" }
]
GET https://shifter.io/api/v1/residential/geo/asns

返回国家内可用于 asn-<num> 定向的 ASN。

ParameterInRequiredDescription
api_keyqueryyes你的 API 密钥
countryqueryyesISO 3166-1 alpha-2 国家代码

示例:

Terminal window
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" }
]