TheMealDB Discovery API

The Discovery API from TheMealDB — 4 operation(s) for discovery.

Operations 4

GET /{apiKey}/random.php Get one random meal #
GET /{apiKey}/randomselection.php Get a random meal selection #
GET /{apiKey}/popular.php Get popular meals #
GET /{apiKey}/latest.php Get the latest meals #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mealdb:mealdb-discovery-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mealdb-discovery-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TheMealDB Discovery API
  version: '2.0'
  description: Search and browse TheMealDB's crowd-sourced meals, recipes, cuisines, categories, and ingredient data. Access level and result limits depend on the supplied API key. Obtain access and review current terms on the official documentation page. API keys are deliberately not included in this specification.
  termsOfService: https://www.themealdb.com/terms_of_use.php
  contact:
    name: TheMealDB
    url: https://www.themealdb.com/contact.php
    email: thedatadb@gmail.com
  license:
    name: TheMealDB Terms of Use
    url: https://www.themealdb.com/terms_of_use.php
servers:
- url: https://www.themealdb.com/api/json/v2
  description: Premium V2 API
tags:
- name: Discovery
paths:
  /{apiKey}/random.php:
    get:
      tags:
      - Discovery
      summary: Get one random meal
      operationId: randomMealV2
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          $ref: '#/components/responses/Meals'
  /{apiKey}/randomselection.php:
    get:
      tags:
      - Discovery
      summary: Get a random meal selection
      description: Selection size depends on the API access level.
      operationId: randomSelectionV2
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          $ref: '#/components/responses/Meals'
  /{apiKey}/popular.php:
    get:
      tags:
      - Discovery
      summary: Get popular meals
      operationId: popularMealsV2
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          $ref: '#/components/responses/Meals'
  /{apiKey}/latest.php:
    get:
      tags:
      - Discovery
      summary: Get the latest meals
      operationId: latestMealsV2
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          $ref: '#/components/responses/Meals'
components:
  schemas:
    MealsResponse:
      type: object
      required:
      - meals
      properties:
        meals:
          oneOf:
          - type: array
            items:
              $ref: '#/components/schemas/Meal'
          - type: object
            description: Legacy access-level message.
            additionalProperties: true
          - type: string
            description: Legacy no-data or access-level message.
          - type: 'null'
    Meal:
      allOf:
      - $ref: '#/components/schemas/MealSummary'
      - type: object
        properties:
          strMealAlternate:
            type:
            - string
            - 'null'
          strTags:
            type:
            - string
            - 'null'
          strCategory:
            type:
            - string
            - 'null'
          strInstructions:
            type:
            - string
            - 'null'
          strYoutube:
            type:
            - string
            - 'null'
          strSource:
            type:
            - string
            - 'null'
          strImageSource:
            type:
            - string
            - 'null'
          strCreativeCommonsConfirmed:
            type:
            - string
            - 'null'
          dateModified:
            type:
            - string
            - 'null'
            description: Database timestamp in `YYYY-MM-DD HH:MM:SS` format.
        patternProperties:
          ^strIngredient([1-9]|1[0-9]|20)$:
            type:
            - string
            - 'null'
          ^strMeasure([1-9]|1[0-9]|20)$:
            type:
            - string
            - 'null'
    MealSummary:
      type: object
      required:
      - idMeal
      - strMeal
      properties:
        idMeal:
          oneOf:
          - type: integer
          - type: string
          description: Numeric meal identifier.
        strMeal:
          type: string
        strMealThumb:
          type:
          - string
          - 'null'
          format: uri
        strArea:
          type:
          - string
          - 'null'
        strCountry:
          type:
          - string
          - 'null'
  parameters:
    ApiKey:
      name: apiKey
      in: path
      required: true
      description: Your TheMealDB API key. No key value is stored in this specification.
      schema:
        type: string
        minLength: 1
  responses:
    Meals:
      description: Meal records
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MealsResponse'
externalDocs:
  description: Official API documentation
  url: https://www.themealdb.com/documentation
x-provenance:
  method: harvested
  publisher: TheMealDB
  source: https://www.themealdb.com/api/spec/openapi-v2.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)