REST API v1
Dashboard Get API Key
Production REST API v1.0.0

NyanProxy Developer API

Integrate high-speed residential proxy provisioning directly into your scrapers, applications, and bot pipelines. Exclusively available to accounts with the Lifetime Reseller Plan.

Wholesale Reseller Pricing: All bandwidth provisioned via this API is permanently billed at the flat wholesale rate of $0.10 per 1 GB (50% discount) with zero maintenance fees.

Base URL

All API requests must be made over HTTPS to the official API base endpoint:
1
https://nyanproxy.com/api/v1

Authentication

Authenticate every request by passing your secret Live API Key in the Authorization header:
1 2
Authorization: Bearer np_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Content-Type: application/json
Where to find your API key: Log in to your Dashboard → Reseller Plan. Your key begins with np_live_ and can be revealed, copied, or instantly regenerated at any time.

Zero Rate-Limits / DDoS Policy

Requests authorized with a valid np_live_ Reseller API Key are completely exempted from automated anti-DDoS burst limits and connection throttling. You can freely generate tens of thousands of proxies and fire high-concurrency provisioning scripts without IP ban risks.

1. User Profile & Telemetry

GET /api/v1/profile

Returns authenticated user details, spendable balance, wholesale rate per GB, total bandwidth consumed across all plans, cumulative spend, and count of active plans.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ "success": true, "user": { "user_id": "379782252596135882", "username": "mihailow", "email": "[email protected]", "balance_usd": 4.50, "rate_per_gb": 0.10, "bandwidth_used_bytes": 1153985, "bandwidth_used_gb": 0.001, "total_spent_usd": 6.00, "active_plans": 2 } }

2. List User Plans

GET /api/v1/plans

Lists all residential proxy plans belonging to your account. Each plan includes its random 6-digit plan_id (e.g. 627121), custom name, proxy password, allocated GB, used GB, and remaining quota.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ "success": true, "count": 1, "plans": [ { "plan_id": "627121", "name": "Production Scraper", "password": "np_49e60a0921ae", "allocated_gb": 10.0, "used_gb": 0.001, "remaining_gb": 9.999, "allocated_bytes": 10737418240, "used_bytes": 1153985, "remaining_bytes": 10736264255, "is_active": true, "created_at": 1794615007606, "updated_at": 1794736964156 } ] }

3. Buy Proxy Plan

POST /api/v1/plans/buy

Instantly provisions a new residential proxy plan and deducts the wholesale cost ($0.10 per 1 GB) from your account balance.

JSON Request Body

Field Type Status Description
gigabytes number required Bandwidth in GB to purchase (minimum 1 GB). Also accepts amount_gb.
name string optional Friendly custom label for the plan (e.g. "Customer #49 Sub-account").
1 2 3 4
{ "gigabytes": 5, "name": "Production Bot Cluster" }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "success": true, "message": "Successfully provisioned 5 GB residential plan at wholesale rate ($0.10/GB)!", "plan": { "plan_id": "839104", "name": "Production Bot Cluster", "password": "np_14c94445979d", "allocated_gb": 5, "remaining_gb": 5, "allocated_bytes": 5368709120, "remaining_bytes": 5368709120, "is_active": true }, "cost_usd": 0.50, "balance_remaining_usd": 4.00 }

4. Top Up Plan Bandwidth

POST /api/v1/plans/topup

Adds residential bandwidth to an existing plan at wholesale reseller pricing ($0.10/GB), automatically reactivating the plan if it was depleted.

JSON Request Body

Field Type Status Description
plan_id string | number required Your 6-digit random plan ID (e.g. "627121" or 627121).
gigabytes number required Additional GB to add to the plan (minimum 1 GB).
1 2 3 4
{ "plan_id": "627121", "gigabytes": 10 }
1 2 3 4 5 6 7 8 9 10 11 12
{ "success": true, "message": "Successfully topped up 10 GB for plan \"Production Scraper\"!", "plan": { "plan_id": "627121", "name": "Production Scraper", "allocated_gb": 20.0, "remaining_gb": 19.999, "is_active": true }, "cost_usd": 1.00, "balance_remaining_usd": 3.00 }

5. Generate Proxies (No Limits)

POST /api/v1/proxies/generate

Generates ready-to-use proxy endpoint strings with no upper quantity limit. Supports 220+ countries, rotating or sticky sessions, and customizable output formats.

