API Documentation

Introduction

The ScrapeProxy API provides enterprise-grade proxy solutions for data collection, market research, and web scraping needs. Our service offers datacenter, residential, and mobile proxies with high availability and performance.

All API access is over HTTPS, and responses maintain the original format of the target URL.

Authentication

To authenticate with the API, include your API key in each request using one of these methods:

  1. As a query parameter: ?api_key=YOUR_API_KEY
  2. As a request header: X-API-Key: YOUR_API_KEY
Keep your API key secure! It grants access to make proxy requests on your behalf.

API Endpoints

GET /api/proxy

Make a GET request through our proxy servers.

Query Parameters

ParameterTypeRequiredDescription
urlStringYesThe target URL to access through the proxy
api_keyStringYes*Your API key (if not provided in header)

Example Request

curl -X GET "https://scrapeproxy.com/api/proxy?url=https://example.com&api_key=YOUR_API_KEY"

POST /api/proxy

Make a POST request through our proxy servers.

Query Parameters

ParameterTypeRequiredDescription
urlStringYesThe target URL to access through the proxy
api_keyStringYes*Your API key (if not provided in header)

Request Body

You can send any data in the request body, which will be forwarded to the target URL.

Example Request

curl -X POST "https://scrapeproxy.com/api/proxy?url=https://example.com/api&api_key=YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"key": "value"}'

Response Format

The API forwards the complete response from the target URL, including:

  • Status code
  • Headers (except for content-encoding, transfer-encoding, content-length)
  • Response body

Error Handling

When an error occurs, the API returns an error object with details:

{
  "error": "Error message description"
}

Common Error Codes

Status CodeDescription
400Bad request (missing parameters or invalid URL)
401Unauthorized (missing or invalid API key)
403Forbidden (request limit exceeded)
500Internal server error
503Service unavailable (no available proxies)

Rate Limits

Each plan includes a monthly request allocation:

  • Datacenter Plan: 5000 requests per month (fastest performance)
  • Residential Plan: 10000 requests per month (highest success rate)
  • Mobile Plan: 15000 requests per month (best for specific use cases)

When you reach your monthly limit, requests will return a 403 error. You can upgrade your plan or purchase additional requests from your dashboard.

Each plan's allocation resets at the start of your billing cycle.

Try it out

Code Examples

Python

import requests

api_key = "YOUR_API_KEY"
target_url = "https://example.com"

response = requests.get(
    "https://scrapeproxy.com/api/proxy",
    params={
        "url": target_url,
        "api_key": api_key
    }
)
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")

data = {"key": "value"}
response = requests.post(
    "https://scrapeproxy.com/api/proxy",
    params={
        "url": "https://example.com/api",
        "api_key": api_key
    },
    json=data
)
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")

JavaScript

const apiKey = "YOUR_API_KEY";
const targetUrl = "https://example.com";
fetch(`https://scrapeproxy.com/api/proxy?url=${encodeURIComponent(targetUrl)}&api_key=${apiKey}`)
    .then(response => response.text())
    .then(data => { console.log("Response:", data); })
    .catch(error => { console.error("Error:", error); });
const postData = { key: "value" };
fetch(`https://scrapeproxy.com/api/proxy?url=${encodeURIComponent("https://example.com/api")}&api_key=${apiKey}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(postData)
})
    .then(response => response.json())
    .then(data => { console.log("Response:", data); })
    .catch(error => { console.error("Error:", error); });