The DrinkDB API provides access to a comprehensive database of drink recipes. This documentation explains how to use the search endpoint to find drinks by name or ingredients.
Retrieve drinks by searching titles or content.
GET https://drinkdb.site/drinks/api.php
query (optional): Search term to filter drinks by title or content. If omitted, returns all drinks.The API returns a JSON array of drink objects. Each object contains:
id: The unique identifier of the drink (integer)title: The name of the drink (string, special characters removed)content: The description and ingredients of the drink (string, special characters removed)GET https://drinkdb.site/drinks/api.php?query=Mojito
[
{
"id": 1234,
"title": "Mojito",
"content": "A delicious recipe for Mojito with white rum lime juice sugar mint leaves soda water and ice"
},
{
"id": 1235,
"title": "Strawberry Mojito",
"content": "A delicious recipe for Strawberry Mojito with rum strawberries lime mint sugar and soda water"
}
]
GET https://drinkdb.site/drinks/api.php?query=whiskey
[
{
"id": 5678,
"title": "Whiskey Sour",
"content": "A delicious recipe for Whiskey Sour with whiskey lemon juice sugar and optional egg white"
},
{
"id": 5679,
"title": "Old Fashioned",
"content": "A delicious recipe for Old Fashioned with whiskey sugar bitters and orange peel"
},
{
"id": 5680,
"title": "Irish Coffee",
"content": "A delicious recipe for Irish Coffee with Irish whiskey coffee sugar and cream"
}
]
GET https://drinkdb.site/drinks/api.php
[
{
"id": 1,
"title": "First Drink",
"content": "Description of the first drink"
},
{
"id": 2,
"title": "Second Drink",
"content": "Description of the second drink"
},
// ... continues with all drinks in the database
]
In case of errors, the API returns a JSON object with an error message:
{
"error": "Connection failed: Could not connect to database"
}
Or:
{
"error": "SQL query failed - You have an error in your SQL syntax"
}
The DrinkDB API:
Share the link to this API: