Free Cocktail API Search API

Search cocktails and ingredients.

OpenAPI Specification

free-cocktail-api-search-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Free Cocktail Filter Search API
  description: TheCocktailDB Free API provides access to a vast database of cocktail recipes, ingredients, glassware, and images. Search by name, ingredient, category, glass, or alcohol content, look up details by ID, list available filters, or fetch a random cocktail.
  version: '1.0'
  contact:
    name: TheCocktailDB
    url: https://www.thecocktaildb.com/api.php
servers:
- url: https://www.thecocktaildb.com/api/json/v1/{apiKey}
  description: TheCocktailDB JSON API. Use API key "1" for development.
  variables:
    apiKey:
      default: '1'
      description: API key. "1" is the free test key; premium keys unlock additional endpoints.
tags:
- name: Search
  description: Search cocktails and ingredients.
paths:
  /search.php:
    get:
      summary: Search cocktails or ingredients
      description: Search cocktails by name, list cocktails by first letter, or search ingredients by name.
      operationId: searchCocktails
      tags:
      - Search
      parameters:
      - name: s
        in: query
        description: Cocktail name to search for.
        schema:
          type: string
      - name: f
        in: query
        description: First letter to list cocktails by.
        schema:
          type: string
          maxLength: 1
      - name: i
        in: query
        description: Ingredient name to search for.
        schema:
          type: string
      responses:
        '200':
          description: Search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrinkList'
components:
  schemas:
    Drink:
      type: object
      properties:
        idDrink:
          type: string
        strDrink:
          type: string
        strCategory:
          type: string
        strAlcoholic:
          type: string
        strGlass:
          type: string
        strInstructions:
          type: string
        strDrinkThumb:
          type: string
          format: uri
    DrinkList:
      type: object
      properties:
        drinks:
          type: array
          items:
            $ref: '#/components/schemas/Drink'