jshah
← Home

The jshah.dev API

This site is a static blog, and everything on it is also readable by machines. If you're building an agent, a feed reader, or a script, these are the endpoints to use. All of them are public, read-only, and served without authentication.

Endpoints

  • /openapi.json. An OpenAPI 3.1 description of every endpoint on this site.
  • /api/posts.json. Every published post as JSON, with URL, Markdown URL, date, topic, tags, and description.
  • /llms.txt. A Markdown index of the site, following the llmstxt.org convention.
  • /sitemap-index.xml. An XML sitemap of every page.
  • /atom.xml. A full-content Atom feed of all posts.

Markdown for agents

Every page has a Markdown twin, this guide included: a plain file named index.md under the page URL. Outside /api/, requesting the page URL with an Accept: text/markdown header returns the same document as the response body, with Vary: Accept set so caches keep the two representations apart. Under /api/, each resource has one fixed format, which is what lets unknown paths return the JSON error described below.

curl -H "Accept: text/markdown" https://jshah.dev/writing/
curl https://jshah.dev/writing/index.md

Negotiation follows the acceptmarkdown.com convention. Quality values in the Accept header are honored, and a request this site can satisfy with neither HTML nor Markdown gets a 406 listing the formats it can produce.

Errors

Unknown paths under /api/ return HTTP 404 with a JSON body carrying an error code, a message, and links to the resources that do exist. Unknown page URLs return HTTP 404 with an HTML page, or a Markdown body when the request asked for Markdown. No path on this site answers 200 for content that doesn't exist.