Skip to main content
Read your traffic, retrieve locations and usage statistics, and manage supported account resources from code. The SDK account client is separate from the proxy builder. It uses your API key, not your proxy password, and sends management requests directly to the account API. You do not need to route those requests through a proxy. This guide covers Python 0.1.7, Rust 0.2.2, and Go v0.1.1. Start with the corresponding Python, Rust, or Go installation guide. Rust examples use the SDK’s default HTTP feature.

1. Set your API key

In the dashboard, open Profile → API key and copy the key. On macOS or Linux:
On Windows PowerShell:
Set the raw key, without an x-api-key or Bearer prefix. The client builds the authorization header for you. Keep the key in server-side environment variables or your application’s secret store. Use the SDK’s default base URL unless your deployment specifically requires an override. Do not replace it with a complete endpoint URL copied from the REST reference: the SDK appends its own paths.

2. Read your traffic balance

These are complete programs. Use separate files/projects from the proxy quickstarts because each example has its own entry point.
The data field is the remaining traffic in bytes. The response also contains proxy credentials, so print only the fields you need. Do not log me or sub-user responses in full. In this endpoint’s response, is_traffic_frozen is a string, not a boolean; do not treat a nonempty string as a true/false flag. The remaining examples are fragments that reuse client. Add Rust fragments before Ok(()); add Go fragments inside run, before return nil. Additional Go imports are named where needed.

3. Retrieve location codes

Read the location catalogue instead of guessing names. For example, retrieve US cities in a selected region.
Use regions first to find the relevant region code for your country. Filter names such as country__code have two underscores. The server can ignore an unknown filter name, so check spelling carefully. List methods return a page, not necessarily every row. Use the iterator to walk the remaining pages. Reading ZIP catalogue entries does not make zip an accepted proxy-builder parameter.

4. Check the country and required region

The account client’s validate method checks whether a country is in the current catalogue and detects a city without a region. It does not fully match region, city, or carrier values against their catalogues, and it does not open a proxy tunnel. These snippets also need your proxy credentials in the environment.
An empty list means these checks found no problem. It is not a complete configuration or availability guarantee. Follow with a connection check and real request.

5. Retrieve usage statistics

Statistics use the base proxy username, without targeting/session suffixes. Set NODEMAVEN_LOGIN to the main user’s or sub-user’s proxy username, then request a time window.
Use statistics_requests / StatisticsRequests for request counts and domain_statistics / DomainStatistics for traffic by domain. For an explicit range, supply both start and end as dd-mm-yyyy, for example 01-10-2026 and 07-10-2026. Do not omit both the range and period.

6. Manage sub-users

Creating a sub-user changes the account. The example below creates worker_001 with an enabled traffic limit of 1,000,000,000 bytes. Choose an unused username and set NODEMAVEN_SUBUSER_PASSWORD to the password you want to assign before running it. Usernames and passwords must be 9–100 characters and contain only letters, digits, or underscores.
Traffic limits are in bytes. When updating a limit, send either an absolute traffic_limit or a relative traffic_limit_increment_bytes, not both. The clients also support listing, updating, deleting, and resetting usage for sub-users. See the sub-user API reference for the effects and field constraints.

7. Manage the IP whitelist

The clients can list, inspect, add/update, and delete whitelist entries. An upsert can create an entry or update an existing one, so use it only when you intend to change account access. Set NODEMAVEN_WHITELIST_IP to the public egress IP of the machine you want to authorize. This example requests one HTTP proxy port for that entry. The calling machine’s IP is not detected or added automatically.
Whitelisting is a separate authentication workflow from the username/password proxy examples. See IP Whitelist setup and the IP whitelist API reference.

SDK coverage and API errors

The REST API includes areas that these SDK clients do not wrap, such as webhooks and API-key management. Use the API Reference for those operations; do not infer an SDK method from an endpoint name. Account responses use the server’s field names. Python returns dictionaries, Rust uses serde_json::Value, and Go uses map[string]any with JSON numbers represented as json.Number. For 401/403, check the API key and account permissions. For 429, apply bounded backoff in your application. The clients do not retry automatically. A non-JSON response is an API error even if its HTTP status is 2xx. See Check connections and handle SDK errors for error types in each language.

References