Thecocktaildb Scraper
Pricing
from $2.99 / 1,000 results
Thecocktaildb Scraper
TheCocktailDB Scraper is a Python tool designed to extract cocktail recipes, ingredient quantities, preparation instructions, glassware requirements, and category metadata from TheCocktailDB API. It exports structured beverage datasets into clean CSV or JSON formats for mixology menu analysis.
Pricing
from $2.99 / 1,000 results
Rating
0.0
(0)
Developer
ZeroBreak
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 hours ago
Last modified
Categories
Share
TheCocktailDB Scraper — Collect Cocktail Recipes and Ingredients
Overview
TheCocktailDB Scraper collects publicly available cocktail recipe information and saves each drink as a structured dataset row. Search drinks by name, find cocktails by first letter, filter by ingredient, or retrieve a specific drink using its ID.
Collected information can include drink names, categories, glass types, preparation instructions, ingredients, measurements, thumbnails, and available recipe metadata. Export the dataset in JSON, CSV, or Excel format.
Features
- Cocktail name search: Find drinks by name, such as Margarita.
- First-letter search: Collect drinks whose names begin with specified letters.
- Ingredient filtering: Find cocktails containing ingredients such as gin.
- Individual drink lookup: Retrieve a specific cocktail using its drink ID.
- Full recipe details: Retrieve instructions, ingredients, and measurements when available.
- Multiple language fields: Preserve recipe instructions in the languages provided by the source.
- Duplicate removal: Keep each drink ID only once.
- Configurable result limits: Collect up to 1,000 unique drink records per run.
- Multiple export formats: Download results as JSON, CSV, or Excel.
Use Cases
- Recipe collections: Build searchable catalogs of cocktails and their ingredients.
- Menu planning: Organize drinks by ingredients, glass type, or category.
- Ingredient research: Discover cocktails associated with specific ingredients.
- Alphabetical catalogs: Collect drink names by their starting letters.
- Recipe lookup: Refresh records for known drink IDs.
- Cocktail data analysis: Compare ingredients, measurements, categories, and preparation methods.
- Scheduled collection: Refresh cocktail datasets periodically.
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
searchQueries | Array of strings | ["margarita"] | Drink names to search for. |
letters | Array of strings | [] | First letters used to find drinks. Only the first character of each value is used. |
ingredients | Array of strings | [] | Ingredients used to filter drinks. |
drinkIds | Array of strings | [] | Specific drink IDs to retrieve. |
fullDetails | Boolean | true | Retrieves complete recipe details for ingredient-filter results when available. |
maxItems | Integer | 100 | Maximum number of unique cocktail records to save. Maximum: 1,000. |
requestDelaySecs | Number | 0.3 | Delay between requests in seconds. Minimum: 0.3 seconds. |
timeoutSecs | Integer | 300 | Overall run time limit in seconds. |
requestTimeoutSecs | Integer | 30 | Maximum wait for an individual request, in seconds. |
Example Input
{"searchQueries": ["margarita"],"letters": [],"ingredients": [],"drinkIds": [],"fullDetails": true,"maxItems": 100,"requestDelaySecs": 0.3,"timeoutSecs": 300,"requestTimeoutSecs": 30}
This example searches for Margarita recipes and collects up to 100 unique drink records.
What Data Does This Actor Extract?
Each drink becomes one dataset row. Search results can include complete recipe details, while ingredient-filter results may initially contain only a drink ID, name, and thumbnail. When fullDetails is enabled, the actor retrieves additional information for matching drinks when available.
Extracted Data Fields
| Field | Description |
|---|---|
idDrink | Unique drink identifier. |
strDrink | Cocktail or drink name. |
strDrinkAlternate | Alternate drink name, when available. |
strTags | Tags associated with the drink. |
strVideo | Related video information, when available. |
strCategory | Drink category, such as Ordinary Drink. |
strIBA | International Bartenders Association classification, when available. |
strAlcoholic | Alcohol classification supplied by the source. |
strGlass | Recommended glass type. |
strInstructions | Preparation instructions in English. |
strInstructionsES and other language fields | Instructions in other available languages. |
strDrinkThumb | Thumbnail image location. |
strIngredient1–strIngredient15 | Ingredient names. |
strMeasure1–strMeasure15 | Measurements corresponding to the ingredient fields. |
strImageSource | Image source metadata, when available. |
strImageAttribution | Image attribution information, when available. |
strCreativeCommonsConfirmed | Creative Commons confirmation information, when available. |
dateModified | Last-modified information supplied by the source, when available. |
mode | Collection method: search, letter, ingredient, or lookup. |
scraped_at | UTC timestamp indicating when the record was saved. |
Some fields may be null or absent depending on the information available for each drink.
Example Output
{"idDrink": "11007","strDrink": "Margarita","strDrinkAlternate": null,"strTags": "IBA,ContemporaryClassic","strVideo": null,"strCategory": "Ordinary Drink","strIBA": "Contemporary Classics","strAlcoholic": "Alcoholic","strGlass": "Cocktail glass","strInstructions": "Rub the rim of the glass with the lime slice to make the salt stick to it.","strInstructionsES": "Frota el borde del vaso con la rodaja de lima para que la sal se adhiera a él.","strDrinkThumb": "COCKTAIL_THUMBNAIL_URL","strIngredient1": "Tequila","strIngredient2": "Triple sec","strIngredient3": "Lime juice","strIngredient4": "Salt","strMeasure1": "1 1/2 oz","strMeasure2": "1/2 oz","strMeasure3": "1 oz","mode": "search","scraped_at": "2026-10-12T00:00:00+00:00"}
The example illustrates the dataset structure. Actual values depend on the drink and the details available in the source.
Working with Your Dataset
After collection, you can:
- Export cocktail records to JSON, CSV, or Excel.
- Organize drinks by name, category, or glass type.
- Search ingredient fields to find drinks with particular ingredients.
- Review measurements and preparation instructions.
- Build recipe catalogs or cocktail menu spreadsheets.
- Compare recipes and ingredient combinations.
- Use drink IDs to organize records and avoid duplicate entries.
Important Notes
- The scraper supports name searches, first-letter searches, ingredient filtering, and individual drink lookups.
- Category-based filtering is not supported by the current collection workflow.
fullDetailsenables additional recipe lookups for ingredient-filter results.- Duplicate drink IDs are retained only once.
- The maximum number of saved unique drinks is 1,000 per run.
- Requests are processed sequentially with a configurable delay.
- Temporary request failures may be retried.
- Some drinks may have incomplete instructions, missing ingredients, or unavailable metadata.
- Recipe information and image availability can change over time.
FAQ
Can I search for cocktails by ingredient?
Yes. Add ingredient names to the ingredients list to collect matching drinks.
Can I search by the first letter of a drink?
Yes. Add letters to letters. Only the first character of each supplied value is used.
Can I retrieve a particular cocktail?
Yes. Add its drink ID to drinkIds.
Why are some ingredient-filter results missing instructions?
Ingredient filters may return basic drink information only. Enable fullDetails to retrieve additional recipe information when available.
How many cocktails can one run collect?
The default limit is 100 unique drinks. You can increase maxItems to a maximum of 1,000.
Are duplicate drinks saved more than once?
No. The scraper keeps each drink ID only once.
Can I export the results to Excel?
Yes. The dataset supports JSON, CSV, and Excel exports.
How current is the collected information?
The scraper collects information during each run. The scraped_at field records when a row was saved, rather than when the recipe was originally created.
Disclaimer
This is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with TheCocktailDB or its owners. Users are responsible for ensuring that their collection, storage, redistribution, and use of recipe information comply with applicable laws and the source's terms.
Is Web Scraping Legal?
Collecting information that is already public is generally legal. Scraping is not the same thing as hacking, and there is no single law that bans it. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.
This actor collects information from public pages. It does not log in and it does not bypass access controls.
For a longer explanation, see Apify's article Is web scraping legal?.