首页
U
-
API 接口文档

GET 提取代理IP

请求地址

https://haiwaiip6.net/api/extract?api_key=YOUR_KEY&count=10&format=text

请求参数

参数必填类型说明
api_keystring您的 API Key,在账户总览页面获取
countint提取数量,默认 1,最大 1000
formatstring返回格式:text (默认) / json
timeintIP 维持时长(分钟),默认 10,可选 1/5/10/30
proxy_typestring代理类型:datacenter (默认) / residential
countrystring国家代码,如 us、jp、kr、gb、de 等,不填则随机

返回示例 (text)

43.240.15.175:1000 103.231.13.168:1000 182.237.2.27:1000 43.240.15.175:1001

返回示例 (json)

{"code":0,"data":[{"ip":"43.240.15.175","port":1000},{"ip":"103.231.13.168","port":1000}]}

使用说明

1. 提取的代理IP支持 HTTP / HTTPS / SOCKS5 协议,同端口自动检测协议类型

2. 每个端口在 IP维持时长 内保持固定出口IP,到期自动更换

3. 使用前需将您的出口IP添加到白名单(白名单管理页面或API)

4. 代理认证方式为 IP白名单认证,无需用户名密码

5. 建议在非中国大陆网络环境下使用,以获得最佳连接质量

代理使用示例

curl (SOCKS5)

curl -x socks5://43.240.15.175:1000 https://httpbin.org/ip

curl (HTTP)

curl -x http://43.240.15.175:1000 https://httpbin.org/ip

Python (requests)

import requests proxies = {"http": "socks5://43.240.15.175:1000", "https": "socks5://43.240.15.175:1000"} r = requests.get("https://httpbin.org/ip", proxies=proxies) print(r.text)