Recipe API Documentation
Complete reference guide to integrate with our Recipe API. Access thousands of recipes with simple REST endpoints.
Introduction
The Recipe API provides programmatic access to a database of delicious recipes from around the world. With this API, you can retrieve recipes with detailed ingredients and cooking instructions, search for recipes by cuisine or keyword, and more.
Base URL
https://brecipes-fastify.onrender.com/api/recipesResponse Format
All API responses are returned in JSON format. Successful responses typically include the requested data, while error responses include an error message.
Rate Limiting
The API implements rate limiting to ensure fair usage and service stability:
- 100 requests per minute per IP address
- Applies to all recipe endpoints
- When exceeded, the API returns a
429 Too Many Requestsresponse
Authentication
The Recipe API supports two authentication methods: API Keys and JWT tokens. Most endpoints require authentication using either method.
API Key authentication is the simplest method for accessing the API. Include your API key in each request's header:
X-API-Key: your-api-key-hereYou can obtain your API key by registering for an account.
Example Request with API Key
curl -X GET 'https://brecipes-fastify.onrender.com/api/recipes' \
-H 'X-API-Key: your-api-key-here' \
-H 'Content-Type: application/json'User Endpoints
API Key Endpoints
Recipe Endpoints
All recipe endpoints require authentication using either an API key or a JWT token.
- API Key: Include the
X-API-Keyheader with your API key. - JWT Token: Include the
Authorizationheader with your JWT token.
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request.
Status Codes
200 OK- The request was successful201 Created- A new resource was created successfully204 No Content- The request was successful but no content was returned400 Bad Request- The request was invalid or malformed401 Unauthorized- Authentication failed or was not provided403 Forbidden- The authenticated user does not have permission to access the resource404 Not Found- The requested resource was not found429 Too Many Requests- Rate limit exceeded500 Internal Server Error- An unexpected error occurred on the server
Error Response Format
Error responses have a consistent format:
{
"error": "Error message describing the problem"
}Example Error Responses
401 Unauthorized
{
"error": "Authentication required"
}403 Forbidden
{
"error": "Access denied"
}404 Not Found
{
"error": "Recipe not found"
}429 Too Many Requests
{
"error": "Rate limit exceeded. Try again in X seconds"
}Ready to start building?
Get your API key now and start integrating delicious recipes into your application.