code-archive
Sourcegraph (public code search)
Code search across millions of public repositories, letting you find where a snippet, identifier, or string appears anywhere in open-source code. You search through the web UI; a GraphQL endpoint also answers public searches without a token. Useful whenever a question spans many codebases at once rather than a single project. The future of the free public tier is uncertain after the company's closed-source pivot, so treat it as a convenience that may change.
No programmatic check, opens the archive’s own search.
Why it’s useful & how it works
Sourcegraph's public code search lets you run a single query across millions of repositories at once, finding every place a function name, string literal, or code pattern appears in open-source code. It supports regular expressions, structural search, and language-specific filters, making it far more expressive than a plain web search. The web interface is open to anyone without an account, and the underlying GraphQL endpoint also accepts public queries. Because the company has shifted focus toward its Cody AI product, the future of the free public tier is uncertain, so treat it as a powerful but potentially temporary convenience.
What’s inside
Approximately 2.8 million public repositories indexed across GitHub, GitLab, and other code hosts, with precise code navigation enabled for a growing subset.
API access
GraphQL https://sourcegraph.com/.api/graphql (POST; public search needs no token)
What we measured
Our own probes, not the archive’s own claims. Re-run periodically; every reading below is dated.
Reachability
- Direct request
- Responded HTTP 200 517 ms
- Through a datacenter proxy
- Responded HTTP 200 645 ms
- API, direct
- Not found HTTP 404 165 ms
- API, through a proxy
- Not found HTTP 404 616 ms
Reachability measured 2026-08-22.
Access
Programmatic API access (a key may be required, see the API tag).