{"openapi":"3.1.0","info":{"title":"erikbethke.com Public API","version":"1.0.0","description":"Read-only access to blog posts and site data on erikbethke.com. For richer agent access see the MCP server at /api/mcp and /for-agents.","contact":{"name":"Erik Bethke","url":"https://erikbethke.com/about"},"license":{"name":"Content free to read, cite, and train on — see /robots.txt"}},"servers":[{"url":"https://erikbethke.com"}],"paths":{"/api/posts/listing":{"get":{"operationId":"listPosts","summary":"Paginated, filterable list of published posts (lightweight metadata)","description":"Returns post metadata (title, date, summary, tags, thumbnail, slug) with server-side pagination, plus year counts and top tags. The primary endpoint for browsing the blog.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1},"description":"Page number"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Posts per page"},{"name":"year","in":"query","schema":{"type":"string"},"description":"Filter by year, e.g. \"2026\""},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Filter by tag, e.g. \"AI\""},{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring over title/summary/tags"}],"responses":{"200":{"description":"A page of posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingResponse"}}}}}}},"/api/posts":{"get":{"operationId":"listPublishedPosts","summary":"List published posts (full records)","parameters":[{"name":"status","in":"query","required":true,"schema":{"type":"string","enum":["published"]},"description":"Must be \"published\" for public access"},{"name":"limit","in":"query","schema":{"type":"integer"},"description":"Optional cap on results"}],"responses":{"200":{"description":"Published posts","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}}}}},"/api/posts/{id}":{"get":{"operationId":"getPost","summary":"Fetch a single published post by id or slug","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Post id (DynamoDB) or slug"}],"responses":{"200":{"description":"The post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"404":{"description":"Not found"}}}},"/api/github-contributions":{"get":{"operationId":"getGithubContributions","summary":"Erik's GitHub contribution graph data","responses":{"200":{"description":"Contribution data","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/health":{"get":{"operationId":"health","summary":"Health check","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string"}}}}}}}}}},"components":{"schemas":{"PostListing":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["mdx","dynamic"]},"thumbnail":{"type":"string"},"views":{"type":"integer"}}},"ListingResponse":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/PostListing"}},"total":{"type":"integer"},"page":{"type":"integer"},"totalPages":{"type":"integer"},"yearCounts":{"type":"object","additionalProperties":{"type":"integer"}},"topTags":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string"},"count":{"type":"integer"}}}}}},"Post":{"type":"object","properties":{"postId":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"author":{"type":"string"},"slug":{"type":"string"},"publishedAt":{"type":"integer"},"createdAt":{"type":"integer"},"images":{"type":"array","items":{"type":"string"}}}}}},"x-mcp-server":"https://erikbethke.com/api/mcp","x-llms-txt":"https://erikbethke.com/llms.txt"}