ProxyZen

API 文档

面向分销商和开发者的 REST API:在代码中购买、获取和续费代理。所有价格均已包含您的专属折扣。

快速开始

  1. 注册并为余额充值。
  2. 在控制台打开「API」并创建密钥。密钥只显示一次,请妥善保存。
  3. 在每个请求的请求头中携带密钥。
基础地址
https://proxyzen.net/api/v1
认证
请求头 Authorization: Bearer <密钥>(或 X-Api-Key: <密钥>)。响应为 JSON。错误信息语言:参数 ?lang=en|zh|… 或 Accept-Language 请求头。
限制
每个密钥每分钟 120 次请求。超出时返回 429。
格式
金额为美元字符串("4.50"),日期为 UTC 的 ISO 8601 格式。代理状态:active — 正常使用;grace — 已到期,IP 仍为您保留并可续费(48 小时);expired — IP 已回收。

接口

GET /api/v1/balance

账户余额和专属折扣。

示例
curl https://proxyzen.net/api/v1/balance \
  -H "Authorization: Bearer pz_…"
响应
{"balance": "25.00", "currency": "USD", "discount_percent": "10.00"}

GET /api/v1/countries

可用国家及空闲 IPv4/IPv6 数量。

示例
curl https://proxyzen.net/api/v1/countries -H "Authorization: Bearer pz_…"
响应
{"data": [{"code": "DE", "name": "Germany", "available": {"ipv4": 120, "ipv6": 3000}}]}

GET /api/v1/prices

各租期每个 IP 的价格(含您的折扣)。

参数
country 必填 ISO 国家代码,例如 DE
type 必填 ipv4 或 ipv6
示例
curl "https://proxyzen.net/api/v1/prices?country=DE&type=ipv4" -H "Authorization: Bearer pz_…"
响应
{"country": "DE", "type": "ipv4", "currency": "USD",
 "data": [{"days": 7, "price": "0.9000"}, {"days": 30, "price": "2.2500"}]}

POST /api/v1/orders

购买代理。金额从余额扣除,代理即时交付。

参数
country 必填 ISO 国家代码,例如 DE
type 必填 ipv4 或 ipv6
quantity 必填 IP 数量
days 必填 租期天数(来自 /prices)
auto_renew 可选 自动续费,true/false
示例
curl -X POST https://proxyzen.net/api/v1/orders \
  -H "Authorization: Bearer pz_…" -H "Content-Type: application/json" \
  -d '{"country":"DE","type":"ipv4","quantity":2,"days":30}'
响应
{"id": 1042, "country": "DE", "type": "ipv4", "quantity": 2, "days": 30,
 "price_per_ip": "2.2500", "total": "4.50", "created_at": "2026-11-26T10:00:00Z",
 "proxies": [{"id": 5001, "order_id": 1042, "country": "DE", "type": "ipv4",
   "host": "5.5.5.5", "ip": "5.5.5.10", "http_port": 30000, "socks5_port": 40000,
   "login": "pzx8k2m1qa", "password": "Xy7…", "status": "active", "auto_renew": false,
   "starts_at": "2026-11-26T10:00:00Z", "expires_at": "2026-12-26T10:00:00Z",
   "renewable_until": "2026-12-28T10:00:00Z"}, …]}

GET /api/v1/orders/{id}

订单及其代理。

示例
curl https://proxyzen.net/api/v1/orders/1042 -H "Authorization: Bearer pz_…"

GET /api/v1/proxies

您的代理。默认返回 active 和 grace。支持分页。

参数
status 可选 active、grace、expired 或 all
type 可选 ipv4 或 ipv6
country 可选 ISO 国家代码,例如 DE
order_id 可选 仅此订单的代理
per_page 可选 每页条数,最多 1000(默认 100)
page 可选 页码
示例
curl "https://proxyzen.net/api/v1/proxies?status=active&per_page=500" -H "Authorization: Bearer pz_…"
响应
{"data": [ …proxy… ], "meta": {"page": 1, "per_page": 500, "total": 2, "last_page": 1}}

POST /api/v1/proxies/renew

按指定租期续费代理(同一 IP)。整批一次扣费。

参数
ids 必填 代理 id 数组
days 必填 租期天数(来自 /prices)
示例
curl -X POST https://proxyzen.net/api/v1/proxies/renew \
  -H "Authorization: Bearer pz_…" -H "Content-Type: application/json" \
  -d '{"ids":[5001,5002],"days":30}'
响应
{"charged": "4.50", "balance": "20.50", "data": [ …proxy… ]}

POST /api/v1/proxies/{id}/auto-renew

开启或关闭从余额自动续费。

参数
enabled 必填 true 或 false
示例
curl -X POST https://proxyzen.net/api/v1/proxies/5001/auto-renew \
  -H "Authorization: Bearer pz_…" -H "Content-Type: application/json" \
  -d '{"enabled":true}'

住宅和移动代理(按 GB)

每个 API 客户每种类型一个流量套餐:首次购买生成用户名和密码,之后的购买向其追加 GB。流量永不过期。国家、地区、城市、运营商和粘性会话写在用户名中:USERNAME-country-DE-session-ab12cd-time-10。

