Get endpoints by type
curl --request GET \
--url https://api.decodo.com/v2/endpoints/{type}import requests
url = "https://api.decodo.com/v2/endpoints/{type}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.decodo.com/v2/endpoints/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodo.com/v2/endpoints/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodo.com/v2/endpoints/{type}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodo.com/v2/endpoints/{type}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodo.com/v2/endpoints/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"[\n 0:{\n \"location\":\"Random\"\n \"hostname\":\"gate.decodo.com\"\n \"port_range\":\"7000\"\n }\n 1:{\n \"location\":\"Canada\"\n \"hostname\":\"ca.decodo.com\"\n \"port_range\":\"20000\"\n}""{\n \"error_code\":\"bad_request\"\n \"message\":\"Bad proxy type provided.\"\n}"Endpoints
Get endpoints by type
Get a list of endpoints by a specified type for Residential subscription
GET
/
v2
/
endpoints
/
{type}
Get endpoints by type
curl --request GET \
--url https://api.decodo.com/v2/endpoints/{type}import requests
url = "https://api.decodo.com/v2/endpoints/{type}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.decodo.com/v2/endpoints/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodo.com/v2/endpoints/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodo.com/v2/endpoints/{type}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodo.com/v2/endpoints/{type}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodo.com/v2/endpoints/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"[\n 0:{\n \"location\":\"Random\"\n \"hostname\":\"gate.decodo.com\"\n \"port_range\":\"7000\"\n }\n 1:{\n \"location\":\"Canada\"\n \"hostname\":\"ca.decodo.com\"\n \"port_range\":\"20000\"\n}""{\n \"error_code\":\"bad_request\"\n \"message\":\"Bad proxy type provided.\"\n}"Path Parameters
Available options:
random, sticky Response
200
Was this page helpful?
⌘I