Developers

Developers

Everything on harlakshsingh.com is public and read-only. There is no auth, no API keys, and no signup. If you can fetch a URL, you can use it.

Quickstart

# Latest posts as JSON
curl https://harlakshsingh.com/api/posts

# Markdown instead of HTML (any page)
curl -H 'Accept: text/markdown' https://harlakshsingh.com/

# Machine-readable site guide
curl https://harlakshsingh.com/llms.txt

Endpoints

Method Path Description
GET /api/posts 4 most recent posts: slug, title, date, category, excerpt
GET /api/v1/posts Same payload, versioned path (preferred for integrations)
GET /api/posts.json Static snapshot of the unversioned payload
GET /api/v1/posts.json Static snapshot of the versioned payload

Errors are JSON: { "error": { "code": "...", "message": "..." } }. Unknown /api/* paths return a JSON 404, never an HTML page.

Versioning and deprecation

  • The API is versioned in the URL path (/api/v1/...). The unversioned /api/posts alias always serves the current version.
  • Breaking changes ship as a new version (/api/v2/...). The old version keeps working for at least 6 months and advertises Sunset and Deprecation headers with the retirement date.
  • Additive changes (new fields, new endpoints) do not trigger a new version. Integrations should ignore unknown fields.

Rate limits

  • Guideline: 60 requests per minute per client. API responses carry RateLimit-Limit, RateLimit-Policy, and RateLimit-Reset headers so clients can self-throttle.
  • There is currently no hard enforcement and no 429 responses. If enforcement is ever added, 429 responses will include Retry-After.

Markdown negotiation

Every page serves Markdown to clients that ask for it, from the same URL:

curl -H 'Accept: text/markdown' https://harlakshsingh.com/blog/checkstack-co

Markdown responses use Content-Type: text/markdown; charset=utf-8 and Vary: Accept. Requests that accept neither HTML nor Markdown receive 406.

Machine-readable files

CLI

A tiny companion CLI prints the same data to your terminal:

npx harlakshsingh posts
npx harlakshsingh links

See the cli/ directory in the site repository for the source.