Developers
Build on the public API.
Read-only JSON for agents and integrations — posts, projects, talks, publications, and search. No keys, no signup.
Quickstart
Site summary
curl https://ayushmorbar.vercel.app/api/v1/siteLatest posts
curl "https://ayushmorbar.vercel.app/api/v1/posts?limit=5"Search content
curl "https://ayushmorbar.vercel.app/api/v1/search?q=python&limit=5"Every success response is a { data, meta } envelope where meta carries { count, version }. Every error is a { error: { code, message, hint } } envelope — branch on code, show message, follow hint.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/site | Site name, URL, and description for attribution. |
| GET | /api/v1/posts | Published posts (drafts excluded). Filter with ?tag=, cap with ?limit=. |
| GET | /api/v1/projects | Public projects (hidden entries excluded). |
| GET | /api/v1/talks | Public talks (hidden entries excluded). |
| GET | /api/v1/publications | Published research publications (drafts excluded). |
| GET | /api/v1/search | Full-text search across posts, projects, and talks. Requires ?q=. |
Query details: ?tag= matches case-insensitively, ?limit= is clamped to 1–50, and search ?q= is required with a default limit of 20.
Authentication: none
All endpoints are unauthenticated GET routes — no API keys, no tokens, no signup. Cross-origin calls are allowed via permissive CORS headers, so browser and agent clients can fetch directly.
Rate limits and caching
GET /api/v1/* is limited to 120 requests/min per IP. Responses are cached for an hour (s-maxage 3600, stale-while-revalidate 86400), so cache results instead of polling. The contact form POST path is rate-limited separately and is not part of this API. Throttled requests return HTTP 429 with code RATE_LIMITED and a Retry-After header — back off exponentially when you see it.
Versioning and deprecation
The version lives in the path (/api/v1/) and in every meta.version envelope, currently v1. Breaking changes will ship under a new path (/api/v2/) while v1 keeps serving through a notice period. The pre-v1 top-level message string is already deprecated — always branch on error.code (BAD_REQUEST, NOT_FOUND, FORBIDDEN, RATE_LIMITED, INTERNAL_ERROR), never on message text.
Machine-readable sources
- /openapi.json — OpenAPI 3.1 contract for every endpoint above.
- /llms.txt — canonical site content manifest for language models.
- /api/v1/site — live site summary for attribution in citations.
- Source code — public GitHub profile hosting this site's code.