Zum Inhalt springen
royalproxy

Proxy API Referenz

Was das Dashboard mit Bestellungen macht, geht auch per Code. Die API liefert Guthaben und Proxy-Zugangsdaten, Preise und Länder, nimmt Bestellungen an, die aus dem Guthaben bezahlt werden, und erstellt Benutzernamen mit Optionen.

Erste Schritte

  1. 1Erstellen Sie ein Konto und melden Sie sich im Dashboard an.
  2. 2Erstellen Sie unter Verbinden einen API-Schlüssel. Er wird nur einmal vollständig angezeigt, speichern Sie ihn also sofort.
  3. 3Setzen Sie den Schlüssel in den Authorization-Header jeder Anfrage, die einen braucht.
  4. 4Rufen Sie /account auf, um zu prüfen, ob der Schlüssel funktioniert, und kaufen Sie dann über /orders.

Authentifizierung

Endpunkte, die an Ihr Konto gebunden sind (account, orders, proxy-user), brauchen einen API-Schlüssel, der als Bearer-Token im Authorization-Header gesendet wird. Preise, Länder und Angebote sind öffentlich und funktionieren ohne Schlüssel.

Gespeichert wird nur ein Hash des Schlüssels. Wenn Sie ihn verlieren, erstellen Sie im Dashboard einen neuen, und der alte funktioniert sofort nicht mehr. Setzen Sie den Schlüssel nie in Browser-Code oder ein öffentliches Repository.

HTTP header
Authorization: Bearer rpk_your_api_key

Basis-URL und Datenformat

Basis-URL
https://royalproxy.online/api/v1
Request- und Response-Body
application/json
Beträge
Beträge in USD als Zahlen, z. B. 807.90
Zeit
ISO 8601 (UTC)

Ratenlimits

Ein API-Schlüssel darf 60 Anfragen pro Minute senden, öffentliche Endpunkte erlauben 60 pro Minute und IP. Bei Überschreitung kommt HTTP 429 zurück. Warten Sie eine Minute und versuchen Sie es erneut.

Fehlerantworten

Ein Fehler kommt mit einem HTTP-Statuscode und einem JSON-Body mit einem kurzen Code und einer Meldung.

Beispiel
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order. Top up in the dashboard."
  }
}
code
bad_requestHTTP 400Ein Pflichtwert fehlt, oder ein Wert ist für dieses Produkt nicht gültig.
unauthorizedHTTP 401Es wurde kein API-Schlüssel gesendet, oder der Schlüssel ist ungültig.
insufficient_balanceHTTP 402Die Bestellung kostet mehr als Ihr Guthaben. Es wurde nichts abgebucht.
not_foundHTTP 404Ihr Konto hat keine Bestellung mit dieser id.
rate_limitedHTTP 429Das Limit an Anfragen pro Minute wurde erreicht.
server_errorHTTP 500Auf unserer Seite ist etwas fehlgeschlagen. Es wurde nichts abgebucht.

Endpunkte

Kontodaten

GET/api/v1/accountAPI-Schlüssel

Ihr Guthaben, Proxy-Host und Ports, Proxy-Benutzername und Passwort sowie die freigegebenen IPs.

Anfrage
curl https://royalproxy.online/api/v1/account \
  -H "Authorization: Bearer rpk_your_api_key"
Antwort
{
  "username": "royal_user",
  "balance_usd": 1300,
  "proxy": {
    "host": "gate.royalproxy.online",
    "http_port": 6100,
    "socks5_port": 6200,
    "username": "rpexample1",
    "password": "your_password"
  },
  "allowed_ips": [
    "203.0.113.10"
  ]
}

Produkte und Preise

GET/api/v1/productsKein Schlüssel nötig

Alle Produkte mit ihren Grenzen, Preisstufen und Rabatten, aus derselben Tabelle wie die Preisseite.

Anfrage
curl https://royalproxy.online/api/v1/products
Antwort
{
  "currency": "USD",
  "prices_as_of": "2026-11-28",
  "products": [
    {
      "id": "unlimited",
      "unit": "day",
      "quantity": {
        "meaning": "days",
        "min": 1,
        "max": 365
      },
      "...": "..."
    },
    {
      "id": "residential",
      "unit": "gb",
      "...": "..."
    }
  ]
}

Länder und Städte

GET/api/v1/countriesKein Schlüssel nötig

Die verfügbaren Länder für ein Produkt sowie die Stadtwerte für den Proxy-Benutzernamen.

FeldBedeutung
productOptionalEiner der Werte residential, unlimited, isp, datacenter. Standard ist residential.
Anfrage
curl "https://royalproxy.online/api/v1/countries?product=datacenter"
Antwort
{
  "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"
        }
      ]
    }
  ]
}

Angebot für eine Bestellung

POST/api/v1/quoteKein Schlüssel nötig

Berechnet den Gesamtbetrag einer Bestellung, ohne etwas abzubuchen. Der Body ist derselbe wie beim Aufgeben einer Bestellung.

