API Reference

Everything you need to integrate ProxySave into your application.

Authentication

All requests require authentication via two headers. Your username and API key are provided when you create an account.

HeaderDescription
X-Openproxy-UsernamerequiredYour ProxySave username.
X-Openproxy-PasswordrequiredYour API key (starts with ps_live_ or ps_test_).

Request format

Send requests to the /fetch endpoint. The target URL and routing behavior are controlled via headers.

endpoint
POST https://api.proxysave.com/fetch

Request headers

HeaderDescription
urlrequiredThe target URL to fetch through the proxy.
providerRouting strategy or specific provider name. Options: cheapest (default), fastest, or a specific provider name (e.g., brightdata).
labelTag for per-workload learning. Requests with the same label build a shared performance profile. Use descriptive names like product-scraper or price-monitor.
max-price-per-gbMaximum acceptable cost in USD per GB. Providers exceeding this are excluded from routing. Example: 3.00
max-time-msMaximum acceptable response time in milliseconds. Providers historically slower than this for your workload are deprioritized. Example: 2000

Full example

terminal
curl -X POST https://api.proxysave.com/fetch \
  -H "X-Openproxy-Username: acme-corp" \
  -H "X-Openproxy-Password: ps_live_abc123" \
  -H "url: https://api.example.com/products" \
  -H "provider: cheapest" \
  -H "max-price-per-gb: 3.00" \
  -H "max-time-ms: 2000" \
  -H "label: product-catalog"

Response

The response body is the proxied content from the target URL, returned exactly as the upstream server sent it. ProxySave adds metadata headers to help you monitor routing and costs:

HeaderDescription
X-ProxySave-ProviderThe provider that served this request.
X-ProxySave-Cost-Per-GBEffective cost in USD per GB for this request.
X-ProxySave-Latency-MsTotal response time in milliseconds.
X-ProxySave-RetriesNumber of automatic retries before a successful response (0 = first attempt succeeded).

Error codes

When a request fails, ProxySave returns a JSON error body with a machine-readable code and a human-readable message.

error response
{
  "error": "NO_PROVIDERS_AVAILABLE",
  "message": "No providers meet your constraints (max $1.00/GB, <500ms).",
  "status": 503
}
CodeStatusDescription
AUTH_FAILED401Missing or invalid username/API key.
MISSING_URL400The url header is missing from the request.
INVALID_CONSTRAINTS400max-price-per-gb or max-time-ms has an invalid value.
NO_PROVIDERS_AVAILABLE503No providers meet your cost and latency constraints. Relax your limits or add more provider keys.
ALL_PROVIDERS_FAILED502All qualifying providers were tried but returned errors. The last error is included in the response.
PROVIDER_NOT_FOUND404The specified provider name doesn't exist or isn't configured for your account.
RATE_LIMITED429Too many requests. Back off and retry with exponential delay.