GET /api/v1/traffic/products

含您折扣的每 1 GB 价格、网关主机和端口。

示例
curl https://proxyzen.net/api/v1/traffic/products -H "Authorization: Bearer pz_…"
响应
{"currency": "USD", "host": "ip.proxyzen.net", "http_port": 8080, "socks5_port": 1080,
 "data": [{"type": "residential", "price_per_gb": "1.59", "min_gb": 1, "max_gb": 1000},
          {"type": "mobile", "price_per_gb": "2.40", "min_gb": 1, "max_gb": 1000}]}

GET /api/v1/traffic/countries

该代理类型可用的国家。

参数
type 必填 residential 或 mobile
示例
curl "https://proxyzen.net/api/v1/traffic/countries?type=residential" -H "Authorization: Bearer pz_…"
响应
{"type": "residential", "data": [{"code": "DE", "name": "Germany"}, {"code": "US", "name": "United States"}, …]}

GET /api/v1/traffic/countries/{code}

国家内的地区(含城市)和运营商(ASN)——用户名代码:-state-、-city-、-asn-。

参数
type 必填 residential 或 mobile
示例
curl "https://proxyzen.net/api/v1/traffic/countries/DE?type=residential" -H "Authorization: Bearer pz_…"
响应
{"type": "residential", "country": "DE",
 "states": [{"name": "Bavaria", "code": "DEBAY21", "cities": [{"name": "Munich", "code": "MUN1"}]}],
 "isps": [{"name": "Deutsche Telekom AG", "asn": "3320"}]}

POST /api/v1/traffic/orders

购买流量。从余额扣款;若已有套餐,GB 将追加到该套餐。

参数
type 必填 residential 或 mobile
gb 必填 GB 数量,1 到 1000
示例
curl -X POST https://proxyzen.net/api/v1/traffic/orders \
  -H "Authorization: Bearer pz_…" -H "Content-Type: application/json" \
  -d '{"type":"residential","gb":5}'
响应
{"order": {"id": 77, "type": "residential", "kind": "purchase", "gb": 5, "price_per_gb": "1.59", "total": "7.95"},
 "plan": {"type": "residential", "username": "pz42_k3x9qa", "password": "Xk7…", "host": "ip.proxyzen.net",
   "http_port": 8080, "socks5_port": 1080, "total_gb": 5, "used_gb": 0, "remaining_gb": 5, "status": "active"},
 "balance": "12.05"}

GET /api/v1/traffic/plans

您的流量套餐:用户名、密码、主机、剩余 GB(每 10 分钟更新)。

示例
curl https://proxyzen.net/api/v1/traffic/plans -H "Authorization: Bearer pz_…"
响应
{"data": [ …plan… ]}

POST /api/v1/traffic/plans/{type}/reset-password

修改套餐密码。旧密码立即失效。

示例
curl -X POST https://proxyzen.net/api/v1/traffic/plans/residential/reset-password -H "Authorization: Bearer pz_…"

错误

出错时 API 返回 HTTP 状态码和 {"error": {"code", "message"}}。参数校验错误还会包含 fields 对象。

HTTP 402
{"error": {"code": "insufficient_funds", "message": "…"}}
401 unauthorized 密钥缺失、无效或已吊销
403 forbidden API 访问已关闭
403 account_suspended 账户已暂停
422 validation_error 参数无效(见 fields)
402 insufficient_funds 余额不足
409 out_of_stock 空闲 IP 不足
422 invalid_period 该租期没有价格
409 not_renewable 代理已释放,无法续费
404 not_found 对象不存在
429 rate_limited 超出请求频率限制
现成方案 · 免费

现成的 Telegram 代理商店

无需编程,5 分钟在 Telegram 开设您自己的代理商店。客户通过 @CryptoBot 充值并按您的价格购买,机器人使用您的 API 密钥自动向 ProxyZen 采购代理。您的利润就是加价部分。

IPv4、IPv6、住宅和移动
按国家和期限购买 IPv4/IPv6,住宅和移动代理按 GB 计费,可选国家、城市和运营商。全部在“我的代理”中。
续费与自动续费
客户一键续费同一 IP;到期前自动提醒。
通过 CryptoBot 付款
USDT、TON、BTC 等,余额自动到账。购买失败时款项退回余额。
详细统计
用户数、收入、成本和利润(按日、周、月),热门国家。

如何启动

  1. 在 @BotFather 创建机器人,并在 @CryptoBot 创建应用(Crypto Pay → My Apps)。
  2. 在控制台创建 API 密钥,并为 ProxyZen 余额充值。
  3. 在任意 Linux 服务器上运行一条命令(最便宜的 VPS 即可):
    bash <(curl -fsSL https://proxyzen.net/bot/install.sh)
  4. 打开您的机器人并发送 /admin,设置名称、图片、加价和密钥。

想自行运行?压缩包支持 Python 3.9+ 的 Linux、macOS 和 Windows,说明见 README。

仅限与 ProxyZen 配合免费使用(见压缩包中的 LICENSE)。