Connect and integrate the API with your system.
You operate using your primary ProxyZing.Com account: sharing the same wallet balance, pricing, and tier-based discounts, and following the same purchasing and renewal workflows as on the ProxyZing.Com website
https://api.proxyzing.com/api/v1/X-API-Key: ...pxyGeneral information
Follow these steps to make your first API call, buy a proxy plan and renew it. Note: there is no sandbox, every request runs on the live system and charges real money.
GET /me/. If you get the account information back, the key is valid.GET /public/proxy-plans/, then read the plan you want to buy with GET /public/proxy-plans/{slug}/ to see its configuration (options, periods, quantity, prices).POST /public/proxy-plans/{slug}/purchase/. Send an Idempotency-Key so retries are safe, and build the body from configuration using the table below.proxies[] in the response, or fetch them again with GET /proxies/.GET /proxies/{id}/renew-options/ to see the allowed days and prices, then POST /proxies/{id}/renew/. A proxy that has expired (expires_at is earlier than the current time) cannot be renewed.curl "https://api.proxyzing.com/api/v1/me/" \
-H "X-API-Key: ...pxy"Every value you send comes from the plan configuration (plan detail). Add the _code suffix to every option name, except protocol, which keeps its name.
| In the plan configuration | In the purchase body |
|---|---|
periods[].code (for example daily) | period_code: "daily" |
quantity.min to quantity.max | quantity: a number within this range |
options.location.values[].code (for example 17) | selected_options.location_code: "17" |
options.protocol.values[].code (for example http) | selected_options.protocol: "http" |
pricing.price_table[].unit_total | Do not send. The server calculates the total = unit_total × quantity |
curl -X POST "https://api.proxyzing.com/api/v1/public/proxy-plans/proxy-dan-cu-viettel/purchase/" \
-H "X-API-Key: ...pxy" \
-H "Idempotency-Key: 7f3c9a2e-4b1d-4c8e-9a51-2d6f0b8e1c33" \
-H "Content-Type: application/json" \
-d '{"period_code":"daily","quantity":1,"selected_options":{"location_code":"17","protocol":"http"}}'curl -X POST "https://api.proxyzing.com/api/v1/proxies/<proxy_id>/renew/" \
-H "X-API-Key: ...pxy" \
-H "Idempotency-Key: 0c5e8a1b-6d24-4f7a-8b39-91e2a4c7d5f0" \
-H "Content-Type: application/json" \
-d '{"days":30}'Create an API key. Then send the key in the header of every request:
X-API-Key: ...pxyAuthorization: Bearer for API keys.customer role can use API keys. Keys created by staff or admin accounts are rejected when calling the API (401).| Situation | Result |
|---|---|
| Missing header on an endpoint that requires authentication | 401 not_authenticated |
| Wrong or revoked key, or a locked account | 401 authentication_failed |
| Calling an endpoint that is not in this documentation with a key | 403 permission_denied |
Content-Type: application/json."240000.00" (VND).?page=1&page_size=50 (page_size defaults to 20, maximum 100).error.code and the keys in error.details, never by matching error.message (it may change). details is always an object and each value is an array of strings.next until next is null, instead of incrementing the page number yourself (see Code examples).Conventions: id is a UUID, money is a decimal string with 2 digits, and times use ISO 8601 UTC. A Null value of "No" means the field always has a value (a string can be "", which is different from null). Items in a list have exactly the same structure as the detail response of the same kind of data.
| Field | Type | Null | Notes |
|---|---|---|---|
email | string | No | |
full_name | string | No | Up to 255 characters |
phone | string | No | Up to 20 characters |
role | string | No | The role of the account |
email_verification, is_active | boolean | No | |
balance, balance_affiliate | decimal string | No | |
partner_affiliate | object | Yes | null if there is no referrer |
partner_code | string | No | |
accumulated_points | integer | No | ≥ 0 |
rank.current_rank | object | No | id, code, name, min_points, deposit_bonus_percent, created_at |
rank.next_rank | object | Yes | null when the highest rank has been reached |
last_login | datetime | Yes | null if the user has never signed in |
created_at | datetime | No |
| Field | Type | Null | Notes |
|---|---|---|---|
slug, title_vi, title_en | string | No | |
description_vi, description_en | string | No | Can be "" |
kind | string | No | The values of the kind parameter of the plan list |
priority | integer | No | Unique, > 0 |
provider | object | No | {id, name} |
configuration | object | No | Empty (options: {}, periods: [], quantity: {}, pricing: {}) when the plan has a configuration problem |
configuration.quantity.max | integer | Yes | null means unlimited |
| Field | Type | Null | Notes |
|---|---|---|---|
plan | object | No | {id, kind, title_vi, title_en} |
status | string | No | pending, processing, completed, failed, cancelled. Purchases through the API only return completed or failed |
period_code | string | No | "" for bandwidth-priced plans |
days | integer | Yes | null for bandwidth-priced plans, otherwise > 0 |
selected_options | object | No | Can be {} |
quantity | integer | No | ≥ 1 |
unit_price, total_amount | decimal string | No | ≥ 0, a snapshot at the time of purchase |
proxies | array | No | Empty when the order has no proxies yet or is failed |
| Field | Type | Null | Notes |
|---|---|---|---|
provider_order_id | string | No | Can be "" |
ip_address | string | No* | IPv4 or IPv6 |
http_port, socks5_port | integer | Yes | 1 to 65535, null if the proxy does not support that protocol |
country | string | No* | A lowercase country code, can be "" |
username, password | string | No* | Can be "" |
expires_at | datetime | No | A proxy is expired when this time is earlier than the current time |
status | string | No | active, revoked, die. Expiry is determined by expires_at |
replaced_proxy, replaced_by | object | Yes | {id, ip_address, replaced_at}, see proxy detail |
order | object | No | Only in GET /proxies/ and GET /proxies/{id}/, see proxy detail |
can_rotate_ip, can_auto_rotate_ip, can_auto_renew | boolean | No | Only in GET /proxies/, GET /proxies/{id}/ and the renewal response |
rotate_min_seconds | integer | Yes | Minimum number of seconds, null when the plan does not support it. Present in the same endpoints as above |
* For revoked proxies, the fields ip_address, http_port, socks5_port, country, username and password are all null. Handle null for this whole group.
| Field | Type | Null | Notes |
|---|---|---|---|
wallet | string | No | main, affiliate |
transaction_type | string | No | The values of the transaction_type parameter of the balance history |
status | string | No | The values of the status parameter of the balance history |
balance_before, balance_after, amount, rank_bonus, event_bonus | decimal string | No | |
note | string | Yes | |
payout_details | object | Yes | Only has a value for affiliate withdrawals, it is null for purchases and renewals |
| HTTP | error.code | Meaning | What to do |
|---|---|---|---|
| 400 | validation_error | Invalid input or a business rule was violated (see details) | Fix the data using error.details, then resend. Do not resend the same request unchanged. |
| 400 | parse_error | The body is not valid JSON | Check the body and send valid JSON. |
| 401 | not_authenticated | Missing API key | Check that you send the X-API-Key header. |
| 401 | authentication_failed | Wrong or revoked key, or a locked account | Check that the key is still valid. Create a new key if it was revoked. |
| 403 | permission_denied | The endpoint cannot be used with an API key | Use only the endpoints listed in this documentation. |
| 404 | not_found | Does not exist or does not belong to you | Check the ID or slug. |
| 405 | method_not_allowed | Wrong method | Use the correct method for the endpoint. |
| 406 | not_acceptable | The Accept header is not supported | Remove the Accept header or use Accept: application/json. |
| 409 | request_in_progress | A request with the same Idempotency-Key is still being processed | Wait 2 to 3 seconds, then resend with the same Idempotency-Key. |
| 415 | unsupported_media_type | JSON was not sent | Send a JSON body with Content-Type: application/json. |
| 429 | throttled | Too many requests, try again later | Wait exactly the number of seconds in the Retry-After header, then call again. Do not retry immediately. |
| 502 | provider_error | Processing error on the system side (for example when rotating an IP) | Wait a few seconds and try again. For purchases and renewals, reuse the same Idempotency-Key. |
| 500 | internal_error | System error | Try again later. For purchases and renewals, keep the same Idempotency-Key and check your orders before buying again. |
When a purchase or renewal request times out or the connection drops, you cannot tell whether the server processed it. Resending without protection may buy or renew (and charge) twice. The Idempotency-Key header solves this for the purchase and renewal endpoints.
Idempotency-Key header.| Situation | Result |
|---|---|
| A new key, first time | Processed normally |
| Resending an old key whose earlier request succeeded | Returns the earlier result (same status and content, the current order or proxy) with the header Idempotent-Replayed: true. Nothing is bought and no money is charged again |
| Resending an old key while the earlier request is still running | 409 request_in_progress. Wait a few seconds, then resend with the same key |
| Reusing an old key with a different URL or body | 400 validation_error, details.idempotency_key |
| An empty key or one longer than 255 characters | 400 validation_error, details.idempotency_key |
| The earlier request failed (insufficient balance, invalid data, a processing failure with a refund) | The key is not used up. Fix the error and resend with the same key |
409 several times in a row (a few minutes), the original request may have been interrupted midway. Check GET /proxy-orders/?ordering=-created_at or GET /proxies/{id}/ to see whether the order or expiry has been updated. Do not change the key and buy again before checking.Idempotency-Key, the server does not de-duplicate and every request is a new purchase or renewal.crypto.randomUUID() in JavaScript or uuid.uuid4() in Python. The key must exist before the request is sent so it can be reused after a timeout.| Response | What to do |
|---|---|
201 (purchase) or 200 (renewal), with or without Idempotent-Replayed: true | Success. A replay is the result of the earlier attempt, handle it as usual |
| Timeout or network error | Resend with the same key and body, a few times, a few seconds apart. If it still fails, tell the user to check the order list before buying again |
409 request_in_progress | Wait 2 to 3 seconds, then resend with the same key |
400 with details.idempotency_key | The key was reused for another request. Generate a new key and only resend once you are sure the previous attempt did not succeed (check the orders) |
400 with another business error | The key is not used up. Fix the error and resend with the same key |
For web apps that call the API from the server (for example a Next.js server action), the key must be generated on the UI side when the form opens and passed down to the server, which forwards it as the header. If the server action generates a new key every time it is called, it does not prevent duplicates.
POST /public/proxy-check/: 10 requests per hour, counted per account when the request has a valid X-API-Key, and per IP when there is no key.POST /proxies/{id}/rotate-ip/: 30 requests per hour per account, counted across all proxies.429 throttled, with a Retry-After header giving the number of seconds to wait. Wait exactly that many seconds, then call again. Do not retry immediately.429 using Retry-After.Examples use Node.js (18 or later, save as a .mjs file) and Python (the requests library). Put the API key in the PROXYZING_API_KEY environment variable instead of writing it in the source code.
import { randomUUID } from "node:crypto";
const API_BASE = "https://api.proxyzing.com/api/v1/";
const API_KEY = process.env.PROXYZING_API_KEY;
async function api(path, { method = "GET", body, idempotencyKey } = {}) {
const headers = { "X-API-Key": API_KEY };
if (body) headers["Content-Type"] = "application/json";
if (idempotencyKey) headers["Idempotency-Key"] = idempotencyKey;
const response = await fetch(API_BASE + path, {
method,
headers,
body: body ? JSON.stringify(body) : undefined,
signal: AbortSignal.timeout(90_000),
});
const data = await response.json();
if (!response.ok) {
throw Object.assign(new Error(data.error.message), {
status: response.status,
code: data.error.code,
details: data.error.details,
});
}
return data;
}
async function purchase(slug, body) {
const idempotencyKey = randomUUID();
for (let attempt = 1; attempt <= 3; attempt++) {
try {
return await api("public/proxy-plans/" + slug + "/purchase/", {
method: "POST",
body,
idempotencyKey,
});
} catch (error) {
const retryable =
error.status === undefined || error.code === "request_in_progress";
if (!retryable || attempt === 3) throw error;
await new Promise((resolve) => setTimeout(resolve, 3000));
}
}
}
console.log(await api("me/"));
console.log(
await purchase("proxy-dan-cu-viettel", {
period_code: "daily",
quantity: 1,
selected_options: { location_code: "17", protocol: "http" },
}),
);import os
import time
import uuid
import requests
API_BASE = "https://api.proxyzing.com/api/v1/"
HEADERS = {"X-API-Key": os.environ["PROXYZING_API_KEY"]}
def get_me():
response = requests.get(API_BASE + "me/", headers=HEADERS, timeout=30)
response.raise_for_status()
return response.json()
def purchase(slug, body):
headers = {**HEADERS, "Idempotency-Key": str(uuid.uuid4())}
for attempt in range(1, 4):
try:
response = requests.post(
API_BASE + "public/proxy-plans/" + slug + "/purchase/",
json=body,
headers=headers,
timeout=90,
)
except requests.RequestException:
if attempt == 3:
raise
time.sleep(3)
continue
if response.status_code == 409 and attempt < 3:
time.sleep(3)
continue
response.raise_for_status()
return response.json()
print(get_me())
print(
purchase(
"proxy-dan-cu-viettel",
{
"period_code": "daily",
"quantity": 1,
"selected_options": {"location_code": "17", "protocol": "http"},
},
)
)The examples retry up to 3 times, 3 seconds apart, on a network error or 409. Every retry uses the same Idempotency-Key and the same body. If it still fails, check GET /proxy-orders/?ordering=-created_at before buying again.
const API_BASE = "https://api.proxyzing.com/api/v1/";
const API_KEY = process.env.PROXYZING_API_KEY;
let url = API_BASE + "proxy-orders/?page_size=100";
while (url) {
const response = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const page = await response.json();
for (const order of page.results) {
console.log(order.id);
}
url = page.next;
}import os
import requests
API_BASE = "https://api.proxyzing.com/api/v1/"
HEADERS = {"X-API-Key": os.environ["PROXYZING_API_KEY"]}
url = API_BASE + "proxy-orders/?page_size=100"
while url:
page = requests.get(url, headers=HEADERS, timeout=30).json()
for order in page["results"]:
print(order["id"])
url = page["next"]Follow the URL in next until next is null, instead of incrementing the page number yourself.
configuration instead of hard-coding the list of countries, periods, prices or quantity limits, because these values change over time./api/v1/. There is no versioning policy or change notice yet. Clients should ignore unknown fields in responses and rely on the plan configuration instead of hard-coding values.The full key is shown only once when it is created and cannot be viewed again. Delete the old key and create a new one.
No. Use the key only on your own server, never in a web or mobile app.
The server calculates the price, you do not send one. Total = unit_total × quantity (bandwidth-priced plans: price_per_gb × bandwidth_gb).
If the balance is insufficient or the data is invalid, you are not charged and no order is created. If order processing fails after you were charged, the system automatically refunds exactly the amount charged and the order becomes failed.
Yes, resend exactly the same request with the same Idempotency-Key. The server does not buy or charge again. If it still fails, check GET /proxy-orders/?ordering=-created_at before buying again.
No. A proxy whose expires_at is earlier than the current time cannot be renewed. The API returns a 400 error with details.expires_at and you are not charged.
Endpoints
Account
Returns the account information and balance. balance is the balance used for purchases and renewals Proxy, so check it before buying large quantities.
No parameters.
curl "https://api.proxyzing.com/api/v1/me/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. |
Adding or deducting account balance is type credit/debit, wallet main.
Depositing into the account is type deposit, wallet main.
Proxy purchases and renewals are type payment, wallet main.
Refunds on failure are type refund, wallet main.
Affiliate withdrawals are type withdraw, wallet affiliate.
Adding or deducting Affiliate balance is type affiliate_credit/affiliate_debit, wallet affiliate.
transaction_typestringQueryOptionalFilter by transaction type.
Valid values:creditdebitpaymentrefunddepositwithdrawaffiliate_creditaffiliate_debit
statusstringQueryOptionalFilter by status.
Valid values:pendingcompletedrejectedcancelledfailed
walletstringQueryOptionalFilter by wallet. Proxy purchases and renewals use the main wallet. Affiliate withdrawals use the affiliate wallet.
Valid values:mainaffiliate
orderingstringQueryOptionalSort by field, prefix with - for descending order.
Valid values:balance_beforebalance_afteramountrank_bonusevent_bonus
pageintegerQueryOptionalPage number, starting at 1.
page_sizeintegerQueryOptionalResults per page, default 20, maximum 100.
curl "https://api.proxyzing.com/api/v1/balance-transactions/?page=1&page_size=20" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. |
Only your own transactions are returned.
idstringPathRequiredTransaction ID.
curl "https://api.proxyzing.com/api/v1/balance-transactions/<id>/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |
Proxy plans
Lists the plans on sale. This endpoint does not need a key (sending one is still fine).
kindstringQueryOptionalFilter by proxy type.
Valid values:ipv4_shareipv4_ispipv4_privateipv6_shareipv6_ispipv6_privateipv4_rotatingipv6_rotatingmobile_rotating
orderingstringQueryOptionalSort by field, prefix with - for descending order.
Valid values:prioritycreated_at
pageintegerQueryOptionalPage number, starting at 1.
page_sizeintegerQueryOptionalResults per page, default 20, maximum 100.
curl "https://api.proxyzing.com/api/v1/public/proxy-plans/?page=1&page_size=20"Returns the plan detail, configuration and prices. This endpoint does not need a key.
configuration.options: the choices (country, location, protocol...). Each option has valid values[].code entries and required.configuration.periods: purchase periods. code is used as period_code when buying.configuration.quantity: the quantity limit per purchase (max may be null when unlimited).pricing.price_table[].unit_total: the final selling price for exactly that period (discounts included), for 1 proxy. You do not need to recalculate it. Order total = unit_total × quantity.pricing.price_table_by_option: the price depends on the chosen option. It is an object keyed by option name, and each value is a map {option value: [price rows like price_table]}.pricing.strategy = "bandwidth" and pricing.price_per_gb, and no periods.configuration is returned empty (options: {}, periods: [], quantity: {}, pricing: {}). Skip that plan.slugstringPathRequiredPlan slug.
curl "https://api.proxyzing.com/api/v1/public/proxy-plans/<slug>/"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 404 | not_found | The slug does not exist or the plan is no longer sold. |
Purchase
Buys proxies using your wallet balance. The server recalculates the price, you do not send a price.
Send the Idempotency-Key header so retries are safe. See Safe retries (Idempotency-Key) in the general information section.
selected_options: for each option in configuration.options, add the _code suffix to the key name (protocol keeps its name). The value must be one of that option's values[].code. For example country becomes country_code, location becomes location_code, protocol stays protocol. A missing option with required: true returns an error.selected_options, sent with their exact name, no _code suffix): isp_id (required for static residential plans, taken from options.country.values[].isp[].id of the chosen country), auto_renew (boolean, optional), city_code (rotating residential plans priced by bandwidth, optional), stick_ip_minutes (minutes to keep the same IP, optional), bandwidth_gb (required for bandwidth-priced plans, greater than 0).pricing.strategy = "bandwidth") have no period_code. Total = price_per_gb × bandwidth_gb.proxies[] in the response. http_port and socks5_port are independent and may be null if the proxy supports only one protocol.proxies[] have no order and no can_* fields, these fields are only in GET /proxies/ and GET /proxies/{id}/.processing; (3) process the order, on success create the proxies and set the order to completed; (4) on failure refund exactly the amount charged and set the order to failed.slugstringPathRequiredPlan slug.
Idempotency-KeystringHeaderOptionalA de-duplication key you generate yourself (UUID v4, up to 255 characters). Optional but recommended.
period_codestringBodyOptionalThe period, taken from configuration.periods[].code. Required, except for bandwidth-priced plans.
quantityintegerBodyOptionalQuantity, default 1, within configuration.quantity.min and max.
selected_optionsobjectBodyOptionalThe plan choices (a JSON object), see the Notes section.
notestringBodyOptionalFree-form note.
curl -X POST "https://api.proxyzing.com/api/v1/public/proxy-plans/<slug>/purchase/" \
-H "X-API-Key: ...pxy" \
-H "Idempotency-Key: 7f3c9a2e-4b1d-4c8e-9a51-2d6f0b8e1c33" \
-H "Content-Type: application/json" \
-d '{"period_code":"daily","quantity":1,"selected_options":{"location_code":"17","protocol":"http"}}'| HTTP | Error code | error.details | When |
|---|---|---|---|
| 400 | validation_error | {"balance": ["Insufficient balance to complete this purchase."]} | Insufficient balance. You are not charged and no order is created. |
| 400 | validation_error | {"plan": ["This plan is not available for purchase."]} | The plan does not match the sales configuration. |
| 400 | validation_error | {"period_code": ["This field is required."]} | ["Invalid period for this plan."] | The period is missing or invalid. |
| 400 | validation_error | {"quantity": ["Quantity must be at least N."]} | ["Quantity must be at most N."] | Invalid quantity. |
| 400 | validation_error | {"<option>_code": ["This field is required."]} | A required option is missing. |
| 400 | validation_error | {"<option>_code": ["'<value>' is not a valid option."]} | The option value is not valid. |
| 400 | validation_error | {"country_code": ["Invalid or unsupported country for this plan."]} | The country has no price for this plan. |
| 400 | validation_error | {"bandwidth_gb": ["This field is required and must be greater than 0."]} | A bandwidth plan is missing bandwidth_gb or it is invalid. |
| 400 | validation_error | {"provider": ["This provider does not support purchase."]} | This plan cannot be purchased through the system yet. You are not charged. |
| 400 | validation_error | {"provider": ["Failed to create the proxy with the provider. Your balance has been refunded."]} | Order processing failed. Your balance is refunded automatically and the order is failed. You can retry. |
| 409 | request_in_progress | A request with the same Idempotency-Key is still being processed. Wait a few seconds, then resend with the same key. | |
| 400 | validation_error | {"idempotency_key": ["..."]} | The key was reused for a different request (different URL or body), or it is empty or longer than 255 characters. |
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | The slug does not exist or the plan is no longer sold. |
Orders
Your list of orders.
statusstringQueryOptionalFilter by order status.
Valid values:pendingprocessingcompletedfailedcancelled
kindstringQueryOptionalFilter by the plan's proxy type.
Valid values:ipv4_shareipv4_ispipv4_privateipv6_shareipv6_ispipv6_privateipv4_rotatingipv6_rotatingmobile_rotating
orderingstringQueryOptionalSort by field, prefix with - for descending order.
Valid values:created_attotal_amount
pageintegerQueryOptionalPage number, starting at 1.
page_sizeintegerQueryOptionalResults per page, default 20, maximum 100.
curl "https://api.proxyzing.com/api/v1/proxy-orders/?page=1&page_size=20" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. |
Returns the order object, the same as the purchase response, including the proxies in the order.
period_code, days, selected_options, unit_price and total_amount are a snapshot at the time of purchase and do not change when the plan price changes later.pending → processing → completed or failed. A failed order has no proxies and has been refunded.idstringPathRequiredOrder ID.
curl "https://api.proxyzing.com/api/v1/proxy-orders/<id>/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |
Proxies
View the list of your proxies.
statusstringQueryOptionalFilter by proxy status. An expired proxy keeps its status, expiry is determined by expires_at.
Valid values:activerevokeddie
orderstringQueryOptionalFilter by order ID.
kindstringQueryOptionalFilter by proxy type.
Valid values:ipv4_shareipv4_ispipv4_privateipv6_shareipv6_ispipv6_privateipv4_rotatingipv6_rotatingmobile_rotating
searchstringQueryOptionalSearch by IP, provider_order_id, proxy ID or order ID.
orderingstringQueryOptionalSort by field, prefix with - for descending order.
Valid values:created_atexpires_at
pageintegerQueryOptionalPage number, starting at 1.
page_sizeintegerQueryOptionalResults per page, default 20, maximum 100.
curl "https://api.proxyzing.com/api/v1/proxies/?page=1&page_size=20" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. |
Returns one of your proxies, with its order information.
status: active (Active), revoked (Revoked) or die (replaced by another proxy).expires_at is earlier than the current time, and it can no longer be renewed.replaced_proxy: set on the replacement proxy, pointing to the die proxy it replaced. replaced_by: set on the die proxy, pointing to the replacement proxy. Both are null if there has been no replacement, otherwise they look like { "id": "...", "ip_address": "...", "replaced_at": "..." }.id, so keep this link if your system tracks proxies by id.can_rotate_ip, can_auto_rotate_ip, rotate_min_seconds, can_auto_renew: capabilities of the plan. For manual IP rotation, see the IP rotation group.revoked proxies: the fields ip_address, http_port, socks5_port, country, username and password are null.country: a lowercase country code, which may be empty if it cannot be determined.idstringPathRequiredProxy ID.
curl "https://api.proxyzing.com/api/v1/proxies/<id>/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |
IP rotation
Checks whether the proxy can rotate its IP. Not every plan supports IP rotation, check beforehand with can_rotate_ip or this endpoint.
supports_rotate_ip: false (with locations: []) means the proxy cannot rotate its IP: the proxy is not active, has expired, or the plan does not support it.locations may be empty and is for reference only.idstringPathRequiredProxy ID.
curl "https://api.proxyzing.com/api/v1/proxies/<id>/rotate-ip-options/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |
Requests a new outgoing IP for the proxy. IP rotation is free of charge.
200 response is a proxy object as in Proxy detail. ip_address, ports, username and password stay the same, only the actual outgoing IP changes.real_ip from the proxy check endpoint.idstringPathRequiredProxy ID.
locationstringBodyOptionalLocation of the new IP, up to 100 characters. If omitted, the system chooses one.
curl -X POST "https://api.proxyzing.com/api/v1/proxies/<id>/rotate-ip/" \
-H "X-API-Key: ...pxy" \
-H "Content-Type: application/json" \
-d '{"location":"Random"}'| HTTP | Error code | error.details | When |
|---|---|---|---|
| 400 | validation_error | {"status": ["Only an active proxy can rotate its IP."]} | The proxy is not active. |
| 400 | validation_error | {"expires_at": ["An expired proxy cannot rotate its IP."]} | The proxy has expired. |
| 400 | validation_error | {"plan": ["This plan does not support IP rotation."]} | The plan does not support IP rotation. |
| 400 | validation_error | {"provider": ["This provider does not support IP rotation."]} | This proxy does not support IP rotation. |
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. | |
| 429 | throttled | More than 30 IP rotations per hour, counted across all proxies of the account. | |
| 502 | provider_error | Processing error while rotating the IP, you can try again later. |
Renewal
Returns the allowed renewal days and prices. Not every Proxy can be renewed, it depends on the plan.
supports_renewal: false (with options: []) means this proxy cannot be renewed: the plan does not support it, the proxy is die, or the proxy has expired (expires_at has passed). Do not call renew.unit_price is the price for exactly that number of days (discounts included), not a per-day price.days values listed in options[] are accepted when renewing.idstringPathRequiredProxy ID.
curl "https://api.proxyzing.com/api/v1/proxies/<id>/renew-options/" \
-H "X-API-Key: ...pxy"| HTTP | Error code | error.details | When |
|---|---|---|---|
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |
Renews a proxy. The renewal cost is charged to your balance, using the same mechanism as purchases. A proxy that has expired (expires_at is earlier than the current time) cannot be renewed.
Send the Idempotency-Key header so retries are safe. See Safe retries (Idempotency-Key) in the general information section.
200 response is a proxy object (as detailed in the Proxy section) with an updated expires_at value and status: active. Since the expires_at value is calculated by the system, it may differ by a few seconds from a simple addition calculation.idstringPathRequiredProxy ID.
Idempotency-KeystringHeaderOptionalA de-duplication key you generate yourself (UUID v4, up to 255 characters). Optional but recommended.
daysintegerBodyRequiredNumber of days to renew, must be a days value in options[] of renew-options.
curl -X POST "https://api.proxyzing.com/api/v1/proxies/<id>/renew/" \
-H "X-API-Key: ...pxy" \
-H "Idempotency-Key: 7f3c9a2e-4b1d-4c8e-9a51-2d6f0b8e1c33" \
-H "Content-Type: application/json" \
-d '{"days":30}'| HTTP | Error code | error.details | When |
|---|---|---|---|
| 400 | validation_error | {"status": ["A revoked proxy cannot be renewed."]} | The proxy has been revoked. |
| 400 | validation_error | {"status": ["A dead proxy cannot be renewed."]} | The proxy is die, renew the replacement proxy in replaced_by instead. |
| 400 | validation_error | {"expires_at": ["An expired proxy cannot be renewed."]} | The proxy has expired (expires_at is earlier than the current time), so it cannot be renewed. You are not charged. |
| 400 | validation_error | {"provider": ["This provider does not support renewal."]} | This proxy does not support renewal. You are not charged. |
| 400 | validation_error | {"plan": ["This plan does not support renewal."]} | The plan has no renewal price table. |
| 400 | validation_error | {"plan": ["This plan's catalog data is outdated. Please contact support."]} | The plan data is outdated, contact support. |
| 400 | validation_error | {"days": ["This field is required."]} | days is missing. |
| 400 | validation_error | {"days": ["Invalid days for this plan."]} | days is not in options[] of renew-options. |
| 400 | validation_error | {"balance": ["Insufficient balance to complete this renewal."]} | Insufficient balance. You are not charged. |
| 400 | validation_error | {"provider": ["Failed to renew the proxy with the provider. Your balance has been refunded."]} | Renewal failed. Your balance is refunded automatically, expires_at and status stay unchanged, you can retry. |
| 409 | request_in_progress | A request with the same Idempotency-Key is still being processed. Wait a few seconds, then resend with the same key. | |
| 400 | validation_error | {"idempotency_key": ["..."]} | The key was reused for a different request (different URL or body), or it is empty or longer than 255 characters. |
| 401 | not_authenticated / authentication_failed | Missing or invalid API key. | |
| 404 | not_found | Does not exist or does not belong to you. |