本API提供获取高质量代理IP的服务,支持获取不同协议类型的代理,可自定义获取数量。
GET https://proxy.scdn.io/api/get_proxy.php
以下是一些常用的API调用示例,点击链接可以直接查看返回结果:
参数名 | 类型 | 必选 | 说明 |
---|---|---|---|
protocol | string | 否 | 代理协议类型:http, https, socks4, socks5, all(默认) |
count | integer | 否 | 获取代理数量,默认1个,最大20个 |
{
"code": 200,
"message": "success",
"data": {
"proxies": [
"192.168.1.1:8080",
"10.0.0.1:3128"
],
"count": 2
}
}
$url = 'https://proxy.scdn.io/api/get_proxy.php?protocol=http&count=2';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
import requests
url = 'https://proxy.scdn.io/api/get_proxy.php'
params = {
'protocol': 'http',
'count': 2
}
response = requests.get(url, params=params)
data = response.json()
print(data)
fetch('https://proxy.scdn.io/api/get_proxy.php?protocol=http&count=2')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));