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.
Python SDK
Manage proxies with a simple, Pythonic API. Supports Python 3.8+.
Node.js SDK
Full async/await support with TypeScript definitions. Supports Node.js 18+.
Go SDK
Idiomatic Go with context support and strong typing. Supports Go 1.21+.
Common Features
All SDKs share the same core feature set:
- Authentication — Simple API key setup
- Sub-User Management — Create, update, delete, and list proxy sub-users
- Group Management — Organize sub-users into groups
- Location Browsing — List available countries, regions, cities, and ISPs
- Proxy Presets — Save and reuse proxy configurations
- Analytics — Retrieve traffic usage and request statistics
- Error Handling — Typed exceptions/errors with clear messages
Source Code
All SDKs are open source and hosted on GitHub:
- ProxyHatCom/python-sdk — Python SDK
- ProxyHatCom/node-sdk — Node.js SDK
- ProxyHatCom/go-sdk — Go SDK
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)
}