Skip to main content
REST API v1 • OPENAPI 3.1 REST HTTP/2 JSON • OpenAPI 3.1
MCP Server v2.0 →

Clinical REST API for Health Apps & Clinical Studios

Integrate 12,000+ foods, 38 micronutrients, clinical recipes, diet templates, and exercise data directly into your software.

Base URL https://www.dietspremium.com/api/v1
Autoryzacja HTTP Authorization: Bearer <KEY>
Dostępne Zasoby 11 Endpointów REST v1
02 • Step 2 • Code Integration

cURL / HTTP Request Example

HTTP/2 JSON
terminal — REST API v1 SDK
HTTP/2 POST 200 OK
curl -X POST https://www.dietspremium.com/api/v1/food
curl -X POST "https://www.dietspremium.com/api/v1/food" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"query": "awokado", "locale": "en", "ai": true, "max_results": 5}'
01 • Step 1 • Authentication

Fast 3-Step Integration

HTTPS JSON

From generating your X-API-KEY to your first production query in under 2 minutes.

01

1. Generate API Key

Create a key in your account dashboard with read or management scopes.

02

2. Send HTTPS Request

Pass the X-API-KEY header to any k-NN vector or full-text search endpoint.

03

3. Receive Structured JSON

Consume ready-to-use macronutrient, allergen, and clinical relationship data.

Nagłówek / Parametr Wartość Przeznaczenie
Accept / Content-Type application/json Wymusza komunikację w ustrukturyzowanym formacie JSON UTF-8.
Authorization Bearer YOUR_API_KEY Token autoryzacyjny z panelu konta (lub nagłówek X-API-KEY).
locale & ai locale="en", ai=true Włącza 9-językową lokalizację oraz semantyczny wektor OpenSearch 512d k-NN.
Cykl żądania HTTP w REST API v1 REST Flow

Standardowa integracja dla aplikacji webowych, mobilnych i backendowych

1
Uwierzytelnienie nagłówkiem Bearer / X-API-KEY Header Auth

Przekaż klucz API w nagłówku Authorization: Bearer <API_KEY> lub X-API-KEY.

2
Zapytanie z parametrami query, locale oraz ai=true POST /api/v1/*

Silnik OpenSearch k-NN zwraca spaginowaną kolekcję items, total, page, perPage i hasMore.

3
Obsługa paginacji i wielojęzycznych wartości odżywczych 9 Locales

Dane zwracane są natychmiast w wybranym języku (pl, de, en, fr, nl, cz, at, ch, lu).

03 • Step 3 • Endpoints Catalog 11 Endpoints

REST API Endpoints Catalog

Browse all nutritional, workout, and clinical resources accessible over HTTPS.

POST /api/v1/allergen JSON

Allergen Search & Intolerance Detection

Access the comprehensive EU 1169/2011 allergens registry, cross-contamination warnings, and ingredient intolerance codes.

Parametry Payload (4):
query* locale page ai
200 OK • OpenSearch Specyfikacja
POST /api/v1/article JSON

Article & Clinical Nutrition Guides

Search 6,000+ peer-reviewed nutrition articles, dietetic publications, and RAG grounding chapters with AI semantic vector matching.

Parametry Payload (4):
query* locale ai page
200 OK • OpenSearch Specyfikacja
POST /api/v1/company JSON

Company & Dietetic Catering Directory

Explore 173,000+ verified dietary catering brands, clinics, fitness clubs, and health centers with geolocation metadata.

Parametry Payload (3):
query* locale city
200 OK • OpenSearch Specyfikacja
POST /api/v1/exercise JSON

Exercise & Biomechanics Database

Search 2,000+ strength and cardio exercises with anatomical target muscles, required equipment, and calorie burn equations.

Parametry Payload (3):
query* locale ai
200 OK • OpenSearch Specyfikacja
POST /api/v1/food JSON

Food & Nutrient Database

High-speed search across 1,900+ foods with complete macronutrients, calorie filters, micronutrients, and allergen exclusions.

Parametry Payload (7):
query* locale kcal_min / kcal_max proteins_min allergen_exclude +2
200 OK • OpenSearch Specyfikacja
POST /api/v1/medication JSON

Medication & Food-Drug Interactions

Database of 53,000+ pharmaceutical substances evaluating critical food-drug interactions, absorption interference, and nutrient depletion.

Parametry Payload (2):
query* locale
200 OK • OpenSearch Specyfikacja
POST /api/v1/recipe JSON

Recipe & Culinary Meal Database

Access 780+ chef-crafted culinary recipes with portion weights, preparation steps, and balanced macronutrient distribution.

Parametry Payload (3):
query* locale ai
200 OK • OpenSearch Specyfikacja
POST /api/v1/user JSON

Specialist & Certified Dietitian Directory

Search verified clinical nutritionists, dietitians, and personal trainers with client booking and certification data.

Parametry Payload (2):
query* locale
200 OK • OpenSearch Specyfikacja
POST /api/v1/supplement JSON

Supplement & Active Substance Database

Comprehensive dietary supplement catalog with ingredient dosages, vitamin forms, and safety recommendations.

Parametry Payload (2):
query* locale
200 OK • OpenSearch Specyfikacja
POST /api/v1/diet JSON

Clinical & Lifestyle Diet Templates (158 Types)

Official nutritionist-designed diet templates with multi-currency pricing, day duration (3-28 days), macro splits, and allergen avoidance.

Parametry Payload (8):
query diet_template_type days avoid_allergens kcal_min / kcal_max +3
200 OK • OpenSearch Specyfikacja
POST /api/v1/food-world JSON

Global Food Products & Barcodes (Open Food Facts + USDA)

Search 3.5M+ global branded products, EAN/UPC barcodes, brands, Nutri-Score, Eco-Score, and international ingredients.

Parametry Payload (6):
query barcode brand locale currency +1
200 OK • OpenSearch Specyfikacja

Zestawienie Tabelaryczne Endpointów REST API v1

/api/v1/*
Metoda & Ścieżka Zasób Dokumentacja
POST /api/v1/allergen Allergen Search & Intolerance Detection Specyfikacja →
POST /api/v1/article Article & Clinical Nutrition Guides Specyfikacja →
POST /api/v1/company Company & Dietetic Catering Directory Specyfikacja →
POST /api/v1/exercise Exercise & Biomechanics Database Specyfikacja →
POST /api/v1/food Food & Nutrient Database Specyfikacja →
POST /api/v1/medication Medication & Food-Drug Interactions Specyfikacja →
POST /api/v1/recipe Recipe & Culinary Meal Database Specyfikacja →
POST /api/v1/user Specialist & Certified Dietitian Directory Specyfikacja →
POST /api/v1/supplement Supplement & Active Substance Database Specyfikacja →
POST /api/v1/diet Clinical & Lifestyle Diet Templates (158 Types) Specyfikacja →
POST /api/v1/food-world Global Food Products & Barcodes (Open Food Facts + USDA) Specyfikacja →
response — POST /api/v1/food (JSON)
HTTP/2 200 OK 200 OK
curl -s -X POST https://www.dietspremium.com/api/v1/food -H "Content-Type: application/json"
{
  "items": [
    {
      "id": 14,
      "name": "Pierś z kurczaka bez skóry",
      "kcal": 120,
      "proteins": 21.5,
      "fats": 1.3,
      "carbs": 0.0
    }
  ],
  "total": 1,
  "page": 1,
  "locale": "en"
}
04 • Specification

REST API Technical Specification

Authentication standards, cursor pagination, and error handling.

X-API-KEY Header Authentication

Every request requires an active key passed in the X-API-KEY header or Bearer token.

Pagination & Multi-Locale Filtering

Use page, limit (up to 100), and locale (pl, de, en, fr, nl, cz, at, ch, lu) parameters.

Response Codes & Rate Limits

The API returns deterministic JSON structures following RFC 7807 Problem Details.

RestApiDataSyncAgent 200 OK

Klient synchronizacji REST API v1 i OpenSearch k-NN

HTTP/2 JSON Client
Prompt Wejściowy Agenta AI

“Pobierz niskoindeksowe przepisy kulinarne dla pacjenta i zsynchronizuj składniki z aplikacją mobilną.”

Wykorzystywane Narzędzia MCP / Endpointy
POST /api/v1/recipe POST /api/v1/food POST /api/v1/allergen POST /api/v1/diet
Ślad Wywołania (Execution Trace)
POST https://www.dietspremium.com/api/v1/recipe (locale=en, ai=true) → 200 OK (total: 42)

Share