Skip to content

Recipes API

Endpoints for managing and retrieving recipes.

https://api.os.eura.dev/api/v1

Retrieve a paginated list of approved recipes.

GET /recipes
Parameter Type Required Default Description
page number No 1 Page number (1-indexed)
limit number No 20 Results per page (max: 100)
q string No - Search query (title and description)
tag string No - Filter by tag
const params = new URLSearchParams({
page: '1',
limit: '10',
q: 'pasta',
tag: 'Italian'
});
const response = await fetch(`https://api.os.eura.dev/api/v1/recipes?${params}`);
const data = await response.json();
{
"recipes": [
{
"id": "rec_abc123",
"slug": "spaghetti-carbonara",
"title": "Spaghetti Carbonara",
"description": "Classic Italian pasta dish with eggs, cheese, pancetta, and pepper.",
"forkedFrom": null,
"version": "1.0.0",
"difficulty": "medium",
"author": {
"id": "usr_xyz",
"username": "chef-marco",
"avatarUrl": "https://github.com/chef-marco.png",
"verified": true
},
"yield": {
"amount": 4,
"unit": "servings"
},
"times": {
"prepMinutes": 15,
"cookMinutes": 15,
"totalMinutes": 30
},
"tags": ["Italian", "Pasta", "Classic"],
"ingredients": [
{
"id": "ing_spaghetti",
"name": "Spaghetti",
"amount": 400,
"unit": "g",
"notes": null
}
],
"instructions": [
{
"step": 1,
"text": "Cook spaghetti according to package instructions."
}
],
"media": [],
"nutrition": null,
"metadata": {
"status": "approved",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"stars": 0
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1247,
"hasMore": true
}
}

Retrieve a specific approved recipe.

GET /recipes/:idOrSlug
Parameter Type Required Description
idOrSlug string Yes Recipe ID (starts with rec_) or slug
// By ID
const response = await fetch('https://api.os.eura.dev/api/v1/recipes/rec_abc123');
// By slug
const response = await fetch('https://api.os.eura.dev/api/v1/recipes/spaghetti-carbonara');

Returns a single recipe object (same schema as in the list response).