9Proxies logo

Getting Started

Welcome to 9Proxies API.

This API document is designed for those interested in developing for our platform.

This API is still under development and will evolve.

Authentication

You need to be authenticated for all API requests. You can generate an API key in your profile dashboard.

Add the API key to all requests as a GET or POST parameter.

Nothing will work unless you include this API key

curl https://api.9proxies.com/get_static
-H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
				
<?php
  $headers=["Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b"];
  $ch=curl_init("https://api.9proxies.com/get_static");
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Errors

Code Name Description
200 OK Success
401 Authorization Failed Bad Authorization
400 Bad Request Something went wrong
403 Forbidden We couldn’t authenticate you

Get User Info

Get user information

curl https://api.9proxies.com/get_user_info?uid=111
-H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'get_user_info?uid=111');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Get products list

Get user products list. Return All proxies packages from user

curl https://api.9proxies.com/get_products_list
-H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'get_products_list');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Get Product Info

Get Product Information. Return Information from proxies package by product_id.

curl https://api.9proxies.com/get_product_info?id=5465
-H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'get_product_info?id=5465');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Set Authorization IP

Set Authorization IP for package.

Param Name Description
method POST Requets Method
product_id User Product ID ID of purcahsed proxies package. Get from get_products_list or get_product_info API
auth_ip New Authorization IP New Authorization IP for proxies package. IP, server IP where you want using proxies.
curl https://api.9proxies.com/set_auth_ip
  -H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
  -X POST -d 'product_id={product_id}&auth_ip={auth_ip}'
			
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'set_auth_ip');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
    CURLOPT_POST=>true,
    CURLOPT_POSTFIELDS=>[
      'pid'=>{product_id},
      'auth_ip'=>{auth_ip}
    ]
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Get Proxies List

Return list proxies working with input params.

Param Name Description
method POST Requets Method
country Proxies country Country is country code (ISO code). Get from get_static_list API
speed Proxies Speed score Speed in miliseconds (Ex: 0.05, mean: proxy speed from 0 to 0.05 miliseconds). Default value is empt, it's mean get all proxies from country.
curl https://api.9proxies.com/get_proxies_list
  -H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
  -X POST -d 'country=US&speed=0.2'
			
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'get_proxies_list');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
    CURLOPT_POST=>true,
    CURLOPT_POSTFIELDS=>[
      'country'=>'US',
      'speed'=>0.2
    ]
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>
				
			

Get our proxies statistics

Return our proxies statistics (group by country, total proxies, total fast proxies).

curl https://api.9proxies.com/get_static
  -H 'Auth-Token: 098f6bcd4621d373cade4e832627b4f6'
			
				
<?php
  $uri='https://api.9proxies.com/';
  $headers=['Auth-Token: 87baa0fa564f0c291c9f0a25742bb75b'];
  $ch=curl_init($uri.'get_static');
  curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER=>$headers,
    CURLOPT_RETURNTRANSFER=>true,
  ]);
  $result=curl_exec($ch);
  curl_close($ch);
  echo $result;
?>