Interface documentation
English
English
  • Public API
    • Introduce
      • Get token and key
    • Account
      • Query Traffic Balance
      • Query Wallet Balance
      • Query Traffic Usage Records
    • Location
      • Get Country List
      • Get State List
      • Get City List
      • Get ASN List
    • Proxy Users
      • Get Proxy Users List
      • Add Proxy Users
      • Update Proxy Users Information
      • Delete Proxy Users
      • Query Traffic Usage Records
    • Whitelist IPs
      • Get Whitelist IPs List
      • Add Whitelist IP
      • Delete whitelist IP
    • ISP / Datacenter Proxies
      • Get Proxy IP List
      • Query Proxy IP Expiration Time
    • Unlimited Proxy Servers
      • Get Unlimited Proxy Server List
      • Restart Unlimited Proxy Server
      • Get Unlimited Proxy Server Monitor
      • Unlimited Proxy Server Renewal
      • Unlimited Proxy Server Upgrades
    • API Extract Links
      • Residential Proxies
      • Unlimited Proxy Servers
  • CDK
    • Create CDK
    • Get CDK List
    • Revoke CDK
    • Get CDK Details
  • Web Scraper API
    • Task Run Status Explanation
    • Instructions for obtaining the task list
    • Get the crawl result file description
  • Error Code
    • Error code description
Powered by GitBook
On this page
  1. PUBLIC API NEW

Instructions for use

Last updated 5 months ago

This chapter will help you quickly understand and utilize our Thordata public API functionality, and the following steps will walk you through how to proceed with API usage.

Step 1. Get the account sign and apiKey parameters.

  1. Get your sign parameter value from .

The sign parameter is unique to your Thordata account and cannot be changed.

The apiKey parameter is the parameter you need to validate when executing API requests, and can be modified manually at the dashboard.

Step 2. Code Example

The following is a complete code example of the ISP Proxies Query Expired Time API that can be run directly from the Python 3 terminal environment.

import requests


sign = "Please fill in your sign"
apiKey = "Please fill in your apiKey"

url = "https://api.thordata.com/api/gateway/queryTimeIsp"
headers = {"sign": sign, "apiKey": apiKey, "Content-Type":"application/x-www-form-urlencoded"}

request_body = {
    "ips":"123.123.123.123"
}

response = requests.post(url, headers=headers, data=request_body)
print(response.text)

If you want to know more about how the above code is constructed, you can continue to read the following detailed step-by-step instructions.

Define variables

Sign and apiKey are parameter information that you need to replace.

sign = "Please fill in your sign"
apiKey = "Please fill in your apiKey"

Construct headers

Setting the API URL and request header information.

url = "https://api.thordata.com/api/gateway/queryTimeIsp"
headers = {"sign": sign, "apiKey": apiKey, "Content-Type":"application/x-www-form-urlencoded"}

Construct body

Replacement according to the parameters provided by the API interface (some API interfaces do not have the body parameter, you can directly delete this code when using).

request_body = {
    "ips":"123.123.123.123"
}

Send a request and print the API response content

response = requests.post(url, headers=headers, data=request_body)
print(response.text)

Step 3. Return Result

{
    "code": 200,
    "data": [
        {
            "ip": "123.123.123.123",
            "expire_time": 1735798456
        }
    ],
    "msg": "ok"
}

Get your apiKey parameter value from .

Dashboard >> Settings >> Account Details
Dashboard >> Settings >> Account Details