HonestHook

Free API key (1,000/mo)Sign in

Home · Docs · Endpoints · github/repo/readme

github/repo/readme — the README, decoded, and which file it was

A repository's README by `owner/name`, decoded from the base64 the GitHub API returns. The answer says which file it resolved to, and tells you when it could not decode instead of serving an empty one.

The call

PathGET /api/v1/github/repo/readme
Catalogue idgithub/repo/readme
Cost1 credit per call. A call that finds nothing costs nothing.
KeyRequired — Authorization: Bearer hk_live_...

Parameters (1)

NameInRequired
repoqueryyes

That list is the whole list, and anything else is ignored in silence. An undeclared parameter is not rejected — it produces no error, no warning and no filtering. Check a parameter against this table before assuming a narrower result came back.

What the parameter list does not tell you

THE API RETURNS BASE64 AND WE DECODE IT. You get the text. That sounds trivial until the encoding is not base64 — which the GitHub API does for large files, declaring a different `encoding` and handing back something that is not the content. In that case `content` is `null` and `encoding` comes through as it arrived.

⚠️ AN EMPTY STRING WOULD HAVE BEEN THE EASY BUG. Decoding something that is not base64 yields empty or garbage, and serving that as a README means the client sees a project with no documentation. `null` plus the real `encoding` says 'we could not read this', which is a different claim about the world and the only honest one.

WHICH FILE IS THE README IS A GUESS, SO WE PUBLISH IT. A repository may carry `README.md`, `readme.md`, `README`, or `.github/README.md`, and the API resolves one of them. The answer carries `name` and `path` so you know which — a README from `.github/` is frequently the contributor-facing one rather than the project description, and that distinction matters if you are summarising repositories at scale.

One item, always: a repository has one README. `limit` is not declared because the route does not read one.

Why there is no success body on this page

The 200 body for this endpoint is not transcribed here. Reading it needs a client key, and there is no client key on the machine these pages were built from — internal keys exist only as hashes, by design. An example we never received would look exactly like one we did, so instead of composing one, the response shape is documented field by field on the schema pages below. Those are generated from the contract and tested against it in both directions; an invented example would be tested by nothing.

Response shapes (3)

Error codes (8)

Every one of them carries the same body shape: ApiError. The error value is a stable string you can branch on — branch on that, never on the message text.

400 · 401 · 402 · 404 · 405 · 451 · 503 · 502

Machine-readable

This endpoint is in /openapi.json (OpenAPI 3.1), with its cost on the operation itself. If you are generating a client, use the spec rather than this page — and note that the spec is filtered by what is switched on right now, so it is the better answer to "can I call this today".

The other 24 endpoint pages

archive/trends · archive/movers · archive/coverage · profile/history · youtube/channel · pinterest/boards · bluesky/post · tiktok/post · tiktok/search_suggestions · tiktok/video_screen_text · tiktok/post_transcript · youtube/video · youtube/channel/videos · youtube/playlist · youtube/channel/shorts · youtube/channel/lives · youtube/channel/playlists · youtube/video/comments · youtube/video/comment/replies · github/repo · github/repo/issues · github/repo/releases · github/issue · github/issue/comments

← All endpoint pages · Recipes · Schemas · Full docs