본문으로 건너뛰기
royalproxy
시작하기

프록시 API 레퍼런스

대시보드에서 하는 주문 관련 일을 코드로도 할 수 있어요. API는 잔액과 프록시 로그인 정보, 가격과 나라 목록을 돌려주고, 잔액으로 결제하는 주문을 받고, 옵션을 붙인 사용자 이름을 만들어요.

시작하기

  1. 1계정을 만들고 대시보드에 로그인해요.
  2. 2접속 설정에서 API 키를 만들어요. 키 전체는 한 번만 보이니 바로 저장하세요.
  3. 3키가 필요한 요청마다 Authorization 헤더에 키를 넣어요.
  4. 4/account를 불러 키가 되는지 확인하고, /orders로 구매해요.

인증

내 계정과 연결된 주소(account, orders, proxy-user)는 API 키가 필요하고, Authorization 헤더에 Bearer 토큰으로 보내요. 가격, 나라, 견적은 공개 주소라 키 없이 돼요.

키는 해시만 저장해요. 잃어버리면 대시보드에서 새 키를 만드세요. 예전 키는 바로 쓸 수 없게 돼요. 키를 브라우저 코드나 공개 저장소에 넣지 마세요.

HTTP header
Authorization: Bearer rpk_your_api_key

기본 URL과 데이터 형식

기본 주소
https://royalproxy.online/api/v1
요청, 응답 본문
application/json
금액
USD 금액, 숫자(예: 807.90)
시각
ISO 8601 (UTC)

요청 한도

API 키 하나로 1분에 60번 요청할 수 있고, 공개 주소는 IP마다 1분에 60번이에요. 넘으면 HTTP 429가 와요. 1분 기다렸다가 다시 보내세요.

오류 응답

오류는 HTTP 상태 코드와, 짧은 코드와 메시지가 든 JSON 본문으로 와요.

예시
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order. Top up in the dashboard."
  }
}
code
bad_requestHTTP 400필요한 값이 빠졌거나, 이 상품에 맞지 않는 값이 있어요.
unauthorizedHTTP 401API 키를 보내지 않았거나 키가 올바르지 않아요.
insufficient_balanceHTTP 402주문 금액이 잔액보다 커요. 결제되지 않았어요.
not_foundHTTP 404내 계정에 이 id의 주문이 없어요.
rate_limitedHTTP 4291분당 요청 한도에 닿았어요.
server_errorHTTP 500저희 쪽에서 문제가 생겼어요. 결제되지 않았어요.

주소별 설명

계정 정보

GET/api/v1/accountAPI 키 필요

잔액, 프록시 호스트와 포트, 프록시 사용자 이름과 비밀번호, 허용 IP를 돌려줘요.

요청
curl https://royalproxy.online/api/v1/account \
  -H "Authorization: Bearer rpk_your_api_key"
응답
{
  "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"
  ]
}

상품과 가격

GET/api/v1/products키 없이 사용

모든 상품의 주문 범위, 단계별 가격, 할인을 돌려줘요. 요금 페이지와 같은 가격표에서 읽어요.

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

나라와 도시

GET/api/v1/countries키 없이 사용

한 상품에서 쓸 수 있는 나라와, 프록시 사용자 이름에 넣을 도시 값을 돌려줘요.

값뜻
product넣지 않아도 됨residential, unlimited, isp, datacenter 중 하나. 기본값은 residential.
요청
curl "https://royalproxy.online/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꼭 넣기residential, unlimited, isp, datacenter 중 하나.
quantity꼭 넣기residential은 GB(5~5,000), unlimited는 일수(1~365), isp는 IP 수(1~1,000), datacenter는 IP 수(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://royalproxy.online/api/v1/quote \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
응답
{
  "product": "unlimited",
  "quantity": 30,
  "unit_price_usd": 6.97,
  "unit": "day",
  "total_usd": 209.1
}

주문 만들기

POST/api/v1/ordersAPI 키 필요

합계를 잔액에서 빼고 주문을 만들어요. 처음 상태는 pending(개통 진행)이고, 준비되면 active로 바뀌어요. 개통에 실패하면 refunded가 되고 금액 전부가 잔액으로 돌아와요. 잔액이 모자라면 402가 와요.

값뜻
product꼭 넣기residential, unlimited, isp, datacenter 중 하나.
quantity꼭 넣기residential은 GB(5~5,000), unlimited는 일수(1~365), isp는 IP 수(1~1,000), datacenter는 IP 수(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://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}'
응답
{
  "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
}

내 주문 목록

GET/api/v1/ordersAPI 키 필요

내 계정의 최근 주문 100건을 최신순으로 돌려줘요.

값뜻
status넣지 않아도 됨pending, active, refunded 중 하나. 빼면 전부 보여 줘요.
요청
curl "https://royalproxy.online/api/v1/orders?status=pending" \
  -H "Authorization: Bearer rpk_your_api_key"
응답
{
  "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"
    }
  ]
}

주문 한 건

GET/api/v1/orders/{id}API 키 필요

id로 주문 한 건을 돌려줘요. 개통이 끝났는지 확인할 때 쓰기 좋아요.

값뜻
id꼭 넣기주문 id, 예: RP-7KQ2M-X4HTD.
요청
curl https://royalproxy.online/api/v1/orders/RP-7KQ2M-X4HTD \
  -H "Authorization: Bearer rpk_your_api_key"
응답
{
  "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"
  }
}

프록시 사용자 이름 만들기

GET/api/v1/proxy-userAPI 키 필요

옵션으로 프록시 사용자 이름을 만들고, 바로 쓸 수 있는 HTTP와 SOCKS5 프록시 URL을 돌려줘요. session을 비워 두면 요청마다 IP가 바뀌어요.

값뜻
product넣지 않아도 됨residential, unlimited, isp, datacenter 중 하나. 기본값은 unlimited.
country넣지 않아도 됨두 글자 나라 코드, 예: jp.
city넣지 않아도 됨/countries에 나오는 도시 값, 예: tokyo. country가 필요해요.
session넣지 않아도 됨영문이나 숫자 1~32자. 같은 session을 쓰는 요청은 IP 하나를 유지해요.
ttl넣지 않아도 됨세션이 IP를 유지하는 시간(분), 1~60. 기본값은 30.
요청
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"
응답
{
  "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"
}

전체 예시

가격 견적을 받고, 잔액으로 사고, 일본 IP로 요청을 보내요.

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로 한 주문은 대시보드 주문과 같아서 내역에 나와요. rpk_your_api_key 자리에 내 키를 넣으세요.

내 코드에서 RoyalProxy 쓰기

가입한 뒤 대시보드에서 API 키를 만드세요.