FeldBedeutung
productPflichtEiner der Werte residential, unlimited, isp, datacenter.
quantityPflichtGB für residential (5~5,000), Tage für unlimited (1~365), IPs für isp (1~1,000) und für datacenter (5~5,000).
concurrencyOptionalNur für unlimited: 200, 500, 1000 oder 2000.
bandwidthOptionalNur für unlimited, in Mbps: 100, 200, 500 oder 1000.
monthsOptionalNur für isp und datacenter: 1, 3, 6 oder 12.
countryOptionalNur für isp und datacenter: ein zweistelliger Code wie jp. Gültige Codes liefert /countries.
Anfrage
curl -X POST https://royalproxy.online/api/v1/quote \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
Antwort
{
  "product": "unlimited",
  "quantity": 30,
  "unit_price_usd": 6.97,
  "unit": "day",
  "total_usd": 209.1
}

Bestellung anlegen

POST/api/v1/ordersAPI-Schlüssel

Bucht den Gesamtbetrag von Ihrem Guthaben ab und legt die Bestellung an. Sie beginnt als pending (wird aktiviert) und wird active, sobald sie bereit ist. Schlägt die Aktivierung fehl, wird sie refunded, und der gesamte Betrag geht zurück auf das Guthaben. Bei zu niedrigem Guthaben kommt 402 zurück.

FeldBedeutung
productPflichtEiner der Werte residential, unlimited, isp, datacenter.
quantityPflichtGB für residential (5~5,000), Tage für unlimited (1~365), IPs für isp (1~1,000) und für datacenter (5~5,000).
concurrencyOptionalNur für unlimited: 200, 500, 1000 oder 2000.
bandwidthOptionalNur für unlimited, in Mbps: 100, 200, 500 oder 1000.
monthsOptionalNur für isp und datacenter: 1, 3, 6 oder 12.
countryOptionalNur für isp und datacenter: ein zweistelliger Code wie jp. Gültige Codes liefert /countries.
Anfrage
curl -X POST https://royalproxy.online/api/v1/orders \
  -H "Authorization: Bearer rpk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
Antwort
{
  "order": {
    "id": "RP-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 6.97,
    "total_usd": 209.1,
    "status": "pending",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:12:44.120Z"
  },
  "balance_usd": 1090.9
}

Ihre Bestellungen

GET/api/v1/ordersAPI-Schlüssel

Die letzten 100 Bestellungen Ihres Kontos, die neueste zuerst.

FeldBedeutung
statusOptionalpending, active oder refunded. Weglassen, um alle aufzulisten.
Anfrage
curl "https://royalproxy.online/api/v1/orders?status=pending" \
  -H "Authorization: Bearer rpk_your_api_key"
Antwort
{
  "orders": [
    {
      "id": "RP-7KQ2M-X4HTD",
      "product": "unlimited",
      "quantity": 30,
      "months": null,
      "concurrency": 1000,
      "bandwidth_mbps": 200,
      "country": null,
      "unit_price_usd": 6.97,
      "total_usd": 209.1,
      "status": "pending",
      "created_at": "2026-10-31T09:12:44.120Z",
      "updated_at": "2026-10-31T09:12:44.120Z"
    }
  ]
}

Eine Bestellung

GET/api/v1/orders/{id}API-Schlüssel

Eine einzelne Bestellung nach id, praktisch, um zu prüfen, ob sie schon aktiv ist.

FeldBedeutung
idPflichtBestell-id, etwa RP-7KQ2M-X4HTD.
Anfrage
curl https://royalproxy.online/api/v1/orders/RP-7KQ2M-X4HTD \
  -H "Authorization: Bearer rpk_your_api_key"
Antwort
{
  "order": {
    "id": "RP-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 6.97,
    "total_usd": 209.1,
    "status": "active",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:40:02.511Z"
  }
}

Generator für Proxy-Benutzernamen

GET/api/v1/proxy-userAPI-Schlüssel

Erstellt aus Ihren Optionen einen Proxy-Benutzernamen und liefert fertige Proxy-URLs für HTTP und SOCKS5. Lassen Sie session leer, dann rotiert die IP pro Anfrage.

FeldBedeutung
productOptionalEiner der Werte residential, unlimited, isp, datacenter. Standard ist unlimited.
countryOptionalZweistelliger Ländercode, etwa jp.
cityOptionalEin Stadtwert aus /countries, etwa tokyo. Setzt country voraus.
sessionOptional1~32 Buchstaben oder Ziffern. Anfragen mit derselben session behalten eine IP.
ttlOptionalMinuten, die die Session ihre IP behält, 1~60. Standard ist 30.
Anfrage
curl "https://royalproxy.online/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \
  -H "Authorization: Bearer rpk_your_api_key"
Antwort
{
  "username": "rpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
  "password": "your_password",
  "http": "http://rpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.royalproxy.online:6100",
  "socks5": "socks5h://rpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.royalproxy.online:6200"
}

Vollständige Beispiele

Einen Preis berechnen, aus dem Guthaben kaufen und eine Anfrage über eine japanische IP senden.

Python (requests)
import requests

API = "https://royalproxy.online/api/v1"
HEAD = {"Authorization": "Bearer rpk_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://royalproxy.online/api/v1";
const HEAD = { Authorization: "Bearer rpk_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-Bestellungen sind dieselben wie Bestellungen im Dashboard und erscheinen im Verlauf. Ersetzen Sie rpk_your_api_key durch Ihren echten Schlüssel.

RoyalProxy aus Ihrem eigenen Code nutzen

Registrieren Sie sich und erstellen Sie dann im Dashboard einen API-Schlüssel.