跳到内容
proxyday

代理 API 文档

通过 ProxyDay REST API,您可以用自己的代码读取余额和连接信息、查询价格、用余额下单,以及生成代理用户名。

如何开始?

  1. 1注册并登录控制台。
  2. 2打开“连接”页面,创建 API 密钥。完整密钥只显示一次,请复制到安全的地方。
  3. 3在每个需要认证的请求中,通过 Authorization 请求头发送密钥。
  4. 4调用 /account 确认密钥可用,然后用 /orders 下单。

如何认证?

涉及您自己账户的请求(account、orders、proxy-user)需要 API 密钥。请在 Authorization 请求头中以 Bearer 令牌的形式发送。价格、国家和报价是公开接口,无需密钥。

我们只保存密钥的哈希值。如果丢失,请在控制台创建新密钥,旧密钥会立即失效。不要把密钥放在浏览器端代码或公开代码仓库中。

HTTP header
Authorization: Bearer pdk_your_api_key

基础 URL 和格式

基础 URL
https://proxyday.shop/api/v1
请求和响应正文
application/json
金额
USD 数值,例如 807.90
时间
ISO 8601 (UTC)

有调用频率限制吗?

每个 API 密钥每分钟最多可发送 60 个请求。公开接口每个 IP 每分钟最多 60 个请求。超出限制会返回 HTTP 429,请等待一分钟后重试。

错误信息是什么样的?

错误使用 HTTP 状态码,并返回包含简短代码和说明的 JSON 内容。

示例
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order. Top up in the dashboard."
  }
}
HTTPcode含义
400bad_request缺少某个值,或该值不适用于此产品。
401unauthorizedAPI 密钥缺失或无效。
402insufficient_balance余额低于订单总额。未产生任何扣费。
404not_found您的账户中没有此 id 的订单。
429rate_limited一分钟内请求过多。
500server_error请求未能完成。未产生任何扣费。

接口

获取账户信息

GET/api/v1/accountAPI 密钥

返回您的余额、代理主机、端口、用户名和密码,以及 IP 白名单。

请求
curl https://proxyday.shop/api/v1/account \
  -H "Authorization: Bearer pdk_your_api_key"
响应
{
  "email": "you@example.com",
  "balance_usd": 1300,
  "proxy": {
    "host": "gate.proxyday.shop",
    "http_port": 6100,
    "socks5_port": 6200,
    "username": "pdexample1",
    "password": "your_password"
  },
  "allowed_ips": [
    "203.0.113.10"
  ]
}

列出产品和价格

GET/api/v1/products无需密钥

返回所有产品及其限制、价格档位和折扣。价格与价格页面使用同一张表。

请求
curl https://proxyday.shop/api/v1/products
响应
{
  "currency": "USD",
  "prices_as_of": "2026-10-31",
  "products": [
    {
      "id": "unlimited",
      "unit": "day",
      "quantity": {
        "meaning": "days",
        "min": 1,
        "max": 365
      },
      "...": "..."
    },
    {
      "id": "residential",
      "unit": "gb",
      "...": "..."
    }
  ]
}

国家和城市列表

GET/api/v1/countries无需密钥

返回某个产品可用的国家,以及可以写入代理用户名的城市值。

字段含义
product可选unlimited、residential、isp 或 datacenter。默认为 residential。
请求
curl "https://proxyday.shop/api/v1/countries?product=datacenter"
响应
{
  "product": "datacenter",
  "countries": [
    {
      "code": "us",
      "name": "United States",
      "region": "americas",
      "datacenter": true,
      "cities": [
        {
          "name": "New York",
          "value": "new_york"
        },
        {
          "name": "Los Angeles",
          "value": "los_angeles"
        }
      ]
    }
  ]
}

获取报价

POST/api/v1/quote无需密钥

计算订单总额,不扣任何费用。请求体与下单时相同。

字段含义
product必填unlimited、residential、isp 或 datacenter。
quantity必填unlimited 为天数(1~365),residential 为 GB(5~5,000),isp 为 IP 数(1~1,000),datacenter 为 IP 数(5~5,000)。
concurrency可选仅限 unlimited:200、500、1000 或 2000。
bandwidth可选仅限 unlimited,单位 Mbps:100、200、500 或 1000。
months可选仅限 isp 和 datacenter:1、3、6 或 12。
country可选仅限 isp 和 datacenter:两位国家代码,例如 jp。见 /countries。
请求
curl -X POST https://proxyday.shop/api/v1/quote \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
响应
{
  "product": "unlimited",
  "quantity": 30,
  "unit_price_usd": 8.6,
  "unit": "day",
  "total_usd": 258
}

下单

POST/api/v1/ordersAPI 密钥

从余额中扣除总额并创建订单。新订单初始状态为 pending(开通中),就绪后变为 active。如果订单无法开通,状态变为 refunded,全部金额退回余额。余额不足时返回 402。

