What I built
I created a REST API using node Js , express and MongoDB. It uses the Hindi Jokes API to fetch random jokes in Hindi language. The app is deployed on Render.
App Link
https://hindi-jokes-api.onrender.com
Screenshots
Custom Endpoints
Random joke
Endpoint: /jokes
Example: https://hindi-jokes-api.onrender.com/jokes?api_key=YourApiKey
Response:
{
"_id": "631c381d798f9e2887b4cba1",
"status": "Success",
"jokeContent": "आओ 2 Min मौन रखे उन लड़कियों के लिए.. जिनकी शक्ल Nokia 1100 जैसी है और घमंड Iphone14 जैसा…. 😆🤣😋😉",
"jokeNo": 116,
"created_by": "Amit Sharma"
}
Specify count (MAX 50)
In order to get multiple jokes in a single request specify the count with the following endpoint.
Endpoint: /jokes/{count}
Example: https://hindi-jokes-api.onrender.com/jokes/2?api_key=YourApiKey
Response:
{
"status": "Success",
"created_by": "Amit Sharma",
"totalJokes": "2",
"data": [
{
"_id": "63199fb5f02231a5ee2965a5",
"jokeContent": "शादी के दो दिन बाद दूल्हा उस ब्यूटी पार्लर में गया जहां से उसकी बीवी ने शादी के लिए मेकअप करवाया था उसने पार्लर वाली मैडम को आईफोन 7 गिफ्ट किया और थैंक्यू बोलकर चला आया मैडम ने खुशी खुशी आईफोन का डब्बा खोला तो उसमें नोकिया 1100 पड़ा था साथ में एक पर्ची भी थी जिस पर लिखा था मुझे भी ऐसा ही महसूस हुआ था😆🤣😋😉 ",
"jokeNo": 71
},
{
"_id": "63217239def3f928de48b025",
"jokeContent": "थप्पड मारने पर नाराज वाईफ से हसबंड बोला: ...आदमी उसी को मारता है जिससे वो प्यार करता है. ..वाईफ ने हसबंड को 2 थप्पड मारे और बोली ...आप क्या समझते है मै आपसे प्यार नही करती ... 😆🤣😋😉",
"jokeNo": 141
}
]
}
Link to Source Code
Check source code on github
https://github.com/amitSharma7741/Hindi_jokes_api
Permissive License
MIT License
https://github.com/amitSharma7741/Hindi_jokes_api/blob/add-license-1/LICENSE.md
Top comments (0)