ข้ามไปยังเนื้อหา
proxyday

เอกสาร API พร็อกซี่

ใช้ REST API ของ ProxyDay เพื่ออ่านยอดเงินและข้อมูลการเชื่อมต่อ เช็กราคา สั่งซื้อจากยอดเงิน และสร้างชื่อผู้ใช้พร็อกซี่จากโค้ดของคุณเอง

จะเริ่มต้นอย่างไร

  1. 1สมัครสมาชิกแล้วเข้าสู่ระบบแดชบอร์ด
  2. 2เปิดหน้า Connect แล้วสร้างคีย์ API คีย์ฉบับเต็มจะแสดงเพียงครั้งเดียว ให้คัดลอกเก็บไว้ในที่ปลอดภัย
  3. 3ส่งคีย์ในเฮดเดอร์ Authorization กับทุกคำขอที่ต้องใช้
  4. 4เรียก /account เพื่อเช็กว่าคีย์ใช้งานได้ แล้วสั่งซื้อด้วย /orders

การยืนยันตัวตนทำงานอย่างไร?

คำขอสำหรับบัญชีของคุณเอง (account, orders, proxy-user) ต้องใช้คีย์ API ส่งเป็น Bearer token ใน header Authorization ส่วนราคา ประเทศ และใบเสนอราคาเป็นข้อมูลสาธารณะ ไม่ต้องใช้คีย์

เราเก็บเฉพาะค่าแฮชของคีย์ ถ้าคีย์หาย ให้สร้างคีย์ใหม่ในแดชบอร์ด แล้วคีย์เก่าจะใช้ไม่ได้ทันที อย่าใส่คีย์ไว้ในโค้ดฝั่งเบราว์เซอร์หรือ repository สาธารณะ

HTTP header
Authorization: Bearer pdk_your_api_key

Base URL และรูปแบบข้อมูล

Base URL
https://proxyday.shop/api/v1
เนื้อหาคำขอและการตอบกลับ
application/json
จำนวนเงิน
ตัวเลข USD เช่น 807.90
เวลา
ISO 8601 (UTC)

มีการจำกัดจำนวนการเรียกไหม?

คีย์ API แต่ละคีย์ส่งคำขอได้สูงสุด 60 ครั้งต่อนาที เอนด์พอยต์สาธารณะรับได้ 60 ครั้งต่อนาทีต่อ IP ถ้าเกินจะได้ 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ขาดค่าที่จำเป็น หรือค่านั้นใช้กับสินค้านี้ไม่ได้
401unauthorizedไม่มีคีย์ API หรือคีย์ไม่ถูกต้อง
402insufficient_balanceยอดเงินน้อยกว่ายอดรวมของคำสั่งซื้อ ไม่มีการเรียกเก็บเงิน
404not_foundไม่พบคำสั่งซื้อที่มี id นี้ในบัญชีของคุณ
429rate_limitedส่งคำขอมากเกินไปในหนึ่งนาที
500server_errorดำเนินการคำขอไม่สำเร็จ ไม่มีการเรียกเก็บเงิน

เอนด์พอยต์

ดูข้อมูลบัญชี

GET/api/v1/accountคีย์ API

แสดงยอดเงิน โฮสต์พร็อกซี่ พอร์ต ชื่อผู้ใช้และรหัสผ่าน และ 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ไม่ต้องใช้คีย์

คำนวณยอดรวมของคำสั่งซื้อโดยไม่เรียกเก็บเงิน ใช้ body เดียวกับตอนสั่งซื้อ

ฟิลด์ความหมาย
productจำเป็นunlimited, residential, isp หรือ datacenter
quantityจำเป็นจำนวนวันสำหรับ unlimited (1~365), GB สำหรับ residential (5~5,000), จำนวน IP สำหรับ isp (1~1,000) หรือ datacenter (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/ordersคีย์ API

หักยอดรวมจากยอดเงินของคุณและสร้างคำสั่งซื้อ คำสั่งซื้อใหม่เริ่มที่สถานะ pending (กำลังเปิดใช้งาน) และเปลี่ยนเป็น active เมื่อพร้อม ถ้าเปิดใช้งานไม่ได้ สถานะจะเป็น refunded และยอดเต็มจำนวนจะคืนเข้ายอดเงิน ส่งกลับ 402 เมื่อยอดเงินไม่พอ

ฟิลด์ความหมาย
productจำเป็นunlimited, residential, isp หรือ datacenter
quantityจำเป็นจำนวนวันสำหรับ unlimited (1~365), GB สำหรับ residential (5~5,000), จำนวน IP สำหรับ isp (1~1,000) หรือ datacenter (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/ordersคีย์ API

แสดงคำสั่งซื้อล่าสุด 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-userคีย์ API

ส่งกลับชื่อผู้ใช้พร็อกซี่ตามตัวเลือกของคุณ พร้อม URL พร็อกซี่ HTTP และ SOCKS5 ที่ใช้ได้ทันที ถ้าไม่มี 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 เหมือนกับคำสั่งซื้อจากแดชบอร์ด และแสดงในหน้า History แทนที่ pdk_your_api_key ด้วยคีย์ของคุณเอง

เชื่อมต่อ ProxyDay กับระบบของคุณเอง

สร้างบัญชี แล้วสร้างคีย์ API ในแดชบอร์ด