How to hit the TheCocktailDB API

TheCocktailDB serves cocktail recipes, ingredients, and photos. The 1 in the path is the public test key.

Authentication

The test key 1 in the URL works for development. Production use needs a paid key in its place.

Full reference: https://www.thecocktaildb.com/api.php

Random cocktail

curl https://www.thecocktaildb.com/api/json/v1/1/random.php
Run in PostTaco
Example response (trimmed)
{
  "drinks": [
    {
      "idDrink": "11870",
      "strDrink": "Orange Oasis",
      "strDrinkAlternate": null,
      "strTags": null,
      "strVideo": null,
      "strCategory": "Ordinary Drink",
      "strIBA": null,
      "strAlcoholic": "Alcoholic",
      "strGlass": "Highball glass",
      "strInstructions": "Shake brandy, gin, and orange juice with ice and strain into a highball glass over ice cubes. Fill with ginger ale, stir, and serve.",
      "strInstructionsES": "Agitar el brandy, la ginebra y el zumo de naranja con hielo y colar en un vaso highball sobre cubitos de hielo. Rellenar con ginger ale, remover y servir.",
      "strInstructionsDE": "Brandy, Gin und Orangensaft mit Eis schütteln und in ein Highball-Glas über Eiswürfel abseihen. Mit Ginger Ale füllen, umrühren und servieren.",
      "strInstructionsFR": "Agiter le brandy, le gin et le jus d'orange avec de la glace et filtrer dans un verre highball sur des glaçons. Remplir de ginger ale, remuer et servir.",
      "strInstructionsIT": "Shakerare brandy, gin e succo d'arancia con ghiaccio e filtrare in un bicchiere highball con cubetti di ghiaccio. Riempi con ginger ale, mescola e servi.",
      "strInstructionsZH-HANS": "将白兰地、杜松子酒和橙汁加冰摇匀,滤入装有冰块的高球杯中。倒入姜汁汽水,搅拌,即可食用。"
    }
  ]
}

Cocktails with an ingredient

curl "https://www.thecocktaildb.com/api/json/v1/1/filter.php?i=Gin"
Run in PostTaco
Example response (trimmed)
{
  "drinks": [
    {
      "strDrink": "3-Mile Long Island Iced Tea",
      "strDrinkThumb": "https://www.thecocktaildb.com/images/media/drink/rrtssw1472668972.jpg",
      "idDrink": "15300"
    }
  ]
}