JSON Request Body

Field Type Status Description
plan_id string | number required The 6-digit plan identifier (e.g. "627121").
country string optional 2-letter ISO country code (e.g. "us", "gb", "de", "jp") or "all". Default is "all".
protocol string optional Proxy protocol to generate: "http" or "socks5" (Port 58996). NyanProxy's high-speed gateway features dual-stack multiplexing, supporting both HTTP CONNECT and SOCKS5 on port 58996.
session_type string optional "rotating" (new IP on each request) or "sticky" (persists session IP). Default is "rotating".
count number optional Number of proxy lines to generate (No Limit: 10, 500, 5000+). Default is 10.
format string optional "user:pass@host:port" (default),
"host:port:user:pass",
"host:port@user:pass", or
"url" (e.g. socks5://user:pass@host:58997).
prefix string optional Optional custom identifier prefix for sticky session tracking.
1 2 3 4 5 6 7 8
{ "plan_id": "627121", "country": "us", "protocol": "socks5", "session_type": "sticky", "count": 5, "format": "user:pass@host:port" }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ "success": true, "plan_id": "627121", "plan_name": "Production Scraper", "country": "us", "protocol": "socks5", "port": 58996, "session_type": "sticky", "format": "user:pass@host:port", "count": 5, "proxies": [ "res-us-socks5-sid-8f12a4b1:[email protected]:58996", "res-us-socks5-sid-4a90c1e8:[email protected]:58996", "res-us-socks5-sid-2e77b0d3:[email protected]:58996", "res-us-socks5-sid-9b41ef65:[email protected]:58996", "res-us-socks5-sid-1d33ca78:[email protected]:58996" ] }

Interactive Code Examples

Production-grade snippets in cURL, Python 3, and Node.js:
Bash / cURL Production Command
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# 1. Fetch Profile & Telemetry curl -X GET "https://nyanproxy.com/api/v1/profile" \ -H "Authorization: Bearer YOUR_API_KEY" # 2. Buy a 5 GB Residential Plan ($0.50 USD at wholesale $0.10/GB) curl -X POST "https://nyanproxy.com/api/v1/plans/buy" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"gigabytes": 5, "name": "Scraper Pool"}' # 3. Generate 100 Sticky SOCKS5 Proxies (US) curl -X POST "https://nyanproxy.com/api/v1/proxies/generate" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"plan_id": "627121", "country": "us", "protocol": "socks5", "session_type": "sticky", "count": 100}'
Python 3.8+ (requests)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
import requests API_KEY = "YOUR_API_KEY" BASE_URL = "https://nyanproxy.com/api/v1" HEADERS = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } # 1. Fetch Profile profile = requests.get(f"{BASE_URL}/profile", headers=HEADERS).json() print(f"Account Balance: ${profile['user']['balance_usd']:.2f}") # 2. Generate 50 SOCKS5 Proxies (Germany) payload = { "plan_id": "627121", "country": "de", "protocol": "socks5", "session_type": "rotating", "count": 50, "format": "user:pass@host:port" } gen_resp = requests.post(f"{BASE_URL}/proxies/generate", headers=HEADERS, json=payload).json() print(f"Generated {gen_resp['count']} {gen_resp['protocol'].upper()} proxies on port {gen_resp['port']}:") for proxy in gen_resp.get("proxies", []): print(proxy)
Node.js 18+ (Native fetch / axios)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
const API_KEY = 'YOUR_API_KEY'; const BASE_URL = 'https://nyanproxy.com/api/v1'; async function generateProxies() { const res = await fetch(`${BASE_URL}/proxies/generate`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ plan_id: '627121', country: 'us', protocol: 'socks5', session_type: 'sticky', count: 20 }) }); const data = await res.json(); console.log(`Generated ${data.count} ${data.protocol.toUpperCase()} proxies on port ${data.port}:`); data.proxies.forEach(p => console.log(p)); } generateProxies();

Error Codes

Status Description
200 OK Request succeeded. Data returned in response body.
400 Bad Request Missing parameters or insufficient balance to complete order.
401 Unauthorized Missing or invalid np_live_ API key.
403 Forbidden Account suspended or user has not yet unlocked the Lifetime Reseller Plan ($100 deposits).
404 Not Found Target plan ID was not found in your account.
500 Internal Error Unexpected server error.