【快代理API】查询隧道代理当前IP

接口描述

  • https://tps.kdlapi.com/api/tpscurrentip 接口地址
  • 实时查询隧道代理当前IP
  • 仅支持换IP周期>=1分钟的隧道代理订单
  • 注意要实际使用才能查询到当前IP

返回结果

返回隧道当前IP
【快代理API】查询隧道代理当前IP_第1张图片

参数说明

【快代理API】查询隧道代理当前IP_第2张图片

必填参数

  1. orderid 订单号
  2. signature API Key

获取订单号和API Key教程

代码样例

import requests

# 使用隧道代理
# 隧道服务器
tunnel_host = "tps176.kdlapi.com"
tunnel_port = 15818

# 隧道id和密码
tid = "t18538132507140"
password = "4zdldwy7"

proxies = {
     
    "http": "http://%s:%s@%s:%s/" % (tid, password, tunnel_host, tunnel_port),
    "https": "http://%s:%s@%s:%s/" % (tid, password, tunnel_host, tunnel_port)
}

r = requests.get("https://dev.kdlapi.com/testproxy", proxies=proxies)

# API接口
api_url = "https://tps.kdlapi.com/api/tpscurrentip"

# 订单号跟API Key
orderid = 918538132507097
api_key = "azx0jv2f1r9ytsmzuxskvrf9rp01vcea"

# 参数
params = {
     
        "orderid": orderid,
        "signature": api_key,
        }

res = requests.get(api_url, params=params)
print(res.content)

运行结果,返回当前代理
【快代理API】查询隧道代理当前IP_第3张图片

进阶学习

  • 查询隧道代理当前IP

你可能感兴趣的:(【快代理API】查询隧道代理当前IP)