Get Entry Nodes
GET
/access/entry-nodes
Different entry nodes help to determine the faster route from the country you are situated in.
In almost all cases, you should use geo.iproyal.com
which will automatically determine the best server for your location.
Example request:
cURL PHP Python Node.js
Copy curl -X GET https://resi-api.iproyal.com/v1/access/entry-nodes \
-H "Authorization: Bearer <your_api_token>"
Copy <? php
$api_token = '<your_api_token>' ;
$url = 'https://resi-api.iproyal.com/v1/access/entry-nodes' ;
$ch = curl_init () ;
curl_setopt ( $ch , CURLOPT_URL , $url ) ;
curl_setopt ( $ch , CURLOPT_HTTPGET , true ) ;
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt ( $ch , CURLOPT_HTTPHEADER , $headers ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>
Copy import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/entry-nodes'
headers = {
'Authorization' : f 'Bearer {api_token} '
}
response = requests . get (url, headers = headers)
print (response.text)
Copy const https = require ( 'https' );
const apiToken = '<your_api_token>' ;
const url = 'https://resi-api.iproyal.com/v1/access/entry-nodes' ;
const options = {
method : 'GET' ,
headers : {
'Authorization' : `Bearer ${ apiToken } `
}
};
const req = https .request (url , options , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log (data);
});
});
req .on ( 'error' , (error) => {
console .error ( 'Error:' , error .message);
});
req .end ();
Example response:
Copy [
{
"dns" : "proxy.iproyal.com" ,
"ips" : [ "91.239.130.34" ] ,
"ports" : [
{
"name" : "http|https" ,
"port" : 12321 ,
"alternative_ports" : [
11200 ,
...
]
} ,
{
"name" : "socks5" ,
"port" : 32325 ,
"alternative_ports" : [
51200 ,
...
]
}
]
} ,
{
"dns" : "us.proxy.iproyal.com" ,
"ips" : [ "23.146.144.102" , "23.146.144.102" ] ,
"ports" : [
{
"name" : "http|https" ,
"port" : 12321 ,
"alternative_ports" : [
11246 ,
...
]
} ,
{
"name" : "socks5" ,
"port" : 32325 ,
"alternative_ports" : [
51200 ,
...
]
}
]
} ,
...
]
Get Countries
GET
/access/countries
Returns a list of countries, cities, states, and ISPs (Internet Service Providers) that could be used to target a specific proxy. It also returns prefixes to use for each. For more information on how to build a proxy string, refer to our 'Proxy' subsection.
Proxy
Depending on some settings set for you as a user, it will return different results.
Identity verification - provides a larger selection of options.
Skip ISP Static (Admin activatable) - on top of verified identity, includes a parameter that will reflect the availability of proxies, skipping static proxies.
ISPs enabled (Admin activatable ) - includes ISPs in every location.
Show IP availability (Admin activatable ) - adds a parameter that shows the availability of proxies in that location.
Example request:
cURL PHP Python Node.js
Copy curl -X GET https://resi-api.iproyal.com/v1/access/countries \
-H "Authorization: Bearer <your_api_token>"
Copy <? php
$api_token = '<your_api_token>' ;
$url = 'https://resi-api.iproyal.com/v1/access/countries' ;
$ch = curl_init () ;
curl_setopt ( $ch , CURLOPT_URL , $url ) ;
curl_setopt ( $ch , CURLOPT_HTTPGET , true ) ;
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt ( $ch , CURLOPT_HTTPHEADER , $headers ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>
Copy import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/countries'
headers = {
'Authorization' : f 'Bearer {api_token} '
}
response = requests . get (url, headers = headers)
print (response.text)
Copy const https = require ( 'https' );
const apiToken = '<your_api_token>' ;
const url = 'https://resi-api.iproyal.com/v1/access/countries' ;
const options = {
method : 'GET' ,
headers : {
'Authorization' : `Bearer ${ apiToken } `
}
};
const req = https .request (url , options , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log (data);
});
});
req .on ( 'error' , (error) => {
console .error ( 'Error:' , error .message);
});
req .end ();
Example response:
Copy {
"prefix" : "_country-" ,
"countries" : [
{
"code" : "ae" ,
"name" : "United Arab Emirates" ,
"cities" : {
"prefix" : "_city-" ,
"options" : [
{
"code" : "abudhabi" ,
"name" : "Abu dhabi" ,
"isps" : {
"prefix" : "_isp-" ,
"options" : [
{
"code" : "emiratesintegratedtelecommunicationscompanypjsc" ,
"name" : "Emirates Integrated Telecommunications Company PJSC" ,
"ip_availability" : "low" ,
"ip_availability_skip_isp_static" : "low"
} ,
{
"code" : "emiratestelecommunicationsgroupcompanyetisalatgrouppjsc" ,
"name" : "Emirates Telecommunications Group Company (Etisalat Group) PJSC" ,
"ip_availability" : "medium" ,
"ip_availability_skip_isp_static" : "medium"
}
]
} ,
"ip_availability" : "medium" ,
"ip_availability_skip_isp_static" : "medium"
} ,
{
"code" : "ajman" ,
"name" : "'ajman" ,
"isps" : {
"prefix" : "_isp-" ,
"options" : [
{
"code" : "emiratesintegratedtelecommunicationscompanypjsc" ,
"name" : "Emirates Integrated Telecommunications Company PJSC" ,
"ip_availability" : "low" ,
"ip_availability_skip_isp_static" : "low"
} ,
{
"code" : "emiratestelecommunicationsgroupcompanyetisalatgrouppjsc" ,
"name" : "Emirates Telecommunications Group Company (Etisalat Group) PJSC" ,
"ip_availability" : "low" ,
"ip_availability_skip_isp_static" : "low"
}
]
} ,
"ip_availability" : "medium" ,
"ip_availability_skip_isp_static" : "medium"
} ,
...
]
}
} ,
...
]
}
Get Regions
Similarly to #countries , it returns available regions for use when targeting a proxy.
GET
/access/regions
Example request:
cURL PHP Python Node.js
Copy curl -X GET https://resi-api.iproyal.com/v1/access/regions \
-H "Authorization: Bearer <your_api_token>"
Copy <? php
$api_token = '<your_api_token>' ;
$url = 'https://resi-api.iproyal.com/v1/access/regions' ;
$ch = curl_init () ;
curl_setopt ( $ch , CURLOPT_URL , $url ) ;
curl_setopt ( $ch , CURLOPT_HTTPGET , true ) ;
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt ( $ch , CURLOPT_HTTPHEADER , $headers ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>
Copy import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/regions'
headers = {
'Authorization' : f 'Bearer {api_token} '
}
response = requests . get (url, headers = headers)
print (response.text)
Copy const https = require ( 'https' );
const apiToken = '<your_api_token>' ;
const url = 'https://resi-api.iproyal.com/v1/access/regions' ;
const options = {
method : 'GET' ,
headers : {
'Authorization' : `Bearer ${ apiToken } `
}
};
const req = https .request (url , options , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log (data);
});
});
req .on ( 'error' , (error) => {
console .error ( 'Error:' , error .message);
});
req .end ();
Example response:
Copy {
"prefix" : "_region-" ,
"regions" : [
{
"code" : "africa" ,
"name" : "Africa"
} ,
{
"code" : "arabstates" ,
"name" : "Arab States"
} ,
{
"code" : "asiapacific" ,
"name" : "Asia & Pacific"
} ,
{
"code" : "europe" ,
"name" : "Europe"
} ,
{
"code" : "middleeast" ,
"name" : "Middle east"
} ,
{
"code" : "northamerica" ,
"name" : "North America"
} ,
{
"code" : "southlatinamerica" ,
"name" : "South/Latin America"
}
]
}
Get Country Sets
GET
/access/country-sets
Similarly to #countries , it returns available country sets to use when targeting a proxy.
Example request:
cURL PHP Python Node.js
Copy curl -X GET https://resi-api.iproyal.com/v1/access/country-sets \
-H "Authorization: Bearer <your_api_token>"
Copy <? php
$api_token = '<your_api_token>' ;
$url = 'https://resi-api.iproyal.com/v1/access/country-sets' ;
$ch = curl_init () ;
curl_setopt ( $ch , CURLOPT_URL , $url ) ;
curl_setopt ( $ch , CURLOPT_HTTPGET , true ) ;
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt ( $ch , CURLOPT_HTTPHEADER , $headers ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>
Copy import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/country-sets'
headers = {
'Authorization' : f 'Bearer {api_token} '
}
response = requests . get (url, headers = headers)
print (response.text)
Copy const https = require ( 'https' );
const apiToken = '<your_api_token>' ;
const url = 'https://resi-api.iproyal.com/v1/access/country-sets' ;
const options = {
method : 'GET' ,
headers : {
'Authorization' : `Bearer ${ apiToken } `
}
};
const req = https .request (url , options , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log (data);
});
});
req .on ( 'error' , (error) => {
console .error ( 'Error:' , error .message);
});
req .end ();
Example response:
Copy {
"prefix" : "_set-" ,
"countrySets" : [
{
"code" : "courir" ,
"name" : "COURIR"
} ,
{
"code" : "mesh1" ,
"name" : "MESH 1"
} ,
{
"code" : "mesh2" ,
"name" : "MESH 2"
} ,
{
"code" : "nikeas" ,
"name" : "NIKE ASIA"
} ,
{
"code" : "nikeeu" ,
"name" : "NIKE EU"
} ,
{
"code" : "nikena" ,
"name" : "NIKE US"
} ,
{
"code" : "zalando" ,
"name" : "ZALANDO"
}
]
}
Generate Proxy List
POST
/access/generate-proxy-list
If subuser_hash
is supplied, username
and password
are not needed, and vice versa - if username
and password
are supplied - subuser_hash
is not needed.
The location you wish to use needs to be prefixed with a "prefix" that is described in the Get Countries , for example if you want to target Singapore - "_country-sg "
Body Parameters
Name Type Description Available options Format in which proxy strings will be returned
Copy {hostname}:{port}:{username}:{password}
{hostname}:{port}@{username}:{password}
{username}:{password}:{hostname}:{port}
Hostname that will be used
Rotation that will be used
Subuser that will be used
Location that will be used
Proxy count that will be returned
Username that will be used
Password that will be used
For sticky sessions this will tell how long this session will last
Example request:
cURL PHP Python Node.js
Copy curl -X POST https://resi-api.iproyal.com/v1/access/generate-proxy-list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_token>" \
-d '{
"format": "{hostname}:{port}:{username}:{password}",
"hostname": "example.hostname.com",
"port": "http|https",
"rotation": "sticky",
"location": "_country-sg",
"proxy_count": 10,
"subuser_hash": "example_subuser_hash",
"lifetime": "2h"
}'
Copy <? php
$api_token = '<your_api_token>' ;
$url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list' ;
$data = [
'format' => '{hostname}:{port}:{username}:{password}' ,
'hostname' => 'example.hostname.com' ,
'port' => 1234 ,
'rotation' => 'sticky' ,
'location' => '_country-sg' ,
'proxy_count' => 10 ,
'subuser_hash' => 'example_subuser_hash'
];
$payload = json_encode ( $data ) ;
$ch = curl_init ( $url ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
curl_setopt ( $ch , CURLOPT_HTTPHEADER , [
'Content-Type: application/json' ,
"Authorization: Bearer $api_token"
] ) ;
curl_setopt ( $ch , CURLOPT_POST , true ) ;
curl_setopt ( $ch , CURLOPT_POSTFIELDS , $payload ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>
Copy import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list'
data = {
'format' : ' {hostname} : {port} : {username} : {password} ' ,
'hostname' : 'example.hostname.com' ,
'port' : 1234 ,
'rotation' : 'sticky' ,
'location' : '_country-sg' ,
'proxy_count' : 10 ,
'subuser_hash' : 'example_subuser_hash'
}
headers = {
'Content-Type' : 'application/json' ,
'Authorization' : f 'Bearer {api_token} '
}
response = requests . post (url, json = data, headers = headers)
print (response.text)
Copy const https = require ( 'https' );
const apiToken = '<your_api_token>' ;
const url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list' ;
const data = JSON .stringify ({
format : '{hostname}:{port}:{username}:{password}' ,
hostname : 'example.hostname.com' ,
port : 1234 ,
rotation : 'sticky' ,
location : '_country-sg' ,
proxy_count : 10 ,
subuser_hash : 'example_subuser_hash'
});
const options = {
method : 'POST' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : `Bearer ${ apiToken } `
}
};
const req = https .request (url , options , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log (data);
});
});
req .on ( 'error' , (error) => {
console .error ( 'Error:' , error .message);
});
req .write (data);
req .end ();