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:
Parameter | Description |
---|---|
api_key | This is a required parameter. |
domain | Optional. The domain to check success rates for. If not provided, returns stats for all domains. |
date | Optional. The date to check stats for in any valid date string format (e.g., "2024-03-19"). If not provided, returns today's stats. |
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 Code | Description |
---|---|
400 | Invalid date format provided |
500 | API key not found or incorrect |
Example error response:
{
"error": "Invalid date format. Please use a valid date string."
}
Daily Stats
The endpoint returns statistics aggregated per day. The data is reset at midnight UTC each day.