Skip to content

JokeAPI API

5 endpointsEntertainment & BooksGlobalsocial:read5 real examples

Returns safe jokes by category, type, language or id, plus joke categories and database statistics.

View as Markdown
GET/jokeapi/jokeA random safe joke, optionally from one category or containing a text.
GET/jokeapi/byIdOne safe joke by its JokeAPI id.
GET/jokeapi/jokesUp to ten random safe jokes in one answer, optionally by category, type and language.
GET/jokeapi/categoriesThe joke categories JokeAPI knows.
GET/jokeapi/infoHow many jokes JokeAPI holds, with its categories, content flags and version.

joke

GET/v1/jokeapi/joke

A random safe joke, optionally from one category or containing a text.

scope social:read1 unit

Parameters

category
string
Joke category.
AnyProgrammingMiscDarkPunSpookyChristmas
default Any
contains
string
Text the joke must contain, such as cat.
tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

7 fields
categorystring
deliverystring
idstring
languagestring
setupstring
textstring
typestring
curl "https://api.hoshime.com/v1/jokeapi/joke" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "category": "Misc",
    "delivery": "I was already on the highway when I noticed I forgot my car at home.",
    "id": "145",
    "language": "en",
    "setup": "This morning I accidentally made my coffee with Red Bull instead of water.",
    "text": "This morning I accidentally made my coffee with Red Bull instead of water.\nI was already on the highway when I noticed I forgot my car at ho…",
    "type": "twopart"
  },
  "meta": {
    "cached": false,
    "endpoint": "joke",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "jokeapi",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

byId

GET/v1/jokeapi/byId

One safe joke by its JokeAPI id.

scope social:read1 unitcached 24 h

Parameters

id
integer
required
Joke id, such as 10.
e.g. 10
tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

7 fields
categorystring
deliverystring
idstring
languagestring
setupstring
textstring
typestring
curl "https://api.hoshime.com/v1/jokeapi/byId?id=10" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "category": "Programming",
    "delivery": "Parsing HTML with regex.",
    "id": "10",
    "language": "en",
    "setup": "Hey, wanna hear a joke?",
    "text": "Hey, wanna hear a joke?\nParsing HTML with regex.",
    "type": "twopart"
  },
  "meta": {
    "cached": false,
    "endpoint": "byId",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "jokeapi",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

jokes

GET/v1/jokeapi/jokes

Up to ten random safe jokes in one answer, optionally by category, type and language.

scope social:read1 unitpaginated

Parameters

amount
integer
Number of jokes, from 1 to 10.
default 5e.g. 2
category
string
Joke category.
AnyMiscProgrammingDarkPunSpookyChristmas
default Any
type
string
A one-liner or a setup with its delivery.
singletwopart
lang
string
Language of the jokes: cs, de, en, es, fr or pt.
csdeenesfrpt
tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

7 fields
categorystring
deliverystring
idstring
languagestring
setupstring
textstring
typestring
curl "https://api.hoshime.com/v1/jokeapi/jokes?amount=2" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": [
    {
      "category": "Misc",
      "delivery": "One's a heated yam, the other's a yeeted ham.",
      "id": "140",
      "language": "en",
      "setup": "What's the difference between a hot potato and a flying pig?",
      "text": "What's the difference between a hot potato and a flying pig?\nOne's a heated yam, the other's a yeeted ham.",
      "type": "twopart"
    },
    {
      "category": "Misc",
      "delivery": "They raise the roof.",
      "id": "216",
      "language": "en",
      "setup": "How do construction workers party?",
      "text": "How do construction workers party?\nThey raise the roof.",
      "type": "twopart"
    }
  ],
  "meta": {
    "cached": false,
    "endpoint": "jokes",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "pagination": {
      "nextCursor": "EpcDEgV…",
      "hasMore": true,
      "total": null
    },
    "platform": "jokeapi",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

categories

GET/v1/jokeapi/categories

The joke categories JokeAPI knows.

scope social:read1 unitcached 24 hpaginated

Parameters

tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

1 fields
namestring
curl "https://api.hoshime.com/v1/jokeapi/categories" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": [
    {
      "name": "Any"
    },
    {
      "name": "Misc"
    }
  ],
  "meta": {
    "cached": false,
    "endpoint": "categories",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "pagination": {
      "nextCursor": "EpcDEgV…",
      "hasMore": true,
      "total": null
    },
    "platform": "jokeapi",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

info

GET/v1/jokeapi/info

How many jokes JokeAPI holds, with its categories, content flags and version.

scope social:read1 unitcached 24 h

Parameters

tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

6 fields
categoriesCategory[]
namestring
flagsFlag[]
namestring
totalCountinteger (int64)
versionstring
curl "https://api.hoshime.com/v1/jokeapi/info" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "categories": [
      {
        "name": "Any"
      },
      {
        "name": "Misc"
      }
    ],
    "flags": [
      {
        "name": "nsfw"
      },
      {
        "name": "religious"
      }
    ],
    "totalCount": 1368,
    "version": "2.3.3"
  },
  "meta": {
    "cached": false,
    "endpoint": "info",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "jokeapi",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}
esc
↑↓ move↵ open