curl Integration
curl is the fastest way to validate credentials, confirm the endpoint is reachable, and inspect proxy auth or routing errors.
Use the exact endpoint shown in Portal → Proxy IPs or Rotating Gateway IPs. Public docs intentionally use placeholders like <HTTP_ENDPOINT> because live host/port values are account-specific.Assigned/static HTTP endpoint
curl --proxy "http://<USERNAME>:<API_KEY>@<HTTP_ENDPOINT>" --max-time 15 "https://ip.ninjasproxy.com/"Assigned/static SOCKS5 endpoint
curl --socks5-hostname "<SOCKS_ENDPOINT>" --proxy-user "<USERNAME>:<API_KEY>" --max-time 15 "https://ip.ninjasproxy.com/"Rotating gateway with targeting headers
curl --proxy "http://<USERNAME>:<API_KEY>@<ROTATING_HTTP_ENDPOINT>" -H "X-Session-ID: checkout-flow-42" -H "X-Target-Geo: US" -H "X-Target-City: NewYork" "https://ip.ninjasproxy.com/"Useful debug flags
| Flag | Effect |
|---|---|
-v | Show CONNECT, TLS, and proxy handshake details. |
--max-time 15 | Fail faster while debugging endpoint or auth issues. |
--proxy-insecure | Only use temporarily if you are debugging a TLS interception issue. |
--socks5-hostname | Resolve the target hostname through the SOCKS5 proxy instead of locally. |
Next Steps
- Authentication — credential and whitelist setup
- Rate limits — connection reuse and concurrency guidance
- Rotating proxies — headers and sticky sessions
- API Reference — fetch your endpoints programmatically
