{"openapi":"3.1.0","info":{"title":"RepoCurrent Public API","version":"1.0.0-preview","description":"Read-only, cacheable access to explainable open-source momentum signals. No API key is required during the public preview.","termsOfService":"https://repocurrent.vercel.app/docs/api#fair-use"},"servers":[{"url":"https://repocurrent.vercel.app"}],"tags":[{"name":"Discovery","description":"API discovery and catalogs."},{"name":"Signals","description":"Repository momentum signals."}],"paths":{"/api/v1":{"get":{"tags":["Discovery"],"summary":"Discover the public API","operationId":"getApiIndex","responses":{"200":{"description":"API status and endpoint links."}}}},"/api/v1/trending":{"get":{"tags":["Signals"],"summary":"List repositories by current momentum","operationId":"listTrendingRepositories","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["7d","30d","90d"],"default":"7d"}},{"name":"language","in":"query","description":"Language slug from the catalog.","schema":{"type":"string"}},{"name":"topic","in":"query","description":"Topic slug from the catalog.","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Ranked repository signals.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RepositorySignal"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/repositories/{owner}/{name}":{"get":{"tags":["Signals"],"summary":"Get one repository signal and daily history","operationId":"getRepositorySignal","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","schema":{"type":"string","enum":["7d","30d","90d"],"default":"7d"}}],"responses":{"200":{"description":"Repository signal and up to 30 daily points."},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/catalog":{"get":{"tags":["Discovery"],"summary":"List public languages, topics, and report dates","operationId":"getCatalog","responses":{"200":{"description":"Current public catalog."}}}},"/api/v1/openapi.json":{"get":{"tags":["Discovery"],"summary":"Get this OpenAPI document","operationId":"getOpenApiDocument","responses":{"200":{"description":"OpenAPI 3.1 document."}}}}},"components":{"schemas":{"RepositorySignal":{"type":"object","required":["repository","signal","source"],"properties":{"repository":{"type":"object","required":["slug","language","stars"],"properties":{"slug":{"type":"string","examples":["openai/codex"]},"owner":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string"},"topics":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"stars":{"type":"integer"},"forks":{"type":"integer"},"openIssues":{"type":"integer"},"contributors":{"type":"integer"}}},"signal":{"type":"object","required":["period","momentumScore","status"],"properties":{"period":{"type":"string","enum":["7d","30d","90d"]},"momentumScore":{"type":"integer","minimum":0,"maximum":100},"status":{"type":"string","enum":["surging","rising","steady"]},"activityDeltaPct":{"type":"number"},"contributorDeltaPct":{"type":"number"},"responseHours":{"type":"number"},"releaseCadenceDays":{"type":"number"},"starsDelta":{"type":"number"},"commits":{"type":"integer"},"pullRequests":{"type":"integer"},"issuesClosed":{"type":"integer"},"activeContributors":{"type":"integer"},"sparkline":{"type":"array","items":{"type":"number"}}}},"source":{"type":"object","properties":{"mode":{"type":"string","enum":["live_sample","illustrative"]},"updatedAt":{"type":"string","format":"date-time"},"updatedAtEpochMs":{"type":"integer"}}}}},"Meta":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"refreshSeconds":{"type":"integer","examples":[7200]},"count":{"type":"integer"},"period":{"type":"string"},"caveat":{"type":"string"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}},"responses":{"BadRequest":{"description":"Invalid query or path parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested indexed resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"externalDocs":{"description":"RepoCurrent API documentation","url":"https://repocurrent.vercel.app/docs/api"}}