娯
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/joke | A random safe joke, optionally from one category or containing a text. |
| GET | /jokeapi/byId | One safe joke by its JokeAPI id. |
| GET | /jokeapi/jokes | Up to ten random safe jokes in one answer, optionally by category, type and language. |
| GET | /jokeapi/categories | The joke categories JokeAPI knows. |
| GET | /jokeapi/info | How many jokes JokeAPI holds, with its categories, content flags and version. |
joke
GET
/v1/jokeapi/jokeA random safe joke, optionally from one category or containing a text.
scope social:read1 unit
Parameters
categorystring | Joke category.AnyProgrammingMiscDarkPunSpookyChristmasdefault Any |
containsstring | Text the joke must contain, such as cat. |
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
category | string |
delivery | string |
id | string |
language | string |
setup | string |
text | string |
type | string |
curl "https://api.hoshime.com/v1/jokeapi/joke" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/jokeapi/joke", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/jokeapi/joke", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/byIdOne safe joke by its JokeAPI id.
scope social:read1 unitcached 24 h
Parameters
idinteger required | Joke id, such as 10. e.g. 10 |
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
category | string |
delivery | string |
id | string |
language | string |
setup | string |
text | string |
type | string |
curl "https://api.hoshime.com/v1/jokeapi/byId?id=10" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/jokeapi/byId?id=10", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/jokeapi/byId?id=10", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/jokesUp to ten random safe jokes in one answer, optionally by category, type and language.
scope social:read1 unitpaginated
Parameters
amountinteger | Number of jokes, from 1 to 10. default 5e.g. 2 |
categorystring | Joke category.AnyMiscProgrammingDarkPunSpookyChristmasdefault Any |
typestring | A one-liner or a setup with its delivery.singletwopart |
langstring | Language of the jokes: cs, de, en, es, fr or pt.csdeenesfrpt |
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
category | string |
delivery | string |
id | string |
language | string |
setup | string |
text | string |
type | string |
curl "https://api.hoshime.com/v1/jokeapi/jokes?amount=2" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/jokeapi/jokes?amount=2", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/jokeapi/jokes?amount=2", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/categoriesThe joke categories JokeAPI knows.
scope social:read1 unitcached 24 hpaginated
Parameters
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
name | string |
curl "https://api.hoshime.com/v1/jokeapi/categories" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/jokeapi/categories", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/jokeapi/categories", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/infoHow many jokes JokeAPI holds, with its categories, content flags and version.
scope social:read1 unitcached 24 h
Parameters
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
categories | Category[] |
name | string |
flags | Flag[] |
name | string |
totalCount | integer (int64) |
version | string |
curl "https://api.hoshime.com/v1/jokeapi/info" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/jokeapi/info", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/jokeapi/info", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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 } }