/v1/search
Search cocktails by name
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/cocktails-api/v1/search" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cocktails-api/v1/search", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cocktails-api/v1/search");
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/search",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"count": 6,
"query": "margarita",
"cocktails": [
{
"id": "11007",
"name": "Margarita",
"tags": [
"IBA",
"ContemporaryClassic"
],
"glass": "Cocktail glass",
"video": null,
"category": "Ordinary Drink",
"alcoholic": "Alcoholic",
"thumbnail": "https://www.thecocktaildb.com/images/media/drink/5noda61589575158.jpg",
"ingredients": [
{
"measure": "1 1/2 oz",
"ingredient": "Tequila"
},
{
"measure": "1/2 oz",
"ingredient": "Triple sec"
},
{
"measure": "1 oz",
"ingredient": "Lime juice"
},
{
"measure": null,
"ingredient": "Salt"
}
],
"instructions": "Rub the rim of the glass with the lime slice to make the salt stick to it. Take care to moisten only the outer rim and sprinkle the salt on it. The salt should present to the lips of the imbiber and never mix into the cocktail. Shake the other ingredients with ice, then carefully pour into the glass."
},
{
"id": "11118",
"name": "Blue Margarita",
"tags": [],
"glass": "Cocktail glass",
"video": null,
"category": "Ordinary Drink",
"alcoholic": "Alcoholic",
"thumbnail": "https://www.thecocktaildb.com/images/media/drink/bry4qh1582751040.jpg",
"ingredients": [
{
"measure": "1 1/2 oz",
"ingredient": "Tequila"
},
{
"measure": "1 oz",
"ingredient": "Blue Curacao"
},
{
"measure": "1 oz",
"ingredient": "Lime juice"
},
{
"measure": "Coarse",
"ingredient": "Salt"
}
],
"instructions": "Rub rim of cocktail glass with lime juice. Dip rim in coarse salt. Shake tequila, blue curacao, and lime juice with ice, strain into the salt-rimmed glass, and serve."
},
{
"id": "17216",
"name": "Tommy's Margarita",
"tags": [
"IBA",
"NewEra"
],
"glass": "Old-Fashioned glass",
"video": null,
"category":
…