example-data.com
Menu
Browse docs and collections

Overview

jokes / #5

jokes #5

setup
Did you hear about the mathematician who's afraid of negative numbers?
punchline
He'll stop at nothing to avoid them.
category
pun
rating
4
createdAt

Component variants

Medium

#5

#5

Small
jokes/5

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/jokes/5" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/jokes/5"
);
const joke = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/jokes.d.ts https://example-data.com/types/jokes.d.ts
import type { Joke } from "./types/jokes";

const res = await fetch(
  "https://example-data.com/api/v1/jokes/5"
);
const joke = (await res.json()) as Joke;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/jokes/5"
)
joke = res.json()

Response

{
  "id": 5,
  "setup": "Did you hear about the mathematician who's afraid of negative numbers?",
  "punchline": "He'll stop at nothing to avoid them.",
  "category": "pun",
  "rating": 4,
  "createdAt": "2025-06-05T06:59:54.577Z"
}