API Overview
Base URL, authentication, error handling, and common patterns for the RedScrape API.
Base URL
All API endpoints are relative to:
https://api.redscrape.com/api/publicAuthentication
Most endpoints require an API key passed via the X-API-Key header:
curl -H "X-API-Key: your_api_key" \
https://api.redscrape.com/api/public/account/mePublic Endpoints (no auth required)
| Endpoint | Description |
|---|---|
GET /products/ | List all products |
GET /products/calculate-gb-price | Calculate custom data pricing |
GET /products/gb-tier-limits | Get min/max GB for a product |
POST /payments/calculate-price | Preview purchase cost |
GET /payments/verify-coupon/{code} | Validate a coupon |
Error Handling
Errors return a JSON object with a detail field:
{
"detail": "Insufficient wallet balance"
}HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad request invalid parameters |
401 | Unauthorized missing or invalid API key |
403 | Forbidden access denied |
404 | Not found |
422 | Validation error check request body |
429 | Rate limited too many requests |
500 | Internal server error |
Request Format
- Use
Content-Type: application/jsonfor POST/PUT/PATCH requests - Query parameters for GET requests
- Path parameters where indicated (e.g.
/subscriptions/{sub_id})
Pagination
Paginated endpoints accept page and per_page query parameters and return a meta object:
{
"items": [...],
"meta": {
"total": 47,
"pages": 3,
"page": 1,
"per_page": 20
}
}