Sourcegraph GraphQL API
The historical GraphQL API used by most Sourcegraph integrations to date. It is still available but Sourcegraph now recommends migrating to the versioned REST API for compatibility guarantees. Also exposed as a debug surface inside each instance.
Overview
Sourcegraph GraphQL API is a GraphQL API specification published by Sourcegraph on the APIs.io network.
The historical GraphQL API used by most Sourcegraph integrations to date. It is still available but Sourcegraph now recommends migrating to the versioned REST API for compatibility guarantees. Also exposed as a debug surface inside each instance.
documentation is published at https://sourcegraph.com/api/graphql.
The specification includes 2 reference links.
Tagged areas include Code Intelligence, Code Search, Cody, AMP, and AI Coding Agent.
Endpoint
References
- Documentation https://sourcegraph.com/docs/api
- APIReference https://sourcegraph.com/api/graphql
Work with this as data
Every GraphQL schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for graphql
4 MCP tools reach this
find_graphqlBrowse and filter every GraphQL schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/graphql/sourcegraph-graphql"
curl "https://apis.io/api/v1/graphql?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.