SDK Libraries

Official ProxyHat SDK libraries let you integrate residential proxy management into your applications with just a few lines of code.

Available SDKs

We provide official SDKs for the most popular programming languages. Each SDK wraps the ProxyHat REST API and provides a convenient, idiomatic interface for your language of choice.

Common Features

All SDKs share the same core feature set:

Source Code

All SDKs are open source and hosted on GitHub:

Authentication

All SDKs authenticate using your ProxyHat API key. You can create an API key from the dashboard or via the Authentication API.

from proxyhat import ProxyHat

client = ProxyHat(api_key="YOUR_API_KEY")
const { ProxyHat } = require("proxyhat");

const client = new ProxyHat({ apiKey: "YOUR_API_KEY" });
import "github.com/ProxyHatCom/go-sdk/proxyhat"

client := proxyhat.New("YOUR_API_KEY")

Quick Example

Here's a quick example showing how to list your sub-users using each SDK:

from proxyhat import ProxyHat

client = ProxyHat(api_key="YOUR_API_KEY")

# List all sub-users
sub_users = client.sub_users.list()
for user in sub_users:
    print(f"{user.username}: {user.traffic_used} bytes used")
const { ProxyHat } = require("proxyhat");

const client = new ProxyHat({ apiKey: "YOUR_API_KEY" });

// List all sub-users
const subUsers = await client.subUsers.list();
for (const user of subUsers) {
  console.log(`${user.username}: ${user.trafficUsed} bytes used`);
}
client := proxyhat.New("YOUR_API_KEY")

// List all sub-users
subUsers, err := client.SubUsers.List(context.Background())
if err != nil {
    log.Fatal(err)
}

for _, user := range subUsers {
    fmt.Printf("%s: %d bytes used\n", user.Username, user.TrafficUsed)
}