thecocktaildb.com APIthecocktaildb.com ↗
Access TheCocktailDB via API: search cocktails by name, ingredient, category, or glass type. Get full recipes, ingredients, measures, and images.
curl -X GET 'https://api.parse.bot/scraper/94946c3a-8738-4b0d-b40e-96546f096c53/search_cocktails_by_name?name=Margarita' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for cocktails by name. Returns full cocktail details including instructions, ingredients, measures, and images for all matching cocktails.
| Param | Type | Description |
|---|---|---|
| namerequired | string | Cocktail name or partial name to search for (e.g. 'Margarita'). |
{
"type": "object",
"fields": {
"total": "integer — number of matching cocktails",
"results": "array of cocktail objects with full details (idDrink, strDrink, strCategory, strAlcoholic, strGlass, strInstructions, strIngredient1-15, strMeasure1-15, strDrinkThumb, etc.)"
},
"sample": {
"data": {
"total": 6,
"results": [
{
"idDrink": "11007",
"strDrink": "Margarita",
"strGlass": "Cocktail glass",
"strCategory": "Ordinary Drink",
"strMeasure1": "1 1/2 oz ",
"strAlcoholic": "Alcoholic",
"strDrinkThumb": "https://www.thecocktaildb.com/images/media/drink/5noda61589575158.jpg",
"strIngredient1": "Tequila",
"strInstructions": "Rub the rim of the glass with the lime slice..."
}
]
},
"status": "success"
}
}About the thecocktaildb.com API
This API exposes 14 endpoints covering TheCocktailDB's full cocktail and ingredient database, including search, lookup, filtering, and enumeration operations. Endpoints like search_cocktails_by_name return complete recipe objects with fields such as strInstructions, strIngredient1–strIngredient15, corresponding strMeasure fields, strGlass, strCategory, strAlcoholic, and strDrinkThumb, giving you everything needed to render or process a cocktail recipe.
Search and Lookup
search_cocktails_by_name accepts a full or partial cocktail name and returns all matching cocktails with complete details. search_cocktails_by_first_letter lists every cocktail whose name begins with a given letter — useful for building alphabetical indexes. For direct access, lookup_cocktail_by_id fetches a single cocktail by its numeric idDrink. get_random_cocktail returns one randomly selected cocktail with all fields populated, requiring no parameters.
Ingredient Endpoints
search_ingredient_by_name looks up an ingredient by name and returns fields including strIngredient, strDescription, strType, strAlcohol, and strABV. lookup_ingredient_by_id does the same by numeric ingredient ID. Note that full cocktail objects store ingredients inline as strIngredient1 through strIngredient15 with paired strMeasure1–strMeasure15 fields rather than as a nested array.
Filtering
Four filter endpoints return abbreviated cocktail lists — strDrink, strDrinkThumb, and idDrink only, not full recipe details. filter_cocktails_by_ingredient accepts an ingredient name like Gin or Tequila. filter_cocktails_by_alcoholic accepts values such as Alcoholic, Non_Alcoholic, or Optional_alcohol. filter_cocktails_by_category and filter_cocktails_by_glass accept underscore-separated names (e.g., Ordinary_Drink, Highball_glass). To retrieve full recipe details after filtering, pass the returned idDrink values to lookup_cocktail_by_id.
Enumeration
Four list endpoints — list_categories, list_glasses, list_ingredients, and list_alcoholic_filters — return the complete set of valid values for each dimension. Use these to populate dropdowns, validate filter inputs, or discover what's available before querying. list_ingredients returns strIngredient1 (the name field), which can then be passed to search_ingredient_by_name for detailed ingredient data.
- Build a cocktail recipe browser with search-by-name and alphabetical navigation using
search_cocktails_by_first_letter. - Render ingredient cards with ABV and type data from
search_ingredient_by_nameorlookup_ingredient_by_id. - Generate a 'cocktail of the day' feature using
get_random_cocktailwithout any configuration. - Filter drink menus by spirit using
filter_cocktails_by_ingredientwith values likeRumorBourbon. - Build a non-alcoholic drink finder by passing
Non_Alcoholictofilter_cocktails_by_alcoholic. - Populate validated category and glass-type dropdowns from
list_categoriesandlist_glassesbefore querying filters. - Cross-reference cocktail
idDrinkvalues from filter results with full recipe lookups for detailed display.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does TheCocktailDB have an official developer API?+
What's the difference between filter endpoints and search/lookup endpoints in terms of response data?+
filter_cocktails_by_ingredient, filter_cocktails_by_alcoholic, filter_cocktails_by_category, filter_cocktails_by_glass) return abbreviated objects containing only strDrink, strDrinkThumb, and idDrink. Full recipe fields like strInstructions, strIngredient1–strIngredient15, and strMeasure1–strMeasure15 are only available through the search and lookup endpoints.Can I retrieve multiple random cocktails in a single request?+
get_random_cocktail always returns exactly one cocktail per call. There is no batch-random endpoint currently. You can fork this API on Parse and revise it to add a multi-random endpoint that calls the single-random endpoint multiple times and aggregates results.Does the API support filtering or searching by multiple ingredients at once?+
filter_cocktails_by_ingredient accepts a single ingredient name per request. Multi-ingredient filtering is not currently supported. You can fork this API on Parse and revise it to add an endpoint that intersects results from multiple single-ingredient filter calls.Are there any fields in the cocktail response that might be empty or null?+
strIngredient1–strIngredient15, strMeasure1–strMeasure15), but most recipes use fewer. Unused slots return null or empty strings. Similarly, fields like strVideo, strTags, and alternate-language instruction fields may be null for many cocktails.