Tài liệu API & tích hợp
Hai cách tích hợp SocksNode: kết nối trực tiếp tới proxy gateway qua HTTP(S) hoặc SOCKS5, hoặc quản lý băng thông, mức sử dụng và proxy bằng chương trình thông qua REST API.
Trong trang này
Proxy di động
REST API 4G/5G
Mua và quản lý proxy di động 4G/5G bằng API. Mỗi Mobile IP là một IP nhà mạng xoay vòng (tối đa 3 kết nối) trong thời hạn bạn chọn. Thuê và gia hạn được trừ vào số dư tài khoản trả trước (USD). Dùng scope read:proxies / write:proxies.
https://socksnode.com/api/v1Xác thực
URL gốc https://socksnode.com/api/v1. Tạo key trong Dashboard → API access và gửi dưới dạng Bearer token. Key có phạm vi giới hạn — chỉ yêu cầu những gì bạn cần.
| Phạm vi | Cấp quyền |
|---|---|
| read:usage | Số dư & phân tích mức sử dụng |
| read:proxies | Liệt kê thông tin đăng nhập proxy đã lưu |
| write:proxies | Tạo thông tin đăng nhập proxy mới |
| purchase | Mua GB cho proxy xoay vòng dân cư, datacenter và mobile, mua và gia hạn IP tĩnh và IP ISP, thuê và gia hạn port 4G/5G, bật tự gia hạn, mua IP 24 giờ, IP Vault và băng thông — trừ vào số dư ví. |
Giới hạn tần suất: 120 request mỗi phút cho mỗi key (việc tạo proxy còn bị giới hạn chặt hơn). Giữ key bí mật và chỉ dùng phía máy chủ.
GET /api/v1/account HTTP/1.1
Host: socksnode.com
Authorization: Bearer sk_YOUR_API_KEYLỗi
Lỗi trả về một body JSON { "error": { "code", "message" } } kèm mã trạng thái HTTP tương ứng:
| Trạng thái | Ý nghĩa |
|---|---|
| 400 | Body hoặc tham số request không hợp lệ |
| 401 | API key thiếu, không hợp lệ hoặc đã bị thu hồi |
| 402 | Số dư băng thông không đủ để tạo proxy |
| 403 | API key thiếu phạm vi bắt buộc |
| 404 | Không tìm thấy, hoặc không phải của bạn. |
| 409 | Trạng thái cổng không cho phép lúc này, vd đã hết hạn. |
| 429 | Vượt giới hạn tần suất — xem header Retry-After |
| 502 | Mạng phía trên bị lỗi. Bạn không bị trừ tiền. |
| 503 | Sản phẩm đang bảo trì. Thử lại sau ít phút. |
HTTP/1.1 402 Payment Required
Content-Type: application/json
{
"error": {
"code": "no_bandwidth",
"message": "…"
}
}Endpoint API
thời hạn, quốc gia, bang & nhà mạng
GET/mobile/catalog
Phạm vi: read:proxies
Tham số query
countryintegerTùy chọnId quốc gia. Trả về các bang.
stateintegerTùy chọnId bang. Trả về các nhà mạng.
availabilitystringTùy chọnĐặt 1 để biết mỗi lựa chọn còn trống bao nhiêu ngay lúc này.
1tierstringTùy chọnGói cần xem tồn kho.
economybasicturboMặc định:basicmodemsstringTùy chọnĐặt 1 cùng với state để liệt kê mọi modem ở đó, cả rảnh lẫn bận, kèm thời gian mỗi modem giữ IP. Cùng các trường với /mobile/proxies/PROXY_ID/modems.
1carrierintegerTùy chọnId nhà mạng. Với modems=1, chỉ liệt kê modem của nhà mạng đó.
curl "https://socksnode.com/api/v1/mobile/catalog?state=12&availability=1" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": {
"carriers": [
{ "id": 34, "name": "5G AT&T", "status": "ok", "pct": 82 },
{ "id": 35, "name": "5G T-Mobile", "status": "low", "pct": 11 },
{ "id": 36, "name": "5G Verizon", "status": "none", "pct": 0 }
]
}
}
// status: "ok" | "low" | "none" | "unknown"
// Country and state stock is refreshed every ~15 min;
// carrier stock is checked live, right before you choose.liệt kê proxy di động của bạn (kèm thông tin đăng nhập)
GET/mobile/proxies
Phạm vi: read:proxies
Không có tham số.
curl "https://socksnode.com/api/v1/mobile/proxies" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": [
{
"id": "clx…",
"name": "Port 1",
"host": "mobile.socksnode.com",
"port": 9094,
"protocol": "socks5",
"username": "sn_a1b2c3d4",
"password": "…",
"authMode": "userpass",
"allowedIps": [],
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"rotationMinutes": 15,
"modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
"status": "active",
"paused": false,
"bytesUsed": 0,
"lastExitIp": null,
"expiresAt": "2026-10-30T04:46:53.000Z"
}
]
}một proxy
GET/mobile/proxies/{id}
kèm data đã dùng + IP thoát gần nhất
Phạm vi: read:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": {
"id": "clx…",
"name": "Port 1",
"host": "mobile.socksnode.com",
"port": 9094,
"protocol": "socks5",
"username": "sn_a1b2c3d4",
"password": "…",
"authMode": "userpass",
"allowedIps": [],
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"rotationMinutes": 15,
"modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
"status": "active",
"paused": false,
"bytesUsed": 0,
"lastExitIp": null,
"expiresAt": "2026-10-30T04:46:53.000Z"
}
}mua N cổng (trừ vào số dư; 402 nếu không đủ)
POST/mobile/proxies
Phạm vi: purchase
Tham số body
tierKeystringTùy chọnGói cần thuê.
economybasicturboMặc định:basicdurationKeystringBắt buộcThời hạn thuê. Phải là thời hạn gói đó có bán.
2h12h1d3d7d15d30dquantityintegerTùy chọnSố cổng cần thuê, 1–50. Cổng nào không tạo được thì không bị tính tiền.
Mặc định:
1countryIdintegerTùy chọnId quốc gia từ catalog. Bỏ trống để lấy vị trí bất kỳ còn hàng.
cityIdintegerTùy chọnId bang từ catalog.
spIdintegerTùy chọnId nhà mạng từ catalog.
modemIdstringTùy chọnId modem lấy từ /mobile/catalog?modems=1 (cùng gói). Cần cityId và quantity 1. Trả 409 modem_taken nếu modem hết chỗ; bạn không bị trừ tiền.
protocolstringTùy chọnGiao thức của cổng.
sockshttpMặc định:socks
curl -X POST "https://socksnode.com/api/v1/mobile/proxies" \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"durationKey": "30d",
"quantity": 1,
"countryId": 1,
"cityId": 12,
"spId": 34,
"protocol": "socks"
}'{
"data": [
{
"id": "clx…",
"name": "Port 1",
"host": "mobile.socksnode.com",
"port": 9094,
"protocol": "socks5",
"username": "sn_a1b2c3d4",
"password": "…",
"authMode": "userpass",
"allowedIps": [],
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"rotationMinutes": 15,
"modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
"status": "active",
"paused": false,
"bytesUsed": 0,
"lastExitIp": null,
"expiresAt": "2026-10-30T04:46:53.000Z"
}
],
"charged": 40
}đổi quốc gia/bang/nhà mạng (miễn phí)
POST/mobile/proxies/{id}/switch
Phạm vi: write:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
Tham số body
countryIdintegerBắt buộcId quốc gia từ catalog.
cityIdintegerTùy chọnId bang từ catalog.
spIdintegerTùy chọnId nhà mạng từ catalog.
modemIdstringTùy chọnId modem lấy từ danh sách modem. Cần cityId. Port chỉ chuyển sang đúng modem đó: 409 modem_taken nếu modem đầy, 404 modem_gone nếu modem không còn trong danh sách.
protocolstringTùy chọnMặc định giữ giao thức hiện tại của cổng.
sockshttp
curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/switch" \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"countryId": 3,
"cityId": 12,
"spId": 34,
"modemId": "8d21e7c40b9a6f5e3c12"
}'{
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
}
}
// + every other field of GET /mobile/proxies/{id}liệt kê modem của một bang cho port (rảnh và bận, thời gian giữ IP)
GET/mobile/proxies/{id}/modems
Phạm vi: read:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
Tham số query
stateintegerBắt buộcId bang trong catalog. Liệt kê modem của bang đó theo gói của port này.
carrierintegerTùy chọnId nhà mạng. Với modems=1, chỉ liệt kê modem của nhà mạng đó.
curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/modems?state=12&carrier=34" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": {
"modems": [
{
"id": "3f9c0a1b2d4e5f607182",
"code": "K7QM",
"carrier": "5G AT&T",
"free": true,
"current": true,
"yours": 0,
"yourPorts": [],
"rotationMinutes": 30,
"lastIp": "174.208.161.27",
"lastOkAt": "2026-10-28T03:12:40.000Z",
"failing": false
},
{
"id": "8d21e7c40b9a6f5e3c12",
"code": "R4XB",
"carrier": "5G AT&T",
"free": false,
"current": false,
"yours": 0,
"yourPorts": [],
"rotationMinutes": 60,
"lastIp": null,
"lastOkAt": null,
"failing": false
}
],
"free": 1,
"total": 2
}
}
// free: has a slot for one more port. current: this port is on it.
// yours: your other live ports on it (they share its IP); yourPorts: their port numbers.
// rotationMinutes: how long the modem keeps one IP.IP thoát mới (miễn phí)
POST/mobile/proxies/{id}/rotate
Phạm vi: write:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/rotate" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
}
}
// + every other field of GET /mobile/proxies/{id}không cần API key
GET/mobile/proxies/{id}/rotate?token=…
chỉ 1 link copy-paste từ dashboard. Mở link (trình duyệt, curl, cron job, bookmark) để đổi IP; thêm tham số vị trí để đổi quốc gia/bang/nhà mạng thay vì chỉ đổi IP.
Tham số query
tokenstringBắt buộcToken đổi IP của cổng, lấy ở thẻ cổng trong dashboard. Không cần API key.
countryIdintegerTùy chọnTuỳ chọn. Chuyển sang vị trí này thay vì chỉ đổi IP.
cityIdintegerTùy chọnId bang từ catalog.
spIdintegerTùy chọnId nhà mạng từ catalog.
formatstringTùy chọnĐịnh dạng phản hồi.
jsonhtmlMặc định:json
curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/rotate?token=YOUR_ROTATE_TOKEN"{
"ok": true,
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
}
}
// + every other field of GET /mobile/proxies/{id}đọc IP thoát trực tiếp
GET/mobile/proxies/{id}/check-ip
Phạm vi: read:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/check-ip" \
-H "Authorization: Bearer sk_YOUR_API_KEY"{
"data": { "ip": "174.208.161.27" }
}chuyển SOCKS5 ↔ HTTP(S)
POST/mobile/proxies/{id}/protocol
Phạm vi: write:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
Tham số body
protocolstringBắt buộcGiao thức của cổng.
sockshttp
curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/protocol" \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "http"
}'{
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
}
}
// + every other field of GET /mobile/proxies/{id}đổi kiểu xác thực
POST/mobile/proxies/{id}/auth
Phạm vi: write:proxies
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
Tham số body
modestringBắt buộcuserpass đăng nhập bằng tên và mật khẩu; whitelist cho các IP trong danh sách kết nối không cần mật khẩu.
userpasswhitelistallowedIpsstring[]Tùy chọnTối đa 3 địa chỉ IPv4 hoặc IPv6 công khai, không dùng dải. Cần cho whitelist.
Mặc định:
[]
curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/auth" \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "whitelist",
"allowedIps": [
"203.0.113.7"
]
}'{
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
}
}
// + every other field of GET /mobile/proxies/{id}gia hạn cổng (trừ vào số dư)
POST/mobile/proxies/{id}/renew
Phạm vi: purchase
Tham số đường dẫn
idstringBắt buộcId của proxy di động.
Tham số body
durationKeystringBắt buộcThời hạn thuê. Phải là thời hạn gói của cổng có bán.
2h12h1d3d7d15d30d
curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/renew" \
-H "Authorization: Bearer sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"durationKey": "30d"
}'{
"data": {
"id": "clx…",
"host": "mobile.socksnode.com",
"port": 9095,
"protocol": "socks5",
"country": "UNITED STATES",
"state": "FLORIDA",
"carrier": "5G AT&T",
"status": "active"
},
"charged": 40
}
// + every other field of GET /mobile/proxies/{id}Sẵn sàng xây dựng?
Tạo thông tin đăng nhập trong dashboard hoặc tạo một API key để tự động hóa.