/v1/random
A random cocktail
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/cocktails-api/v1/random" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cocktails-api/v1/random", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cocktails-api/v1/random");
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/cocktails-api/v1/random",
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": {
"id": "178339",
"name": "The Strange Weaver",
"tags": [
"Classy"
],
"glass": "Collins glass",
"video": null,
"category": "Cocktail",
"alcoholic": "Alcoholic",
"thumbnail": "https://www.thecocktaildb.com/images/media/drink/opxjzh1604179528.jpg",
"ingredients": [
{
"measure": "1 oz",
"ingredient": "Light Rum"
},
{
"measure": "1 oz",
"ingredient": "Gin"
},
{
"measure": "0.75 oz",
"ingredient": "Sweet Vermouth"
},
{
"measure": "0.75 oz",
"ingredient": "Campari"
},
{
"measure": "Dash",
"ingredient": "Lemon Juice"
},
{
"measure": "Dash",
"ingredient": "Orgeat Syrup"
},
{
"measure": "Garnish with",
"ingredient": "Orange Peel"
}
],
"instructions": "Mix ingredients slowly in a glass with ice, garnish with orange slice"
},
"meta": {
"timestamp": "2026-05-30T02:58:49.704Z",
"request_id": "8d1f3aa9-ba3c-45f2-82c5-f61d132d589a"
},
"status": "ok",
"message": "Random cocktail retrieved successfully",
"success": true
}