import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.proxies.check('id');
console.log(response.id);{
"type": "datacenter",
"country": "US",
"id": "<string>",
"name": "<string>",
"protocol": "https",
"bypass_hosts": [
"<string>"
],
"status": "available",
"last_checked": "2023-11-07T05:31:56Z",
"ip_address": "192.168.1.1",
"config": {
"country": "US"
}
}Run a health check on the proxy to verify it’s working. Optionally specify a URL to test reachability against a specific target. For ISP and datacenter proxies, this reliably tests whether the target site is reachable from the proxy’s stable exit IP. For residential and mobile proxies, the exit node varies between requests, so this validates proxy configuration and connectivity rather than guaranteeing site-specific reachability.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.proxies.check('id');
console.log(response.id);{
"type": "datacenter",
"country": "US",
"id": "<string>",
"name": "<string>",
"protocol": "https",
"bypass_hosts": [
"<string>"
],
"status": "available",
"last_checked": "2023-11-07T05:31:56Z",
"ip_address": "192.168.1.1",
"config": {
"country": "US"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Optional parameters for the proxy health check.
An optional URL to test reachability against. If provided, the proxy check will test connectivity to this URL instead of the default test URLs. Only HTTP and HTTPS schemes are allowed, and the URL must resolve to a public IP address. For ISP and datacenter proxies, the exit IP is stable, so a successful check reliably indicates that subsequent browser sessions will reach the target site with the same IP. For residential and mobile proxies, the exit node changes between requests, so a successful check validates proxy configuration but does not guarantee that a subsequent browser session will use the same exit IP or reach the same site — it is useful for verifying credentials and connectivity, not for predicting site-specific behavior.
Health check completed
Configuration for routing traffic through a proxy.
Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: mobile > residential > isp > datacenter.
datacenter, isp, residential, mobile, custom ISO 3166 country code. Defaults to US if not provided.
"US"
Readable name of the proxy.
Protocol to use for the proxy connection.
http, https Hostnames that should bypass the parent proxy and connect directly.
Current health status of the proxy.
available, unavailable Timestamp of the last health check performed on this proxy.
IP address that the proxy uses when making requests.
"192.168.1.1"
Configuration specific to the selected proxy type.
Show child attributes