Authentication
All endpoints use Bearer token authentication. No OAuth, no Reddit credentials — just one API key.
API Keys
Generate API keys from your dashboard. Each key is a sk- prefixed secret token. You can create multiple keys and revoke them independently.
Sending requests
Include your API key in the Authorization header as a Bearer token.
bash
curl -X POST https://api.fetchlayer.dev/reddit/search \
-H 'Authorization: Bearer sk-your-key' \
-H 'Content-Type: application/json' \
-d '{"query": "developer tools", "limit": 5}' Error responses
Invalid or missing API keys return a 401 Unauthorized response.
json
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key. Provide a valid Bearer token in the Authorization header."
}
} Rate limits
Rate limits are based on your plan. Exceeding the limit returns a 429 Too Many Requests response. Rate limit headers are included in every response:
X-RateLimit-Limit— requests per minute allowedX-RateLimit-Remaining— requests remaining in the current windowX-RateLimit-Reset— Unix timestamp when the window resets