Proxy Stats
You can programmatically monitor your domain success rates using the proxy stats endpoint.
Shell
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:
Shell
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 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:
JSON
{ "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):
JSON
{ "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:
JSON
{ "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).