Skip to content

Jokes One API

by jokes.one

API keyHTTPSCORSGames & Comics
Open documentation ↗

Overview

Joke of the day and large category of jokes accessible via REST API

Jokes One is a games & comics API from jokes.one. Requests are authenticated with an API key. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 12 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Yes
Base URL
https://api.jokes.one
Version
1.1
Endpoints
12
Spec updated
2021-06-21

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.jokes.one/jod" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://api.jokes.one/jod", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.jokes.one/jod",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/jodGets `Joke of the Day`.
GET/jod/categoriesGets a list of `Joke of the Day` Categories.
GET/jokeGets a `Joke` with a given `id`.
PUT/jokeAdd a new joke to your private collection.
PATCH/jokeUpdate a joke
DELETE/jokeDelete a joke. The user needs to be the owner of the joke to be able to delete it.
GET/joke/categories/searchGets a list of `Joke` Categories, based on a query term.
GET/joke/listGet the list of jokes in your private collection.
GET/joke/randomGets a `Random Joke`. When you are in a hurry this is what you call to get a random famous joke.
GET/joke/searchSearch for a `Joke` in Jokes One platform. Optional `category` , `author`, `minlength`, `maxlength` params determines the filters applied while searching for th
POST/joke/tags/addAdd a tag to a given Joke.
POST/joke/tags/removeRemove a tag from a given joke.

Questions

Does the Jokes One API need an API key?

Yes. The Jokes One API uses API key authentication; the documentation explains how to get credentials.

Can I call the Jokes One API from the browser?

Yes. The Jokes One API sends CORS headers, so a web page can call it directly with fetch().

Does the Jokes One API support HTTPS?

Yes, the Jokes One API is served over HTTPS.

How many endpoints does the Jokes One API have?

Its OpenAPI description lists 12 endpoints in version 1.1. All of them are shown on this page.

What are alternatives to the Jokes One API?

Other Games & Comics APIs include xkcd, Chess.com, Scryfall, Riot Games, Lichess.

Compare alternatives →

Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).