JokeAPI · Schema

JokeBatch

Envelope returned when `?amount` is greater than 1.

JokesHumorEntertainmentOpen-SourceREST APIGames And ComicsPublic APIs

Properties

Name Type Description
error boolean
amount integer Number of jokes in this batch.
jokes array Heterogeneous list of single and twopart jokes.
View JSON Schema on GitHub

JSON Schema

jokeapi-joke-batch-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/jokeapi/refs/heads/main/json-schema/jokeapi-joke-batch-schema.json",
  "title": "JokeBatch",
  "description": "Envelope returned when `?amount` is greater than 1.",
  "type": "object",
  "properties": {
    "error": {
      "type": "boolean",
      "example": false
    },
    "amount": {
      "type": "integer",
      "description": "Number of jokes in this batch.",
      "example": 3
    },
    "jokes": {
      "type": "array",
      "description": "Heterogeneous list of single and twopart jokes.",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "description": "A joke delivered as one line of text.",
            "properties": {
              "error": {
                "type": "boolean",
                "description": "Always false on a successful joke response.",
                "example": false
              },
              "category": {
                "type": "string",
                "description": "Category the joke belongs to.",
                "enum": [
                  "Misc",
                  "Programming",
                  "Dark",
                  "Pun",
                  "Spooky",
                  "Christmas"
                ],
                "example": "Programming"
              },
              "type": {
                "type": "string",
                "description": "Joke shape \u2014 always `single` for this schema.",
                "enum": [
                  "single"
                ],
                "example": "single"
              },
              "joke": {
                "type": "string",
                "description": "The joke text.",
                "example": "Why do programmers prefer dark mode? Because light attracts bugs."
              },
              "flags": {
                "type": "object",
                "description": "Content classification flags carried on every joke.",
                "properties": {
                  "nsfw": {
                    "type": "boolean",
                    "description": "Joke contains adult or explicit sexual content.",
                    "example": false
                  },
                  "religious": {
                    "type": "boolean",
                    "description": "Joke references or mocks religion.",
                    "example": false
                  },
                  "political": {
                    "type": "boolean",
                    "description": "Joke references politics or political figures.",
                    "example": false
                  },
                  "racist": {
                    "type": "boolean",
                    "description": "Joke contains racist content.",
                    "example": false
                  },
                  "sexist": {
                    "type": "boolean",
                    "description": "Joke contains sexist content.",
                    "example": false
                  },
                  "explicit": {
                    "type": "boolean",
                    "description": "Joke contains explicit language unrelated to NSFW.",
                    "example": false
                  }
                },
                "required": [
                  "nsfw",
                  "religious",
                  "political",
                  "racist",
                  "sexist",
                  "explicit"
                ]
              },
              "id": {
                "type": "integer",
                "description": "Joke identifier within its language scope.",
                "example": 42
              },
              "safe": {
                "type": "boolean",
                "description": "True when the joke has no flags and is not Dark.",
                "example": true
              },
              "lang": {
                "type": "string",
                "description": "ISO 639-1 language code of the joke.",
                "example": "en"
              }
            },
            "required": [
              "error",
              "category",
              "type",
              "joke",
              "flags",
              "id",
              "safe",
              "lang"
            ]
          },
          {
            "type": "object",
            "description": "A joke delivered as a setup/delivery pair.",
            "properties": {
              "error": {
                "type": "boolean",
                "description": "Always false on a successful joke response.",
                "example": false
              },
              "category": {
                "type": "string",
                "description": "Category the joke belongs to.",
                "enum": [
                  "Misc",
                  "Programming",
                  "Dark",
                  "Pun",
                  "Spooky",
                  "Christmas"
                ],
                "example": "Programming"
              },
              "type": {
                "type": "string",
                "description": "Joke shape \u2014 always `twopart` for this schema.",
                "enum": [
                  "twopart"
                ],
                "example": "twopart"
              },
              "setup": {
                "type": "string",
                "description": "Setup line of the joke.",
                "example": "Why don't programmers like nature?"
              },
              "delivery": {
                "type": "string",
                "description": "Punchline of the joke.",
                "example": "It has too many bugs."
              },
              "flags": {
                "type": "object",
                "description": "Content classification flags carried on every joke.",
                "properties": {
                  "nsfw": {
                    "type": "boolean",
                    "description": "Joke contains adult or explicit sexual content.",
                    "example": false
                  },
                  "religious": {
                    "type": "boolean",
                    "description": "Joke references or mocks religion.",
                    "example": false
                  },
                  "political": {
                    "type": "boolean",
                    "description": "Joke references politics or political figures.",
                    "example": false
                  },
                  "racist": {
                    "type": "boolean",
                    "description": "Joke contains racist content.",
                    "example": false
                  },
                  "sexist": {
                    "type": "boolean",
                    "description": "Joke contains sexist content.",
                    "example": false
                  },
                  "explicit": {
                    "type": "boolean",
                    "description": "Joke contains explicit language unrelated to NSFW.",
                    "example": false
                  }
                },
                "required": [
                  "nsfw",
                  "religious",
                  "political",
                  "racist",
                  "sexist",
                  "explicit"
                ]
              },
              "id": {
                "type": "integer",
                "description": "Joke identifier within its language scope.",
                "example": 127
              },
              "safe": {
                "type": "boolean",
                "description": "True when the joke has no flags and is not Dark.",
                "example": true
              },
              "lang": {
                "type": "string",
                "description": "ISO 639-1 language code of the joke.",
                "example": "en"
              }
            },
            "required": [
              "error",
              "category",
              "type",
              "setup",
              "delivery",
              "flags",
              "id",
              "safe",
              "lang"
            ]
          }
        ]
      }
    }
  },
  "required": [
    "error",
    "amount",
    "jokes"
  ]
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/jokeapi-joke-batch"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.