เริ่มต้นอย่างไร?
- 1สมัครด้วยชื่อผู้ใช้และเข้าสู่แดชบอร์ด
- 2ออกคีย์ API ในแท็บเชื่อมต่อ คีย์เต็มจะแสดงเพียงครั้งเดียว จึงควรบันทึกไว้ในที่ปลอดภัยทันที
- 3ใส่คีย์ในเฮดเดอร์ Authorization ของทุกคำขอที่ต้องใช้คีย์
- 4เรียก /account ก่อนเพื่อยืนยันว่าคีย์ใช้งานได้ แล้วสั่งซื้อด้วย /orders
การยืนยันตัวตนทำงานอย่างไร?
คำขอที่เกี่ยวกับบัญชีของคุณ (account, orders, proxy-user) ต้องใช้คีย์ API ส่งในเฮดเดอร์เป็น Authorization: Bearer hpk_... ราคา ประเทศ และใบเสนอราคาเปิดให้ทุกคนและไม่ต้องใช้คีย์
HiProxy เก็บเฉพาะค่าแฮชของคีย์ ไม่เก็บตัวคีย์ หากทำคีย์หาย ให้ออกคีย์ใหม่ในแดชบอร์ด แล้วคีย์เดิมจะถูกบล็อกทันที เก็บคีย์ไว้ในโค้ดฝั่งเซิร์ฟเวอร์เท่านั้น ห้ามใส่ในโค้ดที่รันในเบราว์เซอร์หรือในรีโพสิทอรีสาธารณะ
Authorization: Bearer hpk_your_api_key
Base URL และรูปแบบข้อมูล
- Base URL
- https://hiproxy.shop/api/v1
- เนื้อหาคำขอและการตอบกลับ
- application/json
- จำนวนเงิน
- USD เป็นตัวเลข เช่น 1036.60
- เวลา
- ISO 8601 (UTC)
มีขีดจำกัดอัตราการเรียกไหม?
คีย์ API แต่ละคีย์เรียกได้สูงสุด 60 ครั้งต่อนาที เอนด์พอยต์สาธารณะที่เรียกโดยไม่มีคีย์ได้ 60 ครั้งต่อนาทีต่อ IP หากเกินขีดจำกัดจะได้ HTTP 429 รอ 1 นาทีแล้วส่งใหม่
การตอบกลับเมื่อเกิดข้อผิดพลาดเป็นอย่างไร?
คุณจะได้รหัสสถานะ HTTP พร้อมเนื้อหา JSON ที่มีรหัสข้อผิดพลาดสั้นๆ และข้อความ
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low for this order. Top up in the dashboard."
}
}| HTTP | code | ความหมาย |
|---|---|---|
| bad_requestHTTP 400ขาดค่าที่จำเป็น หรือสินค้านี้ไม่รับค่านั้น | ขาดค่าที่จำเป็น หรือสินค้านี้ไม่รับค่านั้น | |
| unauthorizedHTTP 401ไม่ได้ส่งคีย์ API หรือคีย์ไม่ถูกต้อง | ไม่ได้ส่งคีย์ API หรือคีย์ไม่ถูกต้อง | |
| insufficient_balanceHTTP 402ยอดเงินน้อยกว่ายอดรวมคำสั่งซื้อ ยอดเงินของคุณไม่ถูกหัก | ยอดเงินน้อยกว่ายอดรวมคำสั่งซื้อ ยอดเงินของคุณไม่ถูกหัก | |
| not_foundHTTP 404บัญชีของคุณไม่มีคำสั่งซื้อที่มี id นี้ | บัญชีของคุณไม่มีคำสั่งซื้อที่มี id นี้ | |
| rate_limitedHTTP 429คุณส่งคำขอเกินขีดจำกัดต่อนาที | คุณส่งคำขอเกินขีดจำกัดต่อนาที | |
| server_errorHTTP 500เซิร์ฟเวอร์ดำเนินการคำขอไม่สำเร็จ ยอดเงินของคุณไม่ถูกหัก | เซิร์ฟเวอร์ดำเนินการคำขอไม่สำเร็จ ยอดเงินของคุณไม่ถูกหัก |
เอนด์พอยต์
อ่านข้อมูลบัญชี
GET/api/v1/accountต้องใช้คีย์ API
แสดงยอดเงิน โฮสต์และพอร์ตพร็อกซี่ ชื่อผู้ใช้พร็อกซี่และรหัสผ่าน และรายการ IP ที่อนุญาต
curl https://hiproxy.shop/api/v1/account \ -H "Authorization: Bearer hpk_your_api_key"
{
"username": "hi_user01",
"balance_usd": 1300,
"proxy": {
"host": "gate.hiproxy.shop",
"http_port": 6100,
"socks5_port": 6200,
"username": "hpexample1",
"password": "your_password"
},
"allowed_ips": [
"203.0.113.10"
]
}อ่านสินค้าและราคา
GET/api/v1/productsไม่ต้องใช้คีย์
แสดงขีดจำกัดการสั่งซื้อ ราคาแต่ละระดับ และส่วนลดตามระยะเวลาของแต่ละสินค้า ใช้ตารางราคาเดียวกับหน้าราคา
curl https://hiproxy.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ไม่ต้องใช้คีย์
แสดงประเทศที่แต่ละสินค้ารองรับ และค่าเมืองที่ใช้ในตัวเลือกชื่อผู้ใช้ -city-
| ฟิลด์ | ประเภท | ความหมาย |
|---|---|---|
productไม่บังคับ | string | หนึ่งใน unlimited, residential, isp, datacenter หากว่างหมายถึง residential |
curl "https://hiproxy.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จำเป็น | string | หนึ่งใน unlimited, residential, isp, datacenter |
quantityจำเป็น | integer | จำนวนวันสำหรับ unlimited (1~365), GB สำหรับ residential (5~5,000), จำนวน IP สำหรับ isp (1~1,000) หรือ datacenter (5~5,000) |
concurrencyไม่บังคับ | integer | เฉพาะ unlimited เลือก 200, 500, 1000 หรือ 2000 |
bandwidthไม่บังคับ | integer | เฉพาะ unlimited หน่วย Mbps เลือก 100, 200, 500 หรือ 1000 |
monthsไม่บังคับ | integer | เฉพาะ isp และ datacenter เลือก 1, 3, 6 หรือ 12 |
countryไม่บังคับ | string | เฉพาะ isp และ datacenter รหัสประเทศ 2 ตัวอักษร เช่น jp ค่าที่ใช้ได้แสดงอยู่ใน /countries |
curl -X POST https://hiproxy.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.78,
"unit": "day",
"total_usd": 263.4
}สั่งซื้อ
POST/api/v1/ordersต้องใช้คีย์ API
หักยอดรวมจากยอดเงินและสร้างคำสั่งซื้อ เริ่มที่สถานะ pending (กำลังเปิดใช้งาน) และเปลี่ยนเป็น active เมื่อพร้อม คำสั่งซื้อที่เปิดใช้งานไม่สำเร็จจะเป็น refunded และเงินทั้งหมดที่จ่ายจะคืนเข้ายอดเงิน หากยอดเงินไม่พอจะได้ 402
| ฟิลด์ | ประเภท | ความหมาย |
|---|---|---|
productจำเป็น | string | หนึ่งใน unlimited, residential, isp, datacenter |
quantityจำเป็น | integer | จำนวนวันสำหรับ unlimited (1~365), GB สำหรับ residential (5~5,000), จำนวน IP สำหรับ isp (1~1,000) หรือ datacenter (5~5,000) |
concurrencyไม่บังคับ | integer | เฉพาะ unlimited เลือก 200, 500, 1000 หรือ 2000 |
bandwidthไม่บังคับ | integer | เฉพาะ unlimited หน่วย Mbps เลือก 100, 200, 500 หรือ 1000 |
monthsไม่บังคับ | integer | เฉพาะ isp และ datacenter เลือก 1, 3, 6 หรือ 12 |
countryไม่บังคับ | string | เฉพาะ isp และ datacenter รหัสประเทศ 2 ตัวอักษร เช่น jp ค่าที่ใช้ได้แสดงอยู่ใน /countries |
curl -X POST https://hiproxy.shop/api/v1/orders \
-H "Authorization: Bearer hpk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'{
"order": {
"id": "HP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.78,
"total_usd": 263.4,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
},
"balance_usd": 1036.6
}รายการคำสั่งซื้อ
GET/api/v1/ordersต้องใช้คีย์ API
แสดงคำสั่งซื้อของคุณสูงสุด 100 รายการ ล่าสุดก่อน
| ฟิลด์ | ประเภท | ความหมาย |
|---|---|---|
statusไม่บังคับ | string | หนึ่งใน pending, active, refunded หากว่างจะแสดงคำสั่งซื้อทุกสถานะ |
curl "https://hiproxy.shop/api/v1/orders?status=pending" \ -H "Authorization: Bearer hpk_your_api_key"
{
"orders": [
{
"id": "HP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.78,
"total_usd": 263.4,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
}
]
}อ่านคำสั่งซื้อ 1 รายการ
GET/api/v1/orders/{id}ต้องใช้คีย์ API
แสดงคำสั่งซื้อเดียวตาม id สะดวกสำหรับตรวจว่าการเปิดใช้งานเสร็จแล้วหรือยัง
| ฟิลด์ | ประเภท | ความหมาย |
|---|---|---|
idจำเป็น | string | id ของคำสั่งซื้อ เช่น HP-7KQ2M-X4HTD |
curl https://hiproxy.shop/api/v1/orders/HP-7KQ2M-X4HTD \ -H "Authorization: Bearer hpk_your_api_key"
{
"order": {
"id": "HP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.78,
"total_usd": 263.4,
"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ไม่บังคับ | string | หนึ่งใน unlimited, residential, isp, datacenter หากว่างหมายถึง unlimited |
countryไม่บังคับ | string | รหัสประเทศ 2 ตัวอักษร เช่น jp |
cityไม่บังคับ | string | ค่าเมืองจาก /countries เช่น tokyo ใช้ได้เฉพาะเมื่อใส่ country ด้วย |
sessionไม่บังคับ | string | ตัวอักษรหรือตัวเลข 1~32 ตัว คำขอที่มี session เดียวกันจะใช้ IP เดียวกัน |
ttlไม่บังคับ | integer | จำนวนนาทีที่คง IP ของเซสชันไว้ 1~60 หากว่างหมายถึง 30 |
curl "https://hiproxy.shop/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \ -H "Authorization: Bearer hpk_your_api_key"
{
"username": "hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
"password": "your_password",
"http": "http://hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.hiproxy.shop:6100",
"socks5": "socks5h://hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.hiproxy.shop:6200"
}ตัวอย่างทีละขั้นตอน
สคริปต์เดียวที่ตรวจราคา สั่งซื้อจากยอดเงิน และเชื่อมต่อผ่าน IP ญี่ปุ่น
import requests
API = "https://hiproxy.shop/api/v1"
HEAD = {"Authorization": "Bearer hpk_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())const API = "https://hiproxy.shop/api/v1";
const HEAD = { Authorization: "Bearer hpk_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 ดำเนินการเหมือนคำสั่งซื้อในแดชบอร์ด และแสดงในแท็บประวัติ แทน hpk_your_api_key ในตัวอย่างด้วยคีย์ API ของคุณ