TheCocktailDB API offers over 500 drink recipes in JSON format. The API is great for many projects, but some need an offline version of the data. This project fetches data from TheCocktailDB for offline use.
For most uses, here are dumps of the data returned by TheCocktailDB API on the 23rd of May, 2021:
Directory | Content |
---|---|
without-images | TypeScript typing (types.ts ) and an array of all of the drinks (drinks.ts ). |
with-images | As above, but includes images of the drinks. The thumbnailFilename property in the drink points to the matching image. |
Please support TheCocktailDB when using the data for commercial purposes.
If the above data is too old for you, run the downloader to get fresh data:
- Install Node.js and Yarn
yarn
in the root project directory to fetch all dependenciesyarn start
to start the download process
If you'd rather have the data in SQL format, perform these steps after running the downloader:
- Open drinks.ts with a text editor.
- Remove the following from the beginning of the file:
import { Drink } from "./types";
export const drinks: Drink[] =
- The file should now start with
[{
and end with}]
- Save the file.
- Feed the file to a conversion tool, e.g. Convert JSON to SQL, to create the
CREATE TABLE
andINSERT
statements to enter the data to your database.
Both are welcome, just open an issue.
If you've built a public project with this data and want the project mentioned here, make a PR.