Skip to main content

Proxy Stats

You can programmatically monitor your domain success rates using the proxy stats endpoint.

curl "https://backend.scrapeops.io/v1/proxy/account/domain-success-rates?api_key=YOUR_API_KEY"

Domain Success Rates

To check the success rate for a specific domain, you can include the domain parameter:

curl "https://backend.scrapeops.io/v1/proxy/account/domain-success-rates?api_key=YOUR_API_KEY&domain=example.com"

If no domain is specified, the endpoint will return success rates for all domains scraped today/on the specified date.

Parameters

The following parameters can be included with your request:

ParameterDescription
api_keyThis is a required parameter.
domainOptional. The domain to check success rates for. If not provided, returns stats for all domains.
dateOptional. The date to check stats for, in YYYY-MM-DD format (e.g., "2024-03-19"). If not provided, returns today's stats in your account's configured timezone.

Response Format

The response will contain an array of results with statistics for each domain:

{
"results": [
{
"domain": "example.com",
"total_requests": 1000,
"successful_requests": 955,
"failed_requests": 45,
"success_rate": 95.5,
"date": "2024-03-19T00:00:00.000Z"
}
]
}

When no specific domain is provided, you'll get stats for all domains, ordered by total requests (descending):

{
"results": [
{
"domain": "example.com",
"total_requests": 1000,
"successful_requests": 955,
"failed_requests": 45,
"success_rate": 95.5,
"date": "2024-03-19T00:00:00.000Z"
},
{
"domain": "example.org",
"total_requests": 500,
"successful_requests": 491,
"failed_requests": 9,
"success_rate": 98.2,
"date": "2024-03-19T00:00:00.000Z"
}
]
}

Error Responses

Status CodeDescription
400Invalid date format provided
500API key not found or incorrect

Example error response:

{
"error": "Invalid date format. Please use YYYY-MM-DD."
}
Daily Stats

The endpoint returns statistics aggregated per day. Each day's stats reset at midnight in your account's configured timezone (Account Settings).