/v1/drink
Standard drink calculator
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/bac-api/v1/drink" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bac-api/v1/drink", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bac-api/v1/drink");
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/bac-api/v1/drink",
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": {
"input": {
"abv": 5,
"count": 1,
"volume_ml": 355
},
"uk_units": 1.78,
"disclaimer": "Rough estimate for education only — never use to decide whether it is safe or legal to drive. When in doubt, do not drive.",
"alcohol_grams": 14,
"pure_alcohol_ml": 17.75,
"eu_standard_drinks": 1.4,
"us_standard_drinks": 1
},
"meta": {
"timestamp": "2026-06-03T17:42:00.219Z",
"request_id": "711f2ae4-fded-48ce-8d98-08c2927ae64f"
},
"status": "ok",
"message": "Standard drink calculator",
"success": true
}