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

프록시 API 연동 가이드

RoyalProxy REST 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

기본 주소와 형식

기본 주소
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내 계정에 이 번호의 주문이 없어요.
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-10-31",
  "products": [
    {
      "id": "unlimited",
      "unit": "day",
      "quantity": {
        "meaning": "days",
        "min": 1,
        "max": 365
      },
      "...": "..."
    },
    {
      "id": "residential",
      "unit": "gb",
      "...": "..."
    }
  ]
}

나라와 도시 보기

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

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

값뜻
product넣지 않아도 됨unlimited, residential, 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꼭 넣기unlimited, residential, isp, datacenter 중 하나.
quantity꼭 넣기무제한은 일수(1~365), 주거용은 GB(5~5,000), 고정 ISP는 IP 수(1~1,000), 데이터센터는 IP 수(5~5,000).
concurrency넣지 않아도 됨무제한만: 200, 500, 1000, 2000 중 하나.
bandwidth넣지 않아도 됨무제한만, Mbps 단위: 100, 200, 500, 1000 중 하나.
months넣지 않아도 됨고정 ISP와 데이터센터만: 1, 3, 6, 12 중 하나.
country넣지 않아도 됨고정 ISP와 데이터센터만: 두 글자 나라 코드(예: 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": 8.97,
  "unit": "day",
  "total_usd": 269.1
}

주문하기

POST/api/v1/ordersAPI 키 필요

잔액에서 합계를 빼고 주문을 만들어요. 새 주문은 pending(개통 진행)으로 시작해서 준비되면 active가 돼요. 개통할 수 없는 주문은 refunded가 되고 낸 금액 전부가 잔액으로 돌아와요. 잔액이 모자라면 402를 돌려줘요.

값뜻
product꼭 넣기unlimited, residential, isp, datacenter 중 하나.
quantity꼭 넣기무제한은 일수(1~365), 주거용은 GB(5~5,000), 고정 ISP는 IP 수(1~1,000), 데이터센터는 IP 수(5~5,000).
concurrency넣지 않아도 됨무제한만: 200, 500, 1000, 2000 중 하나.
bandwidth넣지 않아도 됨무제한만, Mbps 단위: 100, 200, 500, 1000 중 하나.
months넣지 않아도 됨고정 ISP와 데이터센터만: 1, 3, 6, 12 중 하나.
country넣지 않아도 됨고정 ISP와 데이터센터만: 두 글자 나라 코드(예: 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": 8.97,
    "total_usd": 269.1,
    "status": "pending",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:12:44.120Z"
  },
  "balance_usd": 1030.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": 8.97,
      "total_usd": 269.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꼭 넣기주문 번호(예: 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": 8.97,
    "total_usd": 269.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 주소를 돌려줘요. session이 없으면 요청마다 IP가 바뀌어요.

값뜻
product넣지 않아도 됨unlimited, residential, 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 키를 만들면 바로 쓸 수 있어요.