Skip to content

API Endpoints

Lily Howan edited this page Oct 24, 2022 · 1 revision

Protecting API Endpoints

All API endpoints require authorization to protect data.

Without authorization, requests will return a 401 response:

{
    "message": "Unauthorized access"
}

Rate Limiting

Rate limiting has been implemented by using lru-cache provided by Vercel. All endpoints allow two requests per second for 500 unique users, excluding the search endpoint. POST /api/search allows 5 requests per second.

When there have been too many requests, the endpoint will return a 429 response:

{
    "error": "Rate limit exceeded
}
Clone this wiki locally