Da dove comincio?
- 1Registrati con un nome utente e accedi alla dashboard.
- 2Crea una chiave API nella scheda Connetti. La chiave completa viene mostrata una sola volta, al momento della creazione, quindi salvala subito in un posto sicuro.
- 3Invia la chiave nell'header Authorization con ogni richiesta che la richiede.
- 4Chiama prima /account per verificare che la chiave funzioni, poi effettua gli ordini con /orders.
Autenticazione
Le richieste sul tuo account (account, orders, proxy-user) richiedono una chiave API, inviata nell'header come Authorization: Bearer spk_... Prezzi, paesi e preventivi sono pubblici e funzionano senza chiave.
StarProxy conserva solo un hash di ogni chiave, non la chiave stessa. Se perdi una chiave, creane una nuova nella dashboard. La vecchia chiave smette di funzionare in quel momento. Usa le chiavi solo nel codice lato server. Non inserirle mai in codice eseguito nel browser o in un repository pubblico.
Authorization: Bearer spk_your_api_key
URL di base e formato dei dati
- URL di base
- https://starproxy.shop/api/v1
- Corpo di richiesta e risposta
- application/json
- Importi
- USD come numero, ad es. 1047.70
- Timestamp
- ISO 8601 (UTC)
C'è un limite di chiamate?
Una chiave API può fare fino a 60 chiamate al minuto. Gli endpoint pubblici senza chiave consentono 60 chiamate al minuto per IP. Oltre il limite ricevi HTTP 429: attendi un minuto e invia di nuovo.
Come sono fatti gli errori?
Un codice di stato HTTP, più un corpo JSON con un breve codice di errore e un messaggio.
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low for this order. Top up in the dashboard."
}
}| HTTP | code | Significato |
|---|---|---|
| bad_requestHTTP 400Manca un valore obbligatorio, oppure il valore non è valido per questo prodotto. | Manca un valore obbligatorio, oppure il valore non è valido per questo prodotto. | |
| unauthorizedHTTP 401La chiave API manca o non corrisponde. | La chiave API manca o non corrisponde. | |
| insufficient_balanceHTTP 402Il saldo è inferiore al totale dell'ordine. Non è stato addebitato nulla. | Il saldo è inferiore al totale dell'ordine. Non è stato addebitato nulla. | |
| not_foundHTTP 404Non c'è nessun ordine con questo id nel tuo account. | Non c'è nessun ordine con questo id nel tuo account. | |
| rate_limitedHTTP 429Troppe richieste in un minuto. | Troppe richieste in un minuto. | |
| server_errorHTTP 500Il server non è riuscito a completare la richiesta. Non è stato addebitato nulla. | Il server non è riuscito a completare la richiesta. Non è stato addebitato nulla. |
Endpoint
Ottieni l'account
GET/api/v1/accountChiave API obbligatoria
Restituisce saldo, host e porte del proxy, nome utente e password del proxy e i tuoi IP autorizzati.
curl https://starproxy.shop/api/v1/account \ -H "Authorization: Bearer spk_your_api_key"
{
"username": "star_user01",
"balance_usd": 1300,
"proxy": {
"host": "gate.starproxy.shop",
"http_port": 6100,
"socks5_port": 6200,
"username": "spexample1",
"password": "your_password"
},
"allowed_ips": [
"203.0.113.10"
]
}Ottieni prodotti e prezzi
GET/api/v1/productsNessuna chiave necessaria
Restituisce per ogni prodotto l'intervallo ordinabile, il prezzo per scaglione di quantità e gli sconti sulla durata, dallo stesso listino della pagina prezzi.
curl https://starproxy.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",
"...": "..."
}
]
}Elenca paesi e città
GET/api/v1/countriesNessuna chiave necessaria
Restituisce i paesi supportati da ogni prodotto, più i valori di città per l'opzione -city- del nome utente.
| Campo | Tipo | Significato |
|---|---|---|
productFacoltativo | string | Uno tra unlimited, residential, isp, datacenter. Predefinito: residential. |
curl "https://starproxy.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"
}
]
}
]
}Ottieni un preventivo
POST/api/v1/quoteNessuna chiave necessaria
Calcola il totale dell'ordine senza toccare il saldo. Invia lo stesso corpo che useresti per l'ordine.
| Campo | Tipo | Significato |
|---|---|---|
productObbligatorio | string | Uno tra unlimited, residential, isp, datacenter. |
quantityObbligatorio | integer | Giorni per unlimited (1~365), GB per residential (5~5,000), numero di IP per isp (1~1,000) o datacenter (5~5,000). |
concurrencyFacoltativo | integer | Solo unlimited. Uno tra 200, 500, 1000, 2000. |
bandwidthFacoltativo | integer | Solo unlimited, in Mbps. Uno tra 100, 200, 500, 1000. |
monthsFacoltativo | integer | Solo isp e datacenter. Uno tra 1, 3, 6, 12. |
countryFacoltativo | string | Solo isp e datacenter. Un codice paese di due lettere come jp. Vedi /countries per i valori validi. |
curl -X POST https://starproxy.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.41,
"unit": "day",
"total_usd": 252.3
}Crea un ordine
POST/api/v1/ordersChiave API obbligatoria
Sottrae il totale dal saldo e crea l'ordine. Lo stato parte da pending (in attivazione) e passa ad active quando l'ordine è pronto. Se non può essere attivato, diventa refunded e l'intero importo torna sul saldo. Con saldo insufficiente si riceve 402.
| Campo | Tipo | Significato |
|---|---|---|
productObbligatorio | string | Uno tra unlimited, residential, isp, datacenter. |
quantityObbligatorio | integer | Giorni per unlimited (1~365), GB per residential (5~5,000), numero di IP per isp (1~1,000) o datacenter (5~5,000). |
concurrencyFacoltativo | integer | Solo unlimited. Uno tra 200, 500, 1000, 2000. |
bandwidthFacoltativo | integer | Solo unlimited, in Mbps. Uno tra 100, 200, 500, 1000. |
monthsFacoltativo | integer | Solo isp e datacenter. Uno tra 1, 3, 6, 12. |
countryFacoltativo | string | Solo isp e datacenter. Un codice paese di due lettere come jp. Vedi /countries per i valori validi. |
curl -X POST https://starproxy.shop/api/v1/orders \
-H "Authorization: Bearer spk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'{
"order": {
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
},
"balance_usd": 1047.7
}Elenca gli ordini
GET/api/v1/ordersChiave API obbligatoria
Restituisce fino a 100 ordini, dal più recente.
| Campo | Tipo | Significato |
|---|---|---|
statusFacoltativo | string | Uno tra pending, active, refunded. Lascialo vuoto per tutti gli stati. |
curl "https://starproxy.shop/api/v1/orders?status=pending" \ -H "Authorization: Bearer spk_your_api_key"
{
"orders": [
{
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
}
]
}Ottieni un ordine
GET/api/v1/orders/{id}Chiave API obbligatoria
Restituisce un ordine tramite id. Usalo per vedere se l'attivazione è completata.
| Campo | Tipo | Significato |
|---|---|---|
idObbligatorio | string | L'id dell'ordine, ad esempio SP-7KQ2M-X4HTD. |
curl https://starproxy.shop/api/v1/orders/SP-7KQ2M-X4HTD \ -H "Authorization: Bearer spk_your_api_key"
{
"order": {
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"status": "active",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:40:02.511Z"
}
}Genera un nome utente proxy
GET/api/v1/proxy-userChiave API obbligatoria
Restituisce un nome utente proxy con le tue opzioni già incluse, più URL HTTP e SOCKS5 pronti da incollare. Senza session, ogni richiesta riceve un nuovo IP.
| Campo | Tipo | Significato |
|---|---|---|
productFacoltativo | string | Uno tra unlimited, residential, isp, datacenter. Predefinito: unlimited. |
countryFacoltativo | string | Un codice paese di due lettere, ad esempio jp. |
cityFacoltativo | string | Un valore di città da /countries, ad esempio tokyo. Richiede country. |
sessionFacoltativo | string | Da 1 a 32 lettere o cifre. Le richieste con la stessa session condividono lo stesso IP. |
ttlFacoltativo | integer | Minuti per cui mantenere l'IP della sessione, da 1 a 60. Predefinito: 30. |
curl "https://starproxy.shop/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \ -H "Authorization: Bearer spk_your_api_key"
{
"username": "spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
"password": "your_password",
"http": "http://spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.starproxy.shop:6100",
"socks5": "socks5h://spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.starproxy.shop:6200"
}Esempio completo
Un unico script che ottiene un preventivo, ordina dal saldo e si connette tramite un IP giapponese.
import requests
API = "https://starproxy.shop/api/v1"
HEAD = {"Authorization": "Bearer spk_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://starproxy.shop/api/v1";
const HEAD = { Authorization: "Bearer spk_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);Gli ordini via API vengono elaborati come quelli dalla dashboard e compaiono nella scheda Cronologia. Sostituisci spk_your_api_key negli esempi con la tua chiave.