List residential ASNs
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.ltesocks.io/v2/proxies/residential/locations/asn', params: {page: '1', page_size: '25'}, headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.ltesocks.io/v2/proxies/residential/locations/asn";
let querystring = [ ("page", "1"), ("page_size", "25"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25' \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - 'https://api.ltesocks.io/v2/proxies/residential/locations/asn?page=1&page_size=25'Search the complete available ASN catalogue by ASN number or operator name. country_code optionally restricts results to one country. Each ASN appears once with its country_codes. Uses page/page_size pagination with a maximum page_size of 100. Requires the proxy.residential.locations.asn token ability or a wildcard token.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Country targeting code returned by countries. Matching is case insensitive.
Search by ASN number or operator name.
Page number, starting at 1.
Number of records per page.
Region targeting code; requires country_code.
City targeting code; requires country_code.
Responses
Section titled “Responses”Matching targeting options from the active residential provider. Unknown countries or regions and pages beyond the last page return an empty data array.
object
object
ASN number as a string.
object
Number of matching records before pagination.
Example
{ "success": true, "code": 200, "page_info": { "page": 1, "page_size": 25, "total_count": 1 }}Missing or invalid bearer token.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Token does not grant proxy.residential.locations.asn.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Invalid query parameters or missing required country_code.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Request rate limit exceeded.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Internal service or upstream failure.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Residential provider returned invalid data.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}Residential provider is unavailable.
object
Validation errors by query parameter, present for HTTP 422.
object
Example
{ "success": false, "code": 422}