Skip to main content

Recipe & Culinary Meal Database

Curated collection of clinical and gourmet recipes with step-by-step culinary instructions, exact ingredient portion gram weights, preparation times, difficulty levels, and full macro breakdowns.

Pełny adres URL https://www.dietspremium.com/api/v1/recipe
Format odpowiedzi application/json; charset=utf-8
Autoryzacja Authorization: Bearer <API_KEY>
Specyfikacja Parametrów HTTP

Request Parameters

3 Parameter
Parameter Data Type Requirement Description Example
query string Required Recipe phrase (e.g. "quick keto avocado salmon salad") —
locale string Optional Target locale en
ai boolean Optional AI semantic search true
Diagnostyka i Odporność

HTTP Status Codes

Kod HTTP Status Znaczenie i Obsługa
200 OK Sukces Request processed successfully
400 Bad Request Błąd walidacji Invalid request parameters
401 Unauthorized Brak autoryzacji Missing or invalid X-API-KEY
429 Too Many Requests Rate Limit Rate limit or quota exceeded
500 Server Error Błąd serwera Internal server error

Example HTTP Request

POST /api/v1/recipe
terminal — POST /api/v1/recipe
REST HTTP/2 REQUEST
curl -X POST 'https://www.dietspremium.com/api/v1/recipe'
curl -X POST "https://www.dietspremium.com/api/v1/recipe" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "query": "keto salmon salad",
  "locale": "en",
  "ai": true
}'

Example JSON Response (200 OK)

HTTP/2 200 OK • application/json
response — /api/v1/recipe (200 OK)
JSON Payload 200 OK
{
  "items": [
    {"id": 55, "title": "Avocado Salmon Keto Bowl", "kcal": 480, "proteins": 38.0, "fats": 32.0, "carbs": 8.0}
  ],
  "total": 1
}
Obsługa paginacji i filtrów dla /api/v1/recipe Best Practice

Zalecenia produkcyjne dla deweloperów

1
Kontrola strony i rozmiaru kolekcji page / max_results

Sprawdzaj flagę "hasMore" oraz "total" w odpowiedzi JSON przed pobraniem kolejnej strony.

2
Wyszukiwanie semantyczne vs dokładne ai=true

Ustaw ai=true dla zapytań w języku naturalnym lub ai=false dla ścisłego dopasowania słów kluczowych.

ApiClient_recipe 200 OK

Klient HTTP dla zasobu Recipe & Culinary Meal Database

REST API v1 + OpenSearch
Prompt Wejściowy Agenta AI

“Pobierz dane z /api/v1/recipe dla języka EN z użyciem wektora k-NN.”

Wykorzystywane Narzędzia MCP / Endpointy
POST /api/v1/recipe
Ślad Wywołania (Execution Trace)
→ POST /api/v1/recipe (locale=en, ai=true)
← 200 OK (application/json)

Other REST API Endpoints

Pełny katalog REST API →

Share