字段含义
product必填unlimited、residential、isp 或 datacenter。
quantity必填unlimited 为天数(1~365),residential 为 GB(5~5,000),isp 为 IP 数(1~1,000),datacenter 为 IP 数(5~5,000)。
concurrency可选仅限 unlimited:200、500、1000 或 2000。
bandwidth可选仅限 unlimited,单位 Mbps:100、200、500 或 1000。
months可选仅限 isp 和 datacenter:1、3、6 或 12。
country可选仅限 isp 和 datacenter:两位国家代码,例如 jp。见 /countries。
请求
curl -X POST https://proxyday.shop/api/v1/orders \
  -H "Authorization: Bearer pdk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
响应
{
  "order": {
    "id": "PD-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 8.6,
    "total_usd": 258,
    "status": "pending",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:12:44.120Z"
  },
  "balance_usd": 1042
}

列出您的订单

GET/api/v1/ordersAPI 密钥

返回最近 100 个订单,最新的在前。

字段含义
status可选pending、active 或 refunded。不填则返回全部。
请求
curl "https://proxyday.shop/api/v1/orders?status=pending" \
  -H "Authorization: Bearer pdk_your_api_key"
响应
{
  "orders": [
    {
      "id": "PD-7KQ2M-X4HTD",
      "product": "unlimited",
      "quantity": 30,
      "months": null,
      "concurrency": 1000,
      "bandwidth_mbps": 200,
      "country": null,
      "unit_price_usd": 8.6,
      "total_usd": 258,
      "status": "pending",
      "created_at": "2026-10-31T09:12:44.120Z",
      "updated_at": "2026-10-31T09:12:44.120Z"
    }
  ]
}

获取单个订单

GET/api/v1/orders/{id}API 密钥

按 id 返回一个订单,例如用于确认订单是否已开通。

字段含义
id必填订单 id,例如 PD-7KQ2M-X4HTD。
请求
curl https://proxyday.shop/api/v1/orders/PD-7KQ2M-X4HTD \
  -H "Authorization: Bearer pdk_your_api_key"
响应
{
  "order": {
    "id": "PD-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 8.6,
    "total_usd": 258,
    "status": "active",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:40:02.511Z"
  }
}

生成代理用户名

GET/api/v1/proxy-userAPI 密钥

返回带有您所选参数的代理用户名,以及可直接使用的 HTTP 和 SOCKS5 代理 URL。不设置 session 时,每个请求都会轮换 IP。

字段含义
product可选unlimited、residential、isp 或 datacenter。默认为 unlimited。
country可选两位国家代码,例如 jp。
city可选/countries 中的城市值,例如 tokyo。需同时填写 country。
session可选任意 1~32 位字母或数字。session 相同的请求使用同一个 IP。
ttl可选会话 IP 保持的分钟数,1~60。默认为 30。
请求
curl "https://proxyday.shop/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \
  -H "Authorization: Bearer pdk_your_api_key"
响应
{
  "username": "pdexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
  "password": "your_password",
  "http": "http://pdexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.proxyday.shop:6100",
  "socks5": "socks5h://pdexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.proxyday.shop:6200"
}

完整示例

以下示例依次查询价格、用余额下单,并通过日本 IP 连接。

Python (requests)
import requests

API = "https://proxyday.shop/api/v1"
HEAD = {"Authorization": "Bearer pdk_your_api_key"}

# 1) Check the price first
plan = {"product": "residential", "quantity": 100}
print(requests.post(f"{API}/quote", json=plan).json())

# 2) Order from your balance
r = requests.post(f"{API}/orders", json=plan, headers=HEAD)
order = r.json()["order"]
print(order["id"], order["status"])

# 3) Get a username for Japanese IPs
u = requests.get(f"{API}/proxy-user", headers=HEAD,
                 params={"product": "residential", "country": "jp"}).json()
proxies = {"http": u["http"], "https": u["http"]}
print(requests.get("https://ipinfo.io/json", proxies=proxies, timeout=30).json())
Node.js 18+
const API = "https://proxyday.shop/api/v1";
const HEAD = { Authorization: "Bearer pdk_your_api_key", "Content-Type": "application/json" };

// Check the balance
const acc = await fetch(`${API}/account`, { headers: HEAD }).then((r) => r.json());
console.log(acc.balance_usd);

// Order 7 days of unlimited
const res = await fetch(`${API}/orders`, {
  method: "POST",
  headers: HEAD,
  body: JSON.stringify({ product: "unlimited", quantity: 7, concurrency: 500, bandwidth: 100 }),
});
if (res.status === 402) console.log("Top up first");
else console.log((await res.json()).order.id);

通过 API 下的订单与控制台下的订单相同,都会显示在记录中。请把 pdk_your_api_key 换成您自己的密钥。

将 ProxyDay 接入您自己的系统

创建账户,然后在控制台生成 API 密钥。