Read a paste

Fetch a paste's rendered reader page or its raw bytes from paste.hep.gg. The raw endpoint is the programmatic read path.

Every paste has two read URLs: a rendered HTML reader page for humans, and a raw plaintext endpoint for scripts. Public and unlisted pastes need no authentication. Private pastes are readable only by their owner's signed-in session.

The paste ID in the path is the value you got back as data.id (or the tail of data.url) when you created it. IDs match [A-Za-z0-9_-] and are 4 to 80 characters long.

Reader page

GEThttps://paste.hep.gg/:idPublic
The human-facing reader page (syntax-highlighted HTML).

Returns text/html: a syntax-highlighted reader page with the title, language, view count, created and expiry timestamps, and size. It ships both a dark and a light rendering and swaps by the visitor's prefers-color-scheme. This is what opening the link in a browser shows.

A missing, expired, or not-visible paste returns 404 with an HTML not-found page.

Raw content

GEThttps://paste.hep.gg/:id/rawPublic
The exact paste bytes as text/plain.

Returns text/plain; charset=utf-8 with the paste content and no markup. This is the endpoint to hit from curl, wget, or any program that wants the original bytes.

  • Public pastes are served with Cache-Control: public, max-age=60, so a repeated fetch within a minute may come from cache.
  • Unlisted and private pastes are served no-store.
  • A missing, expired, or not-visible paste returns 404 with the plaintext body Not found.
curl
curl https://paste.hep.gg/aB3dE6kp/raw

Pull a config or script down and run it in one line:

curl
curl -fsSL https://paste.hep.gg/aB3dE6kp/raw | bash

Visibility and access

Paste visibilityGET /<id> and GET /<id>/raw
publicReadable by anyone. Raw response is cacheable for 60s.
unlistedReadable by anyone with the link. Not cached.
privateReadable only by the owner (signed-in session). Others get 404.

There is no JSON metadata endpoint on the public host. To list your own pastes or fetch their metadata, use the dashboard or the session-authed /api/v1/snippets API while signed in.