Skip to content

API 模式获取 IP ​

通过 accessKey 鉴权的 API 模式接口:提取代理 IP,以及管理提取白名单。accessKey 请在控制台获取。

提示

控制台侧「动态住宅 · API 提取模式」的产品使用说明见 帮助中心。本页为对应的公共 HTTP 接口参数说明。

API 提取 IP ​

使用 accessKey 按条件提取代理 IP。

接口描述 ​

项目说明
方法GET
地址https://api2.ipmart.io/ipmart/common/getIps
认证方式accessKey

完整示例:

text
https://api2.ipmart.io/ipmart/common/getIps?accessKey=123456789&num=10&cntryCode=us&time=10&format=1&stateName=&cityName=

输入参数 ​

参数名称必选类型描述
accessKey是String用户 accessKey(请在控制台获取)
num是Int提取 IP 个数
cntryCode是StringIP 所属国家代码(如:US)
time是IntIP 有效时间,可填写 5–30 分钟任意数字
format是Int返回格式:1 = txt,2 = json
stateName否StringIP 所属州名称
cityName否StringIP 所属城市名称

返回示例 ​

json
{
  "10000": "8.217.249.213",
  "10001": "8.217.249.213"
}

添加白名单 ​

为 API 模式添加提取来源白名单 IP。

接口描述 ​

项目说明
方法GET
地址https://api2.ipmart.io/ipmart/common/addWhiteList
认证方式accessKey

完整示例:

text
https://api2.ipmart.io/ipmart/common/addWhiteList?accessKey=123456789&ips=113.87.160.97,113.87.160.98

输入参数 ​

参数名称必选类型描述
accessKey是String用户 accessKey(请在控制台获取)
ips是String支持多个 IP 白名单,使用逗号隔开

返回示例 ​

json
{
  "status": 200,
  "data": "白名单添加成功,30秒后生效."
}

查询白名单 ​

查询当前账号下的 API 模式白名单。

接口描述 ​

项目说明
方法GET
地址https://api2.ipmart.io/ipmart/common/findWhiteList
认证方式accessKey

完整示例:

text
https://api2.ipmart.io/ipmart/common/findWhiteList?accessKey=123456789

输入参数 ​

参数名称必选类型描述
accessKey是String用户 accessKey(请在控制台获取)

说明

原始文档未提供返回示例。实际响应字段以线上接口返回为准;若你有标准样例,可补充到本页。

删除白名单 ​

从 API 模式白名单中移除指定 IP。

接口描述 ​

项目说明
方法GET
地址https://api2.ipmart.io/ipmart/common/rmWhiteList
认证方式accessKey

完整示例:

text
https://api2.ipmart.io/ipmart/common/rmWhiteList?accessKey=123456789&ips=113.87.160.97,113.87.160.98

输入参数 ​

参数名称必选类型描述
accessKey是String用户 accessKey(请在控制台获取)
ips是String支持多个 IP 白名单,使用逗号隔开

返回示例 ​

json
{
  "status": 200,
  "data": "白名单移除成功,30秒后生效."
}