Skip to main content
GET
/
proxies
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});

const proxies = await client.proxies.list();

console.log(proxies);
import os
from kernel import Kernel

client = Kernel(
api_key=os.environ.get("KERNEL_API_KEY"), # This is the default and can be omitted
)
proxies = client.proxies.list()
print(proxies)
package main

import (
"context"
"fmt"

"github.com/kernel/kernel-go-sdk"
"github.com/kernel/kernel-go-sdk/option"
)

func main() {
client := kernel.NewClient(
option.WithAPIKey("My API Key"),
)
proxies, err := client.Proxies.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", proxies)
}
curl --request GET \
--url https://api.onkernel.com/proxies \
--header 'Authorization: Bearer <token>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/proxies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.onkernel.com/proxies")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.onkernel.com/proxies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "country": "US",
    "id": "<string>",
    "name": "<string>",
    "protocol": "https",
    "bypass_hosts": [
      "<string>"
    ],
    "last_checked": "2023-11-07T05:31:56Z",
    "ip_address": "192.168.1.1",
    "config": {
      "country": "US"
    }
  }
]
{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}
{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}
{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

List of proxies

Configuration for routing traffic through a proxy.

type
enum<string>
required

Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: mobile > residential > isp > datacenter.

Available options:
datacenter,
isp,
residential,
mobile,
custom
country
string

ISO 3166 country code. Defaults to US if not provided.

Example:

"US"

id
string
name
string

Readable name of the proxy.

protocol
enum<string>
default:https

Protocol to use for the proxy connection.

Available options:
http,
https
bypass_hosts
string[]

Hostnames that should bypass the parent proxy and connect directly.

status
enum<string>

Current health status of the proxy.

Available options:
available,
unavailable
last_checked
string<date-time>

Timestamp of the last health check performed on this proxy.

ip_address
string

IP address that the proxy uses when making requests.

Example:

"192.168.1.1"

config
object

Configuration specific to the selected proxy type.