{"openapi":"3.1.0","info":{"title":"Azerbaijan GitHub Community — Open Data API","version":"1.0.0","description":"Public, key-less, read-only access to community data: contribution stats, leaderboard, blog posts, and showcase projects. Rate limited per IP (20/min, 500/day)."},"servers":[{"url":"https://githubcommunity.az/api/v1","description":"Production"}],"paths":{"/stats":{"get":{"operationId":"getStats","summary":"Community contribution totals","tags":["Stats"],"responses":{"200":{"description":"Aggregated community stats.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Stats"},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/leaderboard":{"get":{"operationId":"getCurrentLeaderboard","summary":"Current month leaderboard (top 50 by commits)","tags":["Leaderboard"],"responses":{"200":{"description":"Top 50 contributors for the current month.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/leaderboard/all-time":{"get":{"operationId":"getAllTimeLeaderboard","summary":"All-time leaderboard (top 50 by commits)","description":"Top 50 contributors by all-time commit count. Note: GitHub's contribution window means this reflects roughly the last 12 months (the site labels this 'Last Year').","tags":["Leaderboard"],"responses":{"200":{"description":"Top 50 all-time contributors.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/leaderboard/{year}/{month}":{"get":{"operationId":"getMonthlyLeaderboard","summary":"Historical month leaderboard (top 50 by commits)","tags":["Leaderboard"],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","example":2026}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":12,"example":7}}],"responses":{"200":{"description":"Top 50 contributors for the requested month.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"400":{"description":"Invalid year or month.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No leaderboard data for that month.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/blog":{"get":{"operationId":"getBlogPosts","summary":"List blog posts (without body)","tags":["Blog"],"responses":{"200":{"description":"All blog posts, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlogListItem"}},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/blog/{slug}":{"get":{"operationId":"getBlogPost","summary":"Single blog post (with MDX body)","tags":["Blog"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The blog post.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BlogPost"},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"404":{"description":"No post with that slug.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/showcase":{"get":{"operationId":"getShowcaseProjects","summary":"List showcase projects","tags":["Showcase"],"responses":{"200":{"description":"All showcase projects, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ShowcaseProject"}},"meta":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"When GitHub stats were last synced"},"count":{"type":"integer","description":"Number of items in `data`"},"month":{"type":"string","description":"Month key in YYYY-MM form"}}}},"required":["data"]}}}},"429":{"description":"Rate limit exceeded (20/min or 500/day per IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"Stats":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"totalCommits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Community-wide commit total (home page hero number)"},"totalPullRequests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalUsers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastSyncedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"},{"type":"null"}],"description":"When GitHub stats were last synced"}},"required":["totalCommits","totalPullRequests","totalUsers","lastSyncedAt"],"additionalProperties":false},"LeaderboardEntry":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string"},"commits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pullRequests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"issues":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reviews":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"user":{"type":"object","properties":{"githubUsername":{"type":"string"},"name":{"type":"string","description":"The user's display name"},"image":{"type":"string","description":"URL of the user's avatar image from GitHub"}},"required":["githubUsername","name","image"],"additionalProperties":false}},"required":["userId","commits","pullRequests","issues","reviews","user"],"additionalProperties":false},"BlogListItem":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"type":"string"},"userId":{"type":"string"},"readingTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Estimated reading time in minutes"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"},"author":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"string"}},"required":["name","image"],"additionalProperties":false}},"required":["id","slug","title","description","tags","coverImage","userId","readingTime","createdAt","author"],"additionalProperties":false},"BlogPost":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"coverImage":{"type":"string"},"userId":{"type":"string"},"contentMdx":{"type":"string","description":"Raw MDX body of the post"},"readingTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"},"author":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"string"},"githubUsername":{"type":"string"}},"required":["name","image","githubUsername"],"additionalProperties":false}},"required":["id","slug","title","description","tags","coverImage","userId","contentMdx","readingTime","createdAt","updatedAt","author"],"additionalProperties":false},"ShowcaseProject":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"repo":{"type":"string","description":"owner/name of the GitHub repository"},"submittedBy":{"type":"string"},"banner":{"anyOf":[{"type":"string"},{"type":"null"}]},"links":{"type":"array","items":{"type":"string"}},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"},"stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"forks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openIssues":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openPRs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"homepageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"languageColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 date-time"}},"required":["id","repo","submittedBy","banner","links","website","createdAt","stars","forks","openIssues","openPRs","description","homepageUrl","license","language","languageColor","updatedAt"],"additionalProperties":false},"ApiError":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}