Rate Limits
PhantomJSON enforces rate limiting to ensure fair usage and API stability.
Default Limits
Section titled “Default Limits”| Tier | Requests | Time Window |
|---|---|---|
| Anonymous | 100 | 1 minute |
Rate Limit Headers
Section titled “Rate Limit Headers”Every response includes rate limit information in the headers:
X-RateLimit-Limit: 100X-RateLimit-Remaining: 95X-RateLimit-Reset: 60| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum requests allowed per window |
X-RateLimit-Remaining |
Requests remaining in current window |
X-RateLimit-Reset |
Seconds until the rate limit resets |
When Rate Limited
Section titled “When Rate Limited”When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:
{ "statusCode": 429, "error": "Too Many Requests", "message": "Rate limit exceeded", "path": "/v1/users", "timestamp": "2026-01-15T10:30:00.000Z"}Best Practices
Section titled “Best Practices”- Cache responses — Cache API responses to reduce unnecessary requests
- Use pagination — Fetch only the data you need with appropriate
limitvalues - Combine queries — Use filtering, sorting, and search to get exactly what you need in one request
- Monitor headers — Check
X-RateLimit-Remainingto avoid hitting limits
Example: Checking Rate Limits
Section titled “Example: Checking Rate Limits”curl -I https://api.phantomjson.app/v1/usersResponse headers:
HTTP/1.1 200 OKX-RateLimit-Limit: 100X-RateLimit-Remaining: 99X-RateLimit-Reset: 59Content-Type: application/json