For developers (API)

Api allows you to integrate proxy purchase or extension 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.

To address API use the following address:

https://proxy6.net/api/{api_key}/{method}/?{params}
  • api_key - Secret key that you receive on personal account page
  • method - Name of the method
  • params - Additional parameters of the query depending on the method

Available methods:

  • getprice - Display information on order total cost
  • getcount - Display information on available amount of proxies for selected country
  • getcountry - Display the list of available countries
  • getproxy - Display the list of your proxies
  • settype - Changing the type (protocol) proxies
  • setdescr - Update technical comment
  • buy - Buy proxy
  • prolong - Extend selected proxies
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 number
  • 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 - Number of the error
  • error - Description of the error

Method "getprice"

Displays the information on order cost depending on period and amount of proxies

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

In the given example we receive the information on cost of 100 proxies for a 30 days period.
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, 6 - IPv6 (default)
https://proxy6.net/api/{api_key}/getcount?country=ru

In the given example we receive the information on amount of proxies available to purchase in Russia
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, 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.
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",
"date": "2016-06-19 16:32:39",
"date_end": "2016-07-12 11:50:41",
"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",
"date": "2016-06-27 16:06:22",
"date_end": "2016-07-11 16:06:22",
"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
    • 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 given example we change the type of proxies with number 10,11,12,15 on SOCKS5.
In case of successful reply:

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

В случае успешного изменения типа, метод не возвращает в ответе никаких новых данных.
В случае, если ВСЕ прокси, у которых вы хотите изменить тип (переданные через параметр ids), уже имеют соответствующий тип (протокол), то вернется ошибочный ответ с номером 30 (Error unknown).


Method "setdescr"

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

Method parameters:
  • old - (Required) - Technical comment to be changed;
  • new - (Required) - Technical comment to which you want to change. The maximum length of 50 characters
https://proxy6.net/api/{api_key}/setdescr?old=test&new=newtest

In given 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, 6 - IPv6 (default)
  • type - Proxies type (protocol): socks, либо 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
https://proxy6.net/api/{api_key}/buy?count=1&period=7&country=ru

In given example we purchase 1 proxy for Russia 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",
"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
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"
},
"16": {
"id": 16,
"date_end": "2016-07-16 09:31:21"
}
}
}
  • 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

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