Jokes One joke API is a full featured jokes API that gives access to our jokes platform. You want to build an app or integrate humor into your workflow / applications you are in the right place. Drop us note if the plans below doesn't fullfill your usecase. We can create a custom plan for your use case.
Here are the full features of the API
https://api.jokes.one
Some of our API calls are public. To maintain our service level we ratelimit the number of API calls. For public API calls this is 60 API calls a day with distribution of 5 calls an hour. For paid plans this limit is increased according to the service level described in the plan.
For public calls you don't need to pass any API key. Just invoke the endpoint (see examples below). For paid subscriptions you need to pass the API key.
Currently we support API Key based authentication. Please set a request header 'X-JokesOne-Api-Secret' with value of your API key. Alternatively you can also pass api_key= as a request parameter, though we strongly discourage this mode of passing the key.
You can get the joke of the day via our REST API. Knock Knock Joke of the day, Blonde Joke of the day, Animal joke of the day are supported.
The above calls will result in a response like the following.
To get the the categories supported by joke of the day service you can use this endpoint.
The above calls will result in a response like the following.
You can search for jokes with a given keyword. To get a joke with the term knock knock in it add a parameter "query=knock knock" to the call and it will return a random joke with pattern "knock knock" in it.
This would translate in to curl like the following:
The above call would return a joke which has a phrase "knock knock".
{ "success": { "total": 1 }, "contents": { "jokes": [ { "title": "Mark Bookspan", "length": "70", "clean": null, "racial": null, "id": "_T_fW9BD2_FaHaTr5IrlsAeF", "text": "\nKnock-knock\n Who's there? \n\n\nMark Bookspan \n\n\nQuick, bolt the door!\n\n" } ], "copyright": "2019-20 https://jokes.one" } }
You can search for jokes in a specific category. Categories are managed using tags in the backend. To get a dad joke you can specify a parameter "category=dad".
This would translate in to curl like the following:
The above call would return a joke in dad jokes category
To search for programming jokes you can do something like this.
You can use "minlen" and "maxlen" parameters in combination with other parameters like "query" or "category" to restrict the length of the joke that is returned.
To get a random joke call the following endpoint. This API endpoint doesn't require any parameters.
This would translate in to curl like the following:
The above call would return the following response.
{ "success": { "total": 1 }, "contents": { "jokes": [ { "title": "A blonde was bragging about her knowledge of state capitals.", "length": "208", "clean": "1", "racial": null, "id": "8_EqzUsq9YKt1b8jhNsc3geF", "text": "A blonde was bragging about her knowledge of state capitals. She proudly says, Go ahead, ask me, I know all of them. A friend says, OK, what's the capital of Wisconsin? The blonde replies, Oh, that's easy: W." } ], "copyright": "2018-20 https://jokes.one" } }
In curl this looks like the following :
The response will return the id of the joke that was just added to your private collection.
{ "success": {"total": 1 }, "content": { "joke": {"id": "0tztT1wYHRzdTf7jIccAzweF"} } }
In curl this looks like the following :
{ "success": { "total": 1 }, "content": "Joke with id 0tztT1wYHRzdTf7jIccAzweF is deleted" }
In curl this looks like the following :
The above calls will result in a response like the following.
{ "success": { "total": 1 }, "contents": { "jokes": [ { "title": "So that's the reason", "length": "89", "clean": 1, "racial": null, "id": "mL_RDAbKC_3fHncrxPLxDweF", "text": "Why did the physics teacher break up with the biology teacher? \n\nThere was no chemistry.\n" } ], "copyright": "2018-20 https://jokes.one" } }
The following are the API calls you can make. You can try out / test the calls right from this page. Please note, javascript needs to be enabled to see the documentation below.
1 API Key |
1000 API Calls / day |
Best in class backend tools |
Easy to use REST API |
Immediate provisioning |
1 API Key |
5000 API Calls / day |
Best in class backend tools |
Easy to use REST API |
Immediate provisioning |
1 API Key |
12500 API Calls / day |
Best in class backend tools |
Easy to use REST API |
Immediate provisioning |