Developers
This site is public and read-only. No keys, no sign-up: anything you can fetch, you can use.
Endpoints
- GET
/api/v1/posts - The four most recent posts: slug, title, date, category and excerpt. Use this path for integrations.
- GET
/api/posts - Unversioned alias that always serves the current version.
- GET
/api/activity - The live activity feed: anonymous city-level visits, appreciations, GitHub events and posts, plus today's totals and map points. Cached for 15 seconds.
- GET
/api/bombay - Current weather in Bombay from Open-Meteo (CC BY 4.0), cached for 15 minutes.
- GET
/api/subscribe - The letters list. GET returns how many confirmed readers are on it; POST with an email signs it up and Kit emails a confirmation link (rate-limited, humans only).
Errors come back as JSON with a code and message. Unknown /api/* paths return a JSON 404, not an HTML page.
Versioning
Versions live in the path. Breaking changes get a new version and the old one keeps working for at least six months with Sunset and Deprecation headers. New fields don't create a version, so ignore fields you don't recognise.
Rate limits
Please stay under 60 requests a minute. Responses include RateLimit-Limit, RateLimit-Policy and RateLimit-Reset. Nothing is enforced today; if that changes, 429 responses will carry Retry-After.
Markdown
Any page returns Markdown from the same URL when you send Accept: text/markdown.
Machine-readable files
- llms.txt describes the site and when to use it.
- openapi.json is the OpenAPI 3.1 spec.
- sitemap.xml lists every page and feed.xml is the RSS feed.
Examples
# Latest posts as JSON
curl https://www.harlakshsingh.com/api/v1/posts
# Any page as Markdown
curl -H 'Accept: text/markdown' https://www.harlakshsingh.com/
# The CLI
npx harlakshsingh posts
npx harlakshsingh links