Quick Start

NinjaProxy is a high-performance proxy network with residential, datacenter, mobile, and rotating gateway products under one account. These docs are the fastest path to getting a working request out through the exact endpoint assigned to your account.

Use the portal as the source of truth for your username, API key, and endpoint values. If an endpoint is assigned to your account, copy that exact host and port instead of inventing one.

For rotating gateway endpoints, start with your base username for default routed traffic. When you need sticky sessions or route selection, append structured username controls instead of guessing alternate ports or hostnames.

Before your first request

  • A NinjaProxy account — sign up free.
  • Your username and API key from the portal.
  • The exact proxy endpoint shown in Portal → Proxy IPs or Portal → Rotating Gateway IPs.

Your first request

Replace USERNAME, API_KEY, and <HTTP_ENDPOINT> with the exact values from your account:

curl --proxy "http://USERNAME:API_KEY@<HTTP_ENDPOINT>"   "https://ip.ninjasproxy.com/"

A successful response shows an exit IP different from your machine's normal egress IP. The exact behavior depends on whether you are using an assigned endpoint or a rotating gateway endpoint.

Tip: If you get 407 Proxy Authentication Required, re-check the endpoint, username, API key, and any URL encoding for special characters.

Rotating gateway example

Routed gateway endpoints accept structured username controls. This example pins a residential US session for 90 seconds while using the same portal-assigned gateway host and port:

curl --proxy "http://USERNAME--session-checkout-flow-42--duration-90--provider-res--geo-country-us:API_KEY@<ROTATING_HTTP_ENDPOINT>"   "https://ip.ninjasproxy.com/"

Choose the right guide

Language guides

Use these docs with AI

Start with the AI guide or hand llms.txt to your assistant.
Use with AI
llms.txt