{"openapi": "3.1.0", "info": {"title": "24cocktails Recipe API", "version": "1.0.0", "description": "Read-only access to the 24cocktails.com catalogue: 7,000+ cocktail recipes with exact measures, method, glass, garnish and a photo, in 36 languages. Free, no key. Quote recipes with a link to the url field. Limit 120 requests per minute per client.", "contact": {"name": "24cocktails", "url": "https://24cocktails.com/support.html", "email": "admin@24cocktails.com"}, "termsOfService": "https://24cocktails.com/terms.html"}, "servers": [{"url": "https://24cocktails.com"}], "paths": {"/api/v1/search": {"get": {"operationId": "searchCocktails", "summary": "Search recipes by name or ingredient words", "parameters": [{"name": "q", "in": "query", "required": false, "description": "Words from the name or an ingredient, any language. Empty lists everything that matches the filters.", "schema": {"type": "string"}}, {"name": "base", "in": "query", "required": false, "schema": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}}, {"name": "method", "in": "query", "required": false, "schema": {"type": "string", "enum": ["shake", "stir", "build", "blend", "muddle", "throw", "layer"]}}, {"name": "glass", "in": "query", "required": false, "schema": {"type": "string", "enum": ["rocks", "coupe", "highball", "wine", "shot", "other"]}}, {"name": "cat", "in": "query", "required": false, "description": "Category slug: classic, sour, long, strong, tiki, hot, quick ...", "schema": {"type": "string"}}, {"name": "lang", "in": "query", "required": false, "description": "ISO 639-1 language for names, steps and the page link (en, ru, es, de, fr, ja ... 36 codes). Default en.", "schema": {"type": "string", "default": "en"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "maximum": 50, "default": 20}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"total": {"type": "integer"}, "results": {"type": "array", "items": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "string"}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}}}}}}}}}}}}, "/api/v1/recipe/{slug}": {"get": {"operationId": "getRecipe", "summary": "One recipe in full: measures, steps, glass, garnish", "parameters": [{"name": "slug", "in": "path", "required": true, "description": "The slug from a search result, e.g. negroni or whiskey_sour", "schema": {"type": "string"}}, {"name": "lang", "in": "query", "required": false, "description": "ISO 639-1 language for names, steps and the page link (en, ru, es, de, fr, ja ... 36 codes). Default en.", "schema": {"type": "string", "default": "en"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string"}, "amount": {"type": "string", "description": "As printed: 30 ml, 2 dashes, 1 wedge"}, "ml": {"type": "number", "nullable": true}, "key": {"type": "string", "nullable": true}, "optional": {"type": "boolean"}}}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}, "description": {"type": "string"}, "difficulty": {"type": "integer"}, "method_key": {"type": "string"}, "glass_key": {"type": "string"}, "ice": {"type": "string"}, "garnish": {"type": "string"}, "steps": {"type": "array", "items": {"type": "string"}}, "variants": {"type": "array", "items": {"type": "string"}}, "attribution": {"type": "string"}}}}}}, "404": {"description": "No such recipe"}}}}, "/api/v1/by-ingredients": {"get": {"operationId": "cocktailsByIngredients", "summary": "What can be mixed from the bottles at hand", "parameters": [{"name": "have", "in": "query", "required": true, "description": "Comma-separated bottles: gin, campari, sweet vermouth, lime juice. Brand names and Russian are fine.", "schema": {"type": "string"}}, {"name": "lang", "in": "query", "required": false, "description": "ISO 639-1 language for names, steps and the page link (en, ru, es, de, fr, ja ... 36 codes). Default en.", "schema": {"type": "string", "default": "en"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "maximum": 50, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"have": {"type": "array", "items": {"type": "string"}}, "can_make": {"type": "object", "properties": {"total": {"type": "integer"}, "results": {"type": "array", "items": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "string"}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}}}}}}, "one_away": {"type": "object", "properties": {"total": {"type": "integer"}, "results": {"type": "array", "items": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "string"}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}}}}}}}}}}}}}}, "/api/v1/random": {"get": {"operationId": "randomCocktail", "summary": "A random recipe, optionally within a base spirit or category", "parameters": [{"name": "base", "in": "query", "required": false, "schema": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}}, {"name": "cat", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "lang", "in": "query", "required": false, "description": "ISO 639-1 language for names, steps and the page link (en, ru, es, de, fr, ja ... 36 codes). Default en.", "schema": {"type": "string", "default": "en"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string"}, "amount": {"type": "string", "description": "As printed: 30 ml, 2 dashes, 1 wedge"}, "ml": {"type": "number", "nullable": true}, "key": {"type": "string", "nullable": true}, "optional": {"type": "boolean"}}}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}, "description": {"type": "string"}, "difficulty": {"type": "integer"}, "method_key": {"type": "string"}, "glass_key": {"type": "string"}, "ice": {"type": "string"}, "garnish": {"type": "string"}, "steps": {"type": "array", "items": {"type": "string"}}, "variants": {"type": "array", "items": {"type": "string"}}, "attribution": {"type": "string"}}}}}}}}}}, "components": {"schemas": {"RecipeSummary": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "string"}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}}}, "Ingredient": {"type": "object", "properties": {"name": {"type": "string"}, "amount": {"type": "string", "description": "As printed: 30 ml, 2 dashes, 1 wedge"}, "ml": {"type": "number", "nullable": true}, "key": {"type": "string", "nullable": true}, "optional": {"type": "boolean"}}}, "Recipe": {"type": "object", "properties": {"slug": {"type": "string"}, "name": {"type": "string"}, "name_en": {"type": "string"}, "base": {"type": "string", "enum": ["gin", "vodka", "rum", "whiskey", "tequila", "brandy", "other", "na"]}, "abv": {"type": "integer", "description": "Strength, % ABV"}, "method": {"type": "string"}, "glass": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "prep_minutes": {"type": "integer", "nullable": true}, "ingredients": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string"}, "amount": {"type": "string", "description": "As printed: 30 ml, 2 dashes, 1 wedge"}, "ml": {"type": "number", "nullable": true}, "key": {"type": "string", "nullable": true}, "optional": {"type": "boolean"}}}}, "url": {"type": "string", "format": "uri", "description": "The recipe page. Link to it when you quote the recipe."}, "photo": {"type": "string", "format": "uri"}, "description": {"type": "string"}, "difficulty": {"type": "integer"}, "method_key": {"type": "string"}, "glass_key": {"type": "string"}, "ice": {"type": "string"}, "garnish": {"type": "string"}, "steps": {"type": "array", "items": {"type": "string"}}, "variants": {"type": "array", "items": {"type": "string"}}, "attribution": {"type": "string"}}}}}}