BYTETOOLS

What The Commit API

Fetch a random, painfully relatable git commit message as plain text with one curl. No key, no JSON parsing, no dependencies. Verified example response included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 21 Aug 2026

What is the What The Commit API?

What The Commit serves random joke git commit messages. `GET https://whatthecommit.com/index.txt` returns a single message as plain text with no key, no wrapper and no JSON, which makes it trivial to pipe straight into `git commit -m`.

This is the smallest useful API in the directory: one request, one line of text, no schema. That constraint is the point. Because `/index.txt` returns bare text rather than JSON, you can wire it into a shell alias with nothing but curl and command substitution, which is why it has survived in developers' dotfiles for well over a decade.

It is also a neat teaching example for the difference between a resource and its representation. The site root returns an HTML page for humans; `/index.txt` returns the same underlying value as `text/plain` for machines. Same data, two representations, chosen by path rather than by an `Accept` header, which is a pragmatic older convention you will still meet in the wild.

Quick facts

Base URL
https://whatthecommit.com
Authentication
No key and no headers required. A polite User-Agent is still good manners.
Rate limit
Not published. It is a single small server, so do not poll it in a loop.
Pricing
Free and open source.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the What The Commit API

Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Fetch a random commit message as plain text

GET https://whatthecommit.com/index.txt

curl
curl 'https://whatthecommit.com/index.txt'
JavaScript (fetch)
const res = await fetch("https://whatthecommit.com/index.txt");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://whatthecommit.com/index.txt", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
I expected something different.

Parameters

ParameterTypeRequiredDescription
(none)n/aOptionalThere are no parameters. `/index.txt` gives plain text; the bare domain gives an HTML page. /index.txt

Response fields

(body)text/plain
A single commit message, sometimes containing parenthetical asides such as `(this commit has no parents)`. There is no trailing newline guarantee, so trim before use.

What you can build with the What The Commit API

  • Add a `git yolo` shell alias that commits with a random message
  • Populate a demo repository with plausible-looking history for a screenshot
  • Use as the world's simplest live endpoint when demonstrating curl, fetch or an HTTP library
  • Generate placeholder strings for a UI that displays commit history
  • Health-check a proxy or firewall rule with a response small enough to read at a glance

Common errors and how to fix them

HTML instead of text

You requested the site root rather than `/index.txt`.

Fix: Always include the `/index.txt` path when scripting.

Connection refused or 5xx

The single origin server is down or overloaded.

Fix: Fall back to a local message list; this is a joke endpoint and should never be on a critical path.

Messages containing quotes or apostrophes

Not an HTTP error, but shell-quoting breaks if you interpolate the result unquoted.

Fix: Wrap the substitution in double quotes: `git commit -m "$(curl -s https://whatthecommit.com/index.txt)"`.

What The Commit API — frequently asked questions

Does What The Commit need an API key?

No. It is a plain public URL with no key, no account and no headers required.

Does it return JSON?

`/index.txt` returns plain text, which is the point. If you need JSON, wrap the string yourself; there is nothing else in the response to model.

Are the messages safe for work?

Mostly, but the corpus is community-contributed and a few entries include mild profanity. Filter the output if it will appear in front of clients.

Can I use it in CI?

You can, but do not make a build depend on an external joke service. Cache a list of messages locally and pull fresh ones occasionally instead.

Tools that pair with this API

Alternatives to What The Commit API

If What The Commit does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
GitHub REST APIGitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token.No keyYes19 Aug 2026
JSONPlaceholderFree fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples.No keyYes19 Aug 2026
Postman EchoPostman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example.No keyNo19 Aug 2026
DummyJSONFree fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples.No keyYes19 Aug 2026
24 Pull RequestsFree JSON API listing open source projects and contributors from the 24 Pull Requests campaign. No key required. Working curl example and response breakdown.No keyNo21 Aug 2026
AbacusA free, key-free counter API for page hits, downloads and votes. Read a counter without incrementing it, or increment atomically. CountAPI's live replacement.No keyYes21 Aug 2026
All Developer & Testing APIs

What The Commit is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.