For developers (API)

Api allows you to integrate proxy purchase into your service or application.

Interaction of the partner with the system, as well as the interaction of the system with the partner, is possible by GET-requests and JSON-responds. All communication uses UTF-8 coding. The answer received in different coding will lead to operation errors.

API calls made to:

https://proxy6.net/api/{api_key}/{method}/?{params}
  • api_key - Secret key, you can get it in your account;
  • method - Name of the method;
  • params - Additional parameters of the query depending on the method.
Warning. The API is allowed to do no more than 3 queries in 1 second. If the limit is exceeded, error 503 will return to the extra requests.

Available methods:

  • getprice - Getting information about the cost of the order;;
  • getcount - Getting information about the available number of proxies for a specific country;
  • getcountry - Getting the list of available countries;
  • getproxy - Getting the list of your proxies;
  • settype - Changing the type (protocol) of the proxies;
  • setdescr - Update technical comment;
  • buy - Buy proxy;
  • prolong - Proxy list extension;
  • deleted - Deleting a proxy;
  • check - Proxy validity check.
When addressing any API method or addressing API without method (only with key: https://proxy6.net/api/{api_key}), the reply would always show following values:

Successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB"
}
  • status - Always "yes", if the reply is successful and no mistakes were made;
  • user_id - Account ID;
  • balance - Your current balance;
  • currency - Your account currency (RUB or USD).
Incorrect reply:

{
"status": "no",
"error_id": 100,
"error": "Error key"
}
  • status - Always "no", if the reply is incorrect;
  • error_id - Error number;
  • error - Error description.

Method "getprice"

Used to get information about the cost of the order, depending on the period and number of proxy.

Method paremeters:
  • count - (Required) - Number of proxies;
  • period - (Required) - Period – number of days;
  • version - Proxies version: 4 - IPv4, 3 - IPv4 Shared, 6 - IPv6 (default).
https://proxy6.net/api/{api_key}/getprice?count=100&period=30

In the example, we get information about the cost of 100 IPv6 proxies for 30 days.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"price": 1800,
"price_single": 0.6,
"period": 30,
"count": 100
}
  • price - Total cost;
  • price_single - Price of one proxy;
  • period - Given period (days);
  • count - Given amount of proxies.

Method "getcount"

Displays the information on amount of proxies available to purchase for a selected country.

Method parameters:
  • country - (Required) - Country code in iso2 format
  • version - Proxies version: 4 - IPv4, 3 - IPv4 Shared, 6 - IPv6 (default)
https://proxy6.net/api/{api_key}/getcount?country=ru

In the example we get information about the number of Russian IPv6 proxies available for purchase.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"count": 971
}
  • count - Available amount of proxies.

Method "getcountry"

Displays information on available for proxies purchase countries

Method paremeters:
  • version - Proxies version: 4 - IPv4, 3 - IPv4 Shared, 6 - IPv6 (default).
https://proxy6.net/api/{api_key}/getcountry?version=4

In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"list": ["ru","ua","us"]
}
  • list - The list of available countries in iso2 format.

Method "getproxy"

Displays the list of your proxies

Method parameters:
  • state - State returned proxies. Available values: active - Active, expired - Not active, expiring - Expiring, all - All (default);
  • descr - Technical comment you have entered when purchasing proxy. If you filled in this parameter, then the reply would display only those proxies with given parameter. If the parameter was not filled in, the reply would display all your proxies;
  • nokey - By adding this parameter (the value is not needed), the list will be returned without keys.
https://proxy6.net/api/{api_key}/getproxy

In case of successful reply:

{
"status":"yes",
"user_id":"1",
"balance":"48.80",
"currency":"RUB",
"list_count":4,
"list": {
"11": {
"id": "11",
"ip": "2a00:1838:32:19f:45fb:2640::330",
"host": "185.22.134.250",
"port": "7330",
"user": "5svBNZ",
"pass": "iagn2d",
"type": "http",
"country": "ru",
"date": "2016-06-19 16:32:39",
"date_end": "2016-07-12 11:50:41",
"unixtime": 1466379159,
"unixtime_end": 1468349441,
"descr": "",
"active": "1"
},
"14": {
"id": "14",
"ip": "2a00:1838:32:198:56ec:2696::386",
"host": "185.22.134.242",
"port": "7386",
"user": "nV5TFK",
"pass": "3Itr1t",
"type": "http",
"country": "ru",
"date": "2016-06-27 16:06:22",
"date_end": "2016-07-11 16:06:22",
"unixtime": 1466379151,
"unixtime_end": 1468349441,
"descr": "",
"active": "1"
}
}
}
  • list_count - Amount of proxies;
  • list - Proxies range;
    • id - Inner proxy ID, required to extend proxy with prolong method;
    • ip - IPv4 or IPv6 hidden behind host:port;
    • host - IPv4;
    • port - Port;
    • user - Login;
    • pass - Password;
    • type - Proxy type: http - HTTPS, socks - SOCKS5;
    • country - Country (iso2);
    • date - Proxy purchase date;
    • date_end - Proxy expiry date;
    • descr - Technical comment;
    • active - Active (1) or not active (0).

Method "settype"

Changes the type (protocol) in the proxy list.

Method parameters:
  • ids - (Required) - List of internal proxies’ numbers in our system, divided by comas;
  • type - (Required) - Sets the type (protocol): http - HTTPS or socks - SOCKS5.
https://proxy6.net/api/{api_key}/settype?ids=10,11,12,15&type=socks

In the example we change the type of proxies with number 10,11,12,15 to SOCKS5.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB"
}

In case of successful type change, the method does not return any new data in the response.
If all proxies in which you want to change the type (transmitted through the ids parameter) already have the appropriate type (protocol), it will return an error response with 30 (Error unknown) number.


Method "setdescr"

Update technical comments in the proxy list that was added when buying (method buy).

Method parameters:
  • new - (Required) - Technical comment to which you want to change. The maximum length of 50 characters;
  • old - Technical comment to be changed. The maximum length of 50 characters;
  • ids - List of internal proxies’ numbers in our system, divided by comas.
One of the parameters must be present - idsor descr.

https://proxy6.net/api/{api_key}/setdescr?old=test&new=newtest

In the example we change the comment from "test" to "newtest".
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"count": 4
}
  • count - Amount of proxies that were chanched.

Method "buy"

Used for proxy purchase

Method parameters:
  • count - (Required) - Amount of proxies for purchase;
  • period - (Required) - Period for which proxies are purchased in days;
  • country - (Required) - Country in iso2 format;
  • version - Proxies version: 4 - IPv4, 3 - IPv4 Shared, 6 - IPv6 (default);
  • type - Proxies type (protocol): socks or http (default);
  • descr - Technical comment for proxies list, max value 50 characters. Entering this parameter will help you to select certain proxies through getproxy method;
  • auto_prolong - By adding this parameter (the value is not needed), enables the purchased proxy auto-renewal;
  • nokey - By adding this parameter (the value is not needed), the list will be returned without keys.
https://proxy6.net/api/{api_key}/buy?count=1&period=7&country=ru

In given example we purchase 1 russian IPv6 proxy for 7 days.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": 42.5,
"currency": "RUB",
"count": 1,
"price": 6.3,
"price_single": 0.9,
"period": 7,
"country": "ru",
"list": {
"15": {
"id": "15",
"ip": "2a00:1838:32:19f:45fb:2640::330",
"host": "185.22.134.250",
"port": "7330",
"user": "5svBNZ",
"pass": "iagn2d",
"type": "http",
"date": "2016-06-19 16:32:39",
"date_end": "2016-07-12 11:50:41",
"unixtime": 1466379159,
"unixtime_end": 1468349441,
"active": "1"
}
}
}
  • count - The amount of proxies you want to purchase;
  • price - Total purchase cost;
  • price_single - Price of one proxy for selected amount and period;
  • period - Period for which proxies are purchased in days;
  • country - Country for which proxies are purchased in iso2 format;
  • list - Purchased proxies range;
    • id - Inner proxy ID number, required to extend proxy with prolong method;
    • ip - IPv6 hidden behind host:port;
    • host - IPv4;
    • port - Port;
    • user - Login;
    • pass - Password;
    • type - Proxy type: http - HTTPS, socks - SOCKS5;
    • date - Proxy purchase date;
    • date_end - Proxy expiry date;
    • active - Active (1) or not active (0).

Method "prolong"

Used to extend existing proxies.

Method parametres:
  • period - (Required) - Extension period in days;
  • ids - (Required) - List of internal proxies’ numbers in our system, divided by comas;
  • nokey - By adding this parameter (the value is not needed), the list will be returned without keys.
https://proxy6.net/api/{api_key}/prolong?period=7&ids=15,16

In the given example we extend proxies #15 and 16 for 7 days.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": 29,
"currency": "RUB",
"price": 12.6,
"price_single": 0.9,
"period": 7,
"count": 2,
"list": {
"15": {
"id": 15,
"date_end": "2016-07-15 06:30:27",
"unixtime_end": 1468349441
},
"16": {
"id": 16,
"date_end": "2016-07-16 09:31:21",
"unixtime_end": 1468349529
}
}
}
  • price - Total extension cost;
  • price_single - Price of one proxy for selected amount and period;
  • period - Period of extension in days;
  • count - Amount of successful extensions;
  • list - Extended proxies range;
    • id - Inner proxy ID number;
    • date_end - New expiry date for proxy.

Method "delete"

Used to delete proxies.

Method parametres:
  • ids - (Required) - List of internal proxies’ numbers in our system, divided by comas;
  • descr - (Required) - Technical comment you have entered when purchasing proxy or by method setdescr.
One of the parameters must be present - idsor descr.

https://proxy6.net/api/{api_key}/delete?ids=15,16

In the given example we deleted proxies #15 and 16.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"count": 4
}
  • count - Number of deleted proxies.

Method "check"

Used to check the validity of the proxy.

Method parametres:
  • ids - (Required) - Internal proxy number in our system.
https://proxy6.net/api/{api_key}/check?ids=15

In the given example we checking proxy #15.
In case of successful reply:

{
"status": "yes",
"user_id": "1",
"balance": "48.80",
"currency": "RUB",
"proxy_id": 15,
"proxy_status": true
}
  • proxy_id - Internal proxy number in our system;
  • proxy_status - Result of checking: true or false.

Error codes


Code Text Description
30 Error unknown Unknown error
100 Error key Authorization error, wrong key
110 Error method Wrong method
200 Error count Wrong proxies quantity, wrong amount or no quantity input
210 Error period Period error, wrong period input (days) or no input
220 Error country Country error, wrong country input (iso2 for country input) or no input
230 Error ids Error of the list of the proxy numbers. Proxy numbers have to divided with comas
250 Error descr Tech description error
260 Error type Proxy type (protocol) error. Incorrect or missing
300 Error active proxy allow Proxy amount error. Appears after attempt of purchase of more proxies than available on the service
400 Error no money Balance error. Zero or low balance on your account
404 Error not found Element error. The requested item was not found
410 Error price Error calculating the cost. The total cost is less than or equal to zero