Making Request
Basic Queries
Execute requests with only USERNAME and PASSWORD. Uses random mobile proxies IPs that rotate with each request.Every new request will use a different proxy.
Code Example
The following example illustrates how to query ipinfo.thordata.com using a randomly assigned IP address, with the request formatted for HTTPS to ensure secure and reliable communication.
curl -x "https://td-customer-USERNAME:[email protected]:5555" "https://ipinfo.thordata.com"using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
class csharp_https
{
static void Main(string[] args)
{
Task t = new Task(DownloadPageAsync);
t.Start();
Console.ReadLine();
}
static async void DownloadPageAsync()
{
string page = "https://ipinfo.thordata.com";
var proxy = new WebProxy("https://t.pr.thordata.net:5555")
{
UseDefaultCredentials = false,
Credentials = new NetworkCredential(
userName: "td-customer-USERNAME",
password: "PASSWORD")
};
var httpClientHandler = new HttpClientHandler()
{
Proxy = proxy,
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
var client = new HttpClient(handler: httpClientHandler, disposeHandler: true);
var response = await client.GetAsync(page);
using (HttpContent content = response.Content)
{
string result = await content.ReadAsStringAsync();
Console.WriteLine(result);
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}Targeted Requests
Thordata allows embedding geo-targeting and session parameters directly in your username to specify proxy locations (Continent/Country/state/city) or control Session.
Example: Using a proxy from Melbourne, Australia with a 10-minute sticky session
curl -x "https://td-customer-USERNAME-country-au-state-victoria-city-melbourne-sessid-au123-sesstime-10:[email protected]:5555" "https://ipinfo.thordata.com"Request Parameters
username
Proxy account credential
td-customer-username
continent
Target continent (omit for random)
continent-asia
country
Two-letter country code (omit for random)
country-au
state
Target state (omit for random)
state-victoria
city
Target continent can be set without the "state" parameter
city-melbourne
session
Required for Sticky IP and switching IPs.
sessid-au123456
sessTime
IP duration (1-90 minutes)
sesstime-10
password
Proxy account password
password
asn
Specific ISP (omit for random)
asn-AS1221
Last updated
Was this helpful?