Test 6: Rate Limited API
APITest how your scraper handles HTTP 429 responses and rate limit headers.
Test Passing Criteria
How it works
This test exposes a JSON API endpoint that enforces rate limits using a sliding window algorithm. Your scraper must respect the rate limit headers and handle 429 responses gracefully.
API Endpoint
GET /api/test/rate-limited/data?difficulty=easy|medium|hardDifficulty Levels
Easy
- 30 requests per minute
- Includes
Retry-Afterheader - No authentication required
Medium
- 10 requests per minute
- No
Retry-Afterheader - No authentication required
Hard
- 5 requests per minute
- No
Retry-Afterheader - Requires
X-API-Keyheader
Response Headers
X-RateLimit-Limit— Maximum requests per windowX-RateLimit-Remaining— Requests remaining in current windowRetry-After— Seconds until window resets (Easy only)
Success Response (200)
{
"data": [...], // Array of tech facts
"remaining": 28, // Requests left
"limit": 30, // Max requests per window
"difficulty": "easy",
"timestamp": "2026-..."
}Rate Limited Response (429)
{
"error": "Rate limit exceeded",
"retryAfter": 45, // Only on Easy
"remaining": 0,
"limit": 30,
"difficulty": "easy"
}API Tester
Fire requests at the rate-limited endpoint and observe the responses.
Difficulty:
Responses (0)
No requests yet
Click "Send Request" or "Rapid Fire" to start testing the API.