Geek-Jokes API

Beginner's Pick Games & Comics / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)
90 A+
Measured Score 0 50 100 Reachability 30/30 Speed 10/20 Security 15/15 Developer XP 20/20 Reliability 15/15 TESTED 2026-07-23

Overview

Geek-Jokes API delivers random programming and technology-themed jokes as plain text with a single GET request. It needs no API key or registration, making it one of the simplest APIs you can call. It is a perfect first API for beginners who want to practice making HTTP requests and handling text responses.

Beginner Tip

The API returns a single plain text joke by default — not JSON — so do not try to parse the response with JSON.parse(). Add ?format=json to the URL to get a proper JSON response instead.

Available Data

joke text (setup/punchline)
joke category
joke type (single/twopart)
randomly generated data
customizable output format

Example Response

JSON Response
{
  "error": false,
  "category": "Programming",
  "type": "twopart",
  "setup": "Why do programmers prefer dark mode?",
  "delivery": "Because light attracts bugs.",
  "id": 42,
  "lang": "en"
}

Field Reference

joke The text of a random geek or programming-themed joke (only returned when using ?format=json)

Implementation Example

Request
const url = "https://github.com/sameerkumar18/geek-joke-api";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

JSON.parse error The default response is plain text, not JSON
Add ?format=json to the URL to get a proper JSON response with a joke field
CORS error in browser Some browser environments restrict cross-origin plain text responses
Use ?format=json which has proper CORS headers, or fetch from a Node.js backend
Connection refused or 502 The community-hosted API occasionally goes offline
Add error handling to catch fetch failures and display a fallback joke from a local array

Measured Score Breakdown

Live HTTP request to the API endpoint

Reachability 30/30
Speed 10/20
Security 15/15
Developer XP 20/20
Reliability 15/15
Endpoint Response Time 822ms

Fully tested on Jul 23, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Games & Comics
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →