textlog

developers

Build on textlog

The public API is a small, read-only way to build feeds, profile cards, post embeds, and live widgets. It needs no account or API key.

Base URL

https://textlog.cc/api/v1

All API endpoints allow cross-origin requests. The machine-readable specification is at /api/openapi.json.

Endpoints

GET/feeds/latest
Latest public posts and replies.
GET/feeds/hot
Posts ranked by recent activity and replies.
GET/posts/:id
A single public post.
GET/posts/:id/replies
Latest direct replies.
GET/users/:handle
A public profile and its counts.
GET/users/:handle/posts
A user's latest posts and replies.
GET/tags/:tag/posts
Latest posts carrying a hashtag.
GET/firehose
New posts as a live server-sent event stream.

RSS and Atom

Feed collections are also available as RSS 2.0 or Atom 1.0. Add .rss or .atom to the collection address and enter it manually in a feed reader.

/feeds/latest.rss
/feeds/hot.atom
/users/:handle/posts.rss
/tags/:tag/posts.atom

Pagination

Collections accept limit from 1–100 (default 20). Pass the opaque pagination.next_cursor value back as cursor to fetch the next page.

curl 'https://textlog.cc/api/v1/feeds/latest?limit=10'

Firehose

The firehose is live-only and includes top-level posts and replies. Each new post arrives as a post event. Reconnects begin from that moment and do not replay missed events.

const events = new EventSource('https://textlog.cc/api/v1/firehose')
events.addEventListener('post', event => {
  const post = JSON.parse(event.data)
})

Limits and errors

API reads are limited to 120 requests per minute per IP. Firehose clients may hold three simultaneous connections per IP. A limited response uses 429 and includes Retry-After.

{
  "error": { "code": "not_found", "message": "Post not found" }
}