{"info":{"title":"Stargrep","version":"1.0.0"},"servers":[{"url":"/api"}],"security":[],"openapi":"3.2.0","components":{"schemas":{"UndefinedError":{"title":"UndefinedError","type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]},"BadRequest":{"title":"BAD_REQUEST","type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["message"],"additionalProperties":true}}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"InternalServerError":{"title":"INTERNAL_SERVER_ERROR","type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"ServiceUnavailable":{"title":"SERVICE_UNAVAILABLE","type":"object","properties":{"defined":{"const":true},"code":{"const":"SERVICE_UNAVAILABLE"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"AccountNotSynced":{"title":"ACCOUNT_NOT_SYNCED","type":"object","properties":{"defined":{"const":true},"code":{"const":"ACCOUNT_NOT_SYNCED"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"TopicNotFound":{"title":"TOPIC_NOT_FOUND","type":"object","properties":{"defined":{"const":true},"code":{"const":"TOPIC_NOT_FOUND"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"TooManyRequests":{"title":"TOO_MANY_REQUESTS","type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"SyncBusy":{"title":"SYNC_BUSY","type":"object","properties":{"defined":{"const":true},"code":{"const":"SYNC_BUSY"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"LoginNotFound":{"title":"LOGIN_NOT_FOUND","type":"object","properties":{"defined":{"const":true},"code":{"const":"LOGIN_NOT_FOUND"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]},"RepoNotFound":{"title":"REPO_NOT_FOUND","type":"object","properties":{"defined":{"const":true},"code":{"const":"REPO_NOT_FOUND"},"message":{"type":"string"},"data":{"type":"object","properties":{"traceId":{"type":"string","description":"Quote this ID when you report the error."}},"required":["traceId"],"additionalProperties":true}},"required":["defined","code","message","data"]}}},"paths":{"/search":{"post":{"operationId":"search","summary":"Search a login's GitHub stars or a topic's repos","description":"Searches the repos a GitHub login starred, or the repos of a GitHub topic, in plain language, and ranks them by how well they match. The login must be synced first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","maxLength":500,"description":"What to look for, in plain language, such as 'rust library for terminal dashboards'."},"scope":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["stars"]},"login":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."}},"required":["kind","login"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["topic"]},"topic":{"type":"string","description":"A GitHub topic in lowercase, such as 'nextjs'. Another spelling, such as 'next-js', means the same topic."}},"required":["kind","topic"],"additionalProperties":true}],"description":"What to search: stars, a login's own stars, or topic, every repo of a GitHub topic that has a page on Stargrep. listTopics names those."},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"How many repos to return, at most. 20 when left out."},"filter":{"type":"string","maxLength":2000}},"required":["q","scope"],"additionalProperties":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"planSource":{"type":"string","enum":["keyword","cache","model","fallback"],"description":"How the query was read. keyword searched the words as typed, and cache and model used a query plan. fallback means the planner failed or the model allowance ran out. The search then ran the words as typed when it had no plan, and full text alone, without search by meaning, when it could not embed the query."},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"facets":{"type":"array","items":{"type":"object","properties":{"atom":{"type":"string","description":"An atom's key, such as 'lang:rust', 'about:subject:4127', or 'alt:subject:77'. It works as a filter."},"label":{"type":"string"},"listed":{"type":"boolean","description":"False for a subject fewer than two repos hold. Library atoms and lookupFacets leave such a subject out, and a filter by it still works."},"repoId":{"anyOf":[{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}],"description":"The repo a subject is the project of, or null."}},"required":["atom","label","listed","repoId"],"additionalProperties":true},"description":"Every atom the repo holds, grouped by role, with its primary kind first."},"reason":{"type":"string","description":"Why the repo matched, such as 'keyword match #2, +38% contributors in 90 days'."},"rankedBy":{"type":"array","items":{"type":"string"},"description":"The values that ranked the repo, such as '+38% contributors in 90 days'."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","pattern":"^(?:stars|forks|commits|active_contributors|new_contributors|merged_pull_requests|closed_issues|releases)(?:|_30d|_90d|_growth_90d)$"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["metric","value"],"additionalProperties":true}}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","facets","reason","rankedBy","metrics"],"additionalProperties":true}},"applied":{"type":"array","items":{"type":"object","properties":{"atom":{"type":"string","description":"An atom's key, such as 'lang:rust', 'about:subject:4127', or 'alt:subject:77'. It works as a filter."},"label":{"type":"string"},"mode":{"type":"string","enum":["filter","exclude","boost"],"description":"filter kept only repos that match, exclude dropped repos that match, and boost ranked repos that match higher without dropping any."},"from":{"type":"string","enum":["query","filter"],"description":"query when the words of q named the atom, filter when the caller's filter did."},"span":{"anyOf":[{"type":"array","prefixItems":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}],"maxItems":2,"minItems":2},{"type":"null"}],"description":"The start and end of the words that named the atom, as character offsets into q trimmed with its runs of spaces collapsed, or null."},"relaxed":{"type":"boolean","description":"True when the words implied a filter that left fewer than 3 repos, so the search ranked the repos it matches first instead of dropping the others. A filter the caller passed never relaxes."}},"required":["atom","label","mode","from","span","relaxed"],"additionalProperties":true},"description":"The atoms the search applied, from the caller's filter and from the words of q. Words Stargrep could not read as an atom with certainty apply nothing and still match by text and meaning."}},"required":["planSource","results","applied"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has not synced this login's stars yet. Trigger a sync first., Stargrep has no page for this topic. A topic gets one once enough developers star its repos.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccountNotSynced"},{"$ref":"#/components/schemas/TopicNotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/sync/{login}":{"post":{"operationId":"triggerSync","summary":"Sync a login's GitHub stars","description":"Checks that the GitHub login exists, queues a sync of its stars, and returns its status. A login synced, queued, or failed in the last 10 minutes is not queued again. When GitHub's budget for new imports is spent, the sync waits in line and the status says when it starts.","parameters":[{"in":"path","required":true,"name":"login","schema":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["unknown","missing"]},"requestedAt":{"type":"null"},"syncedAt":{"type":"null"},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["waiting"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"object","properties":{"ahead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many syncs waiting in line start before this one."},"startsAt":{"type":"string","description":"When this sync is due to start. An estimate that can move later."}},"required":["ahead","startsAt"],"additionalProperties":true}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["queued"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["failed"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["done"]},"requestedAt":{"type":"null"},"syncedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true}],"description":"unknown has never synced, missing is a login GitHub did not have when Stargrep looked in the last 10 minutes, so triggerSync answers LOGIN_NOT_FOUND, waiting has a place in line, queued is about to run or running, failed could not finish, and done has a sync time."}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"GitHub has no user or org with this login.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LoginNotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly., Stargrep is importing as many accounts as GitHub allows right now. Try again later.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/SyncBusy"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}},"get":{"operationId":"syncStatus","summary":"Read a login's sync status","description":"Says whether a login's stars are synced, queued for a sync, failed to sync, or unknown to Stargrep, and how many of them Stargrep has read.","parameters":[{"in":"path","required":true,"name":"login","schema":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["unknown","missing"]},"requestedAt":{"type":"null"},"syncedAt":{"type":"null"},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["waiting"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"object","properties":{"ahead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many syncs waiting in line start before this one."},"startsAt":{"type":"string","description":"When this sync is due to start. An estimate that can move later."}},"required":["ahead","startsAt"],"additionalProperties":true}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["queued"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["failed"]},"requestedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"syncedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true},{"type":"object","properties":{"login":{"type":"string"},"starredTotal":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the login has starred on GitHub, as of Stargrep's latest look. Null until Stargrep has looked. 0 for an org."},"accountType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether the login is a user or an org, or null until Stargrep has looked. An org cannot star repos."},"enrichment":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the login stars now."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep has summarized and embedded, so search by meaning can find them. Repos are shared, so this can start above zero."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them Stargrep gave up reading after repeated failures of their own, such as repos GitHub no longer serves."},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the unread ones wait for a summary, because the daily summary cap deferred it or because Stargrep summarizes a repo only once it is popular enough or a signed-in user stars it. Stargrep reads them later on its own, possibly days later, and search finds them by name and description meanwhile."}},"required":["total","read","failed","queued"],"additionalProperties":true,"description":"How far reading the login's stars has got. Reading is settled for now when state is not queued and read plus failed plus queued equals total, and finished once queued is 0 too. Right after triggerSync the total is still 0, so poll while state is queued or read plus failed plus queued is less than total, poll slowly while only queued repos remain, and reload the library when read changes."},"state":{"type":"string","enum":["done"]},"requestedAt":{"type":"null"},"syncedAt":{"type":"string","description":"An ISO 8601 time in UTC."},"waiting":{"type":"null"}},"required":["login","starredTotal","accountType","enrichment","state","requestedAt","syncedAt","waiting"],"additionalProperties":true}],"description":"unknown has never synced, missing is a login GitHub did not have when Stargrep looked in the last 10 minutes, so triggerSync answers LOGIN_NOT_FOUND, waiting has a place in line, queued is about to run or running, failed could not finish, and done has a sync time."}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/repos/{id}":{"get":{"operationId":"getRepo","summary":"Read one repo","description":"Returns what Stargrep knows about a repo, including its summary, by GitHub repo ID.","parameters":[{"in":"path","required":true,"name":"id","schema":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0,"description":"The GitHub repo ID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"facets":{"type":"array","items":{"type":"object","properties":{"atom":{"type":"string","description":"An atom's key, such as 'lang:rust', 'about:subject:4127', or 'alt:subject:77'. It works as a filter."},"label":{"type":"string"},"listed":{"type":"boolean","description":"False for a subject fewer than two repos hold. Library atoms and lookupFacets leave such a subject out, and a filter by it still works."},"repoId":{"anyOf":[{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}],"description":"The repo a subject is the project of, or null."}},"required":["atom","label","listed","repoId"],"additionalProperties":true},"description":"Every atom the repo holds, grouped by role, with its primary kind first."},"keywords":{"type":"array","items":{"type":"string"}},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","facets","keywords","homepage","createdAt"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has no repo with this ID.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RepoNotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/repos/{id}/similar":{"get":{"operationId":"similarRepos","summary":"Find repos like one repo","description":"Returns the repos nearest one repo by meaning, in two lists: those among a login's stars, and those across Stargrep the login hasn't starred. Also names the people on the people list who star the repo.","parameters":[{"in":"path","required":true,"name":"id","schema":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0,"description":"The GitHub repo ID to find repos like."}},{"in":"query","name":"login","schema":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"Whose stars inStars looks in and notStarred leaves out. The login must be synced first."},"allowEmptyValue":true,"allowReserved":true,"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"starredBy":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"login":{"type":"string"},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's GitHub avatar, or null before Stargrep has read it."}},"required":["login","avatarUrl"],"additionalProperties":true},"description":"Up to 6 of them, the config's curated accounts first, then the most followed."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many people on the list star the repo."}},"required":["people","total"],"additionalProperties":true,"description":"The people on the people list who star the repo now, as of the nightly refresh, the login left out."},"inStars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The repo's star count, when Stargrep has read it."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","stars"],"additionalProperties":true},"description":"Up to 5 of the login's own stars nearest the repo by meaning, nearest first, the repo itself left out."},"notStarred":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The repo's star count, when Stargrep has read it."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","stars"],"additionalProperties":true},"description":"Up to 5 repos across Stargrep nearest the repo by meaning that the login hasn't starred, nearest first. Only repos Stargrep has summarized, leaving out archived repos and repos GitHub no longer serves."}},"required":["starredBy","inStars","notStarred"],"additionalProperties":true,"description":"inStars and notStarred are empty when Stargrep has no embedding of the repo yet."}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has not synced this login's stars yet. Trigger a sync first., Stargrep has no repo with this ID.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccountNotSynced"},{"$ref":"#/components/schemas/RepoNotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/stars/{login}":{"get":{"operationId":"stars","summary":"List a login's synced stars","description":"Returns the repos a GitHub login starred that Stargrep has synced, newest star first, a page at a time.","parameters":[{"in":"path","required":true,"name":"login","schema":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":1000,"description":"How many repos to return, at most. 1000 when left out."},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"cursor","schema":{"type":"string","description":"Where a page of stars continues, from nextCursor."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"login":{"type":"string"},"repos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"atoms":{"type":"array","items":{"type":"string","description":"An atom's key, such as 'lang:rust', 'about:subject:4127', or 'alt:subject:77'. It works as a filter."},"description":"The keys whose filter matches the repo, such as lang:javascript on a TypeScript repo, so counting them gives the number of repos each filter returns. A subject appears once two repos hold it. labels names each key."},"keywords":{"type":"array","items":{"type":"string"}},"starredAt":{"type":"string","description":"An ISO 8601 time in UTC."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The repo's star count, when Stargrep has read it."},"read":{"type":"boolean","description":"Whether Stargrep has summarized and embedded the repo, so search by meaning can find it."},"gone":{"type":"boolean","description":"Whether GitHub stopped serving the repo publicly."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","atoms","keywords","starredAt","stars","read","gone"],"additionalProperties":true},"description":"The login's stars, newest first."},"nextCursor":{"anyOf":[{"type":"string","description":"Where a page of stars continues, from nextCursor."},{"type":"null"}],"description":"Pass as cursor to read the next page, or null when this page is the last."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"The label of every atom key the repos list, such as 'lang:rust': 'Rust'."}},"required":["login","repos","nextCursor","labels"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has not synced this login's stars yet. Trigger a sync first.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccountNotSynced"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/facets":{"post":{"operationId":"lookupFacets","summary":"Find atoms by name","description":"Finds the atoms whose name starts with q, to pass as search's filter: kinds, languages, licenses, platforms, statuses, and subjects that at least two repos hold, most-held first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","maxLength":100,"description":"The start of a facet's name, such as 'postg'."},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"How many facets to return, at most. 10 when left out."}},"required":["q"],"additionalProperties":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"facets":{"type":"array","items":{"type":"object","properties":{"atom":{"type":"string","description":"An atom's key, such as 'lang:rust', 'about:subject:4127', or 'alt:subject:77'. It works as a filter."},"label":{"type":"string"},"repos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the atom's filter matches across Stargrep, from the last nightly count."}},"required":["atom","label","repos"],"additionalProperties":true},"description":"Most-held first."}},"required":["facets"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/people":{"get":{"operationId":"people","summary":"List people whose stars to explore","description":"Lists well-known GitHub users whose stars Stargrep has synced, with what their stars are about, a page at a time. Signed in, each person also says how many stars they share with you.","parameters":[{"in":"query","name":"sort","schema":{"type":"string","enum":["recently-active","most-like-you"],"description":"recently-active puts the latest star first. most-like-you puts first the people who share the most stars with the signed-in account for how many they star, and sorts as recently-active for anyone else. recently-active when left out."},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"description":"How many people to return, at most. 24 when left out."},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"maximum":10000,"description":"How many people to skip, from nextOffset. 0 when left out."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string","enum":["recently-active","most-like-you"],"description":"The order the people come in."},"people":{"type":"array","items":{"type":"object","properties":{"login":{"type":"string"},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's GitHub avatar, or null before Stargrep has read it."},"curated":{"type":"boolean","description":"Whether the account is one of the config's curated accounts."},"stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the account stars now, as Stargrep last synced them."},"lastStarredAt":{"type":"string","description":"When the account starred its newest repo."},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"share":{"type":"number","description":"The share of the account's stars in this language, from 0 to 1."}},"required":["language","share"],"additionalProperties":true},"description":"Up to 3 languages most of the account's stars are written in, most first."},"topics":{"type":"array","items":{"type":"string"},"description":"Up to 3 GitHub topics most of the account's stars carry, most first."},"shared":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many repos the account and the signed-in account both star, or null when no one is signed in or the signed-in account's stars have not synced yet."}},"required":["login","avatarUrl","curated","stars","lastStarredAt","languages","topics","shared"],"additionalProperties":true}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many people the list holds."},"nextOffset":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Pass as offset to read the next page, or null when this page is the last."}},"required":["sort","people","total","nextOffset"],"additionalProperties":true,"description":"Users with at least 5,000 followers and 40 current stars who starred something in the last 90 days, plus the curated accounts, as of the nightly refresh. A signed-in account is left out of its own list."}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/people/{login}/similar":{"get":{"operationId":"similarPeople","summary":"Find people with stars like a login's","description":"Returns the people on the people list whose stars overlap the most with a login's, for how many they star.","parameters":[{"in":"path","required":true,"name":"login","schema":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"Whose stars to compare with the people list's. The login must be synced first."}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":12,"description":"How many people to return, at most. 3 when left out."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"login":{"type":"string"},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's GitHub avatar, or null before Stargrep has read it."},"curated":{"type":"boolean","description":"Whether the account is one of the config's curated accounts."},"stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the account stars now, as Stargrep last synced them."},"lastStarredAt":{"type":"string","description":"When the account starred its newest repo."},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"share":{"type":"number","description":"The share of the account's stars in this language, from 0 to 1."}},"required":["language","share"],"additionalProperties":true},"description":"Up to 3 languages most of the account's stars are written in, most first."},"topics":{"type":"array","items":{"type":"string"},"description":"Up to 3 GitHub topics most of the account's stars carry, most first."},"shared":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the person and the login both star."}},"required":["login","avatarUrl","curated","stars","lastStarredAt","languages","topics","shared"],"additionalProperties":true},"description":"The people on the list who share the most stars with the login for how many they star, most alike first. The login itself and anyone who shares none are left out."}},"required":["people"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has not synced this login's stars yet. Trigger a sync first.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccountNotSynced"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/topics":{"get":{"operationId":"listTopics","summary":"List GitHub topics with a page","description":"Lists the GitHub topics Stargrep has a page for, the ones whose repos developers star the most first. Each topic's repos are searchable with search's topic scope.","parameters":[{"in":"query","name":"q","schema":{"type":"string","maxLength":50,"description":"Text the topic's name holds, such as 'react'. Every topic when left out."},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200,"description":"How many topics to return, at most. 60 when left out."},"allowEmptyValue":true,"allowReserved":true},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"maximum":10000,"description":"How many topics to skip, from nextOffset. 0 when left out."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"repos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the topic's search reads."},"ranked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos for or about the topic at least 3 of the developers Stargrep synced star."}},"required":["topic","repos","ranked"],"additionalProperties":true},"description":"Most ranked repos first. With q, the names that start with it come first."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many topics match."},"nextOffset":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Pass as offset to read the next page, or null when this page is the last."}},"required":["topics","total","nextOffset"],"additionalProperties":true,"description":"The GitHub topics that have a page, as of the nightly refresh."}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/topics/{topic}":{"get":{"operationId":"topic","summary":"Read a GitHub topic's page","description":"Returns a GitHub topic's repos ranked by how many synced developers star them, the apps built with it, related topics, and the people who star its repos.","parameters":[{"in":"path","required":true,"name":"topic","schema":{"type":"string","description":"A GitHub topic in lowercase, such as 'nextjs'. Another spelling, such as 'next-js', means the same topic."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","description":"The topic's own spelling, which may differ from the one asked for."},"repos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the topic's search reads."},"ranked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos for or about the topic at least 3 of the developers Stargrep synced star."},"home":{"anyOf":[{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"devs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the developers Stargrep synced star the repo."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"GitHub's star count, or null before Stargrep read it."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","devs","stars"],"additionalProperties":true},{"type":"null"}],"description":"The topic's own repo, such as vercel/next.js for nextjs."},"core":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"devs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the developers Stargrep synced star the repo."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"GitHub's star count, or null before Stargrep read it."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","devs","stars"],"additionalProperties":true},"description":"Repos for or about the topic, most starred by synced developers first. The home repo is left out."},"built":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"topics":{"type":"array","items":{"type":"string"}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The repo's primary kind, such as library or cli, or null when Stargrep has not placed it."},"archived":{"type":"boolean"},"pushedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 time in UTC."},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A square WebP on this API's origin, served as immutable, so the URL never shows other bytes."},"plate":{"type":"string","enum":["light","dark","none"],"description":"The tile to draw behind the icon. dark for white ink on transparent, light for black ink on transparent."},"size":{"type":"integer","minimum":1,"maximum":128,"description":"The icon's width and height in pixels, at most 128. Smaller when the source was smaller."}},"required":["url","plate","size"],"additionalProperties":true},{"type":"null"}],"description":"The repo's own icon, or null when Stargrep found none or has not looked yet."},"ownerType":{"anyOf":[{"type":"string","enum":["user","org"]},{"type":"null"}],"description":"Whether a user or an org owns the repo, or null before Stargrep has read it."},"ownerAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owner's GitHub avatar, or null before Stargrep has read it."},"devs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the developers Stargrep synced star the repo."},"stars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"GitHub's star count, or null before Stargrep read it."}},"required":["id","owner","name","url","description","summary","language","topics","license","kind","archived","pushedAt","icon","ownerType","ownerAvatarUrl","devs","stars"],"additionalProperties":true},"description":"Apps built with the topic, most starred by synced developers first. Empty unless at least 6 rank."},"related":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"repos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the topic's search reads."},"ranked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos for or about the topic at least 3 of the developers Stargrep synced star."}},"required":["topic","repos","ranked"],"additionalProperties":true},"description":"Topics whose repos overlap this one's the most, closest first."},"people":{"type":"array","items":{"type":"object","properties":{"login":{"type":"string"},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"repos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the topic's repos the person stars."},"stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many repos the person stars in all."}},"required":["login","avatarUrl","repos","stars"],"additionalProperties":true},"description":"People on the people list who star the most of the topic's repos for how many they star. Empty unless at least 5 qualify."}},"required":["topic","repos","ranked","home","core","built","related","people"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Stargrep has no page for this topic. A topic gets one once enough developers star its repos.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TopicNotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/topics/pages":{"post":{"operationId":"topicPages","summary":"Find which GitHub topics have a page","description":"Takes GitHub topics, such as a repo's, and answers the ones Stargrep has a page for, each with the topic its page is under, so next-js leads to nextjs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50,"description":"GitHub topics as a repo or an account carries them, at most 50."}},"required":["topics"],"additionalProperties":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string","description":"A topic as it was asked for."},"page":{"type":"string","description":"The topic whose page it leads to, for the topic's path."}},"required":["topic","page"],"additionalProperties":true},"description":"One entry for each topic asked for that has a page. Topics without one are left out."}},"required":["pages"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests from your network. Try again in a minute.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"Stargrep could not reach a service it needs. Try again shortly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}},"/config":{"get":{"operationId":"config","summary":"Read the public settings","description":"Returns the demo account and the queries the home page offers.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"demoLogin":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"The account whose stars the home page searches before anyone picks one."},"demoQuery":{"type":"string","description":"The query the home page answers before anyone types one."},"examples":{"type":"array","items":{"type":"string"},"description":"More queries that suit the demo account's stars."},"featured":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."},"description":"Accounts to offer when someone picks whose stars to search."},"curated":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z\\d][A-Za-z\\d-]{0,38}$","description":"A GitHub login, such as octocat."},"description":"A short pick of well-known accounts to show first. Each is on the people list whatever its rule says, once its stars are synced."}},"required":["demoLogin","demoQuery","examples","featured","curated"],"additionalProperties":true}}}},"400":{"description":"Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"500":{"description":"Stargrep failed to answer.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}}}}}}