Aller au contenu
GET /v1/nutrition

Nutrition facts by barcode

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/food-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/food-api/v1/nutrition" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/food-api/v1/nutrition", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/food-api/v1/nutrition");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/food-api/v1/nutrition",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "barcode": "3017620422003",
        "allergens": [
            "milk",
            "nuts",
            "soybeans"
        ],
        "nova_group": 4,
        "nutriments": {
            "fat_100g": 30.9,
            "salt_100g": 0.107,
            "fiber_100g": null,
            "sodium_100g": 0.0428,
            "sugars_100g": 56.3,
            "proteins_100g": 6.3,
            "energy_kcal_100g": 539,
            "carbohydrates_100g": 57.5,
            "saturated_fat_100g": 10.6
        },
        "product_name": "Nutella",
        "serving_size": null,
        "nutriscore_grade": "e"
    },
    "meta": {
        "timestamp": "2026-05-30T03:53:22.258Z",
        "request_id": "c88a38cd-c469-4638-911e-41c979d328bd"
    },
    "status": "ok",
    "message": "Nutrition retrieved successfully",
    "success": true
}