# Sourcegraph API

Starting in [Sourcegraph 7.0](https://sourcegraph.com/changelog/releases/7.0), a new versioned external API is being introduced for custom integrations (see the [announcement](https://sourcegraph.com/changelog/sourcegraph-api)). The currently available API surface can be seen in `/api-reference` (e.g. `https://sourcegraph.example.com/api-reference`). From this page, integrators can view the available operations and download the OpenAPI schema. We are committed to supporting integrations built on top of these new APIs with backwards compatibility and migration assistance for breaking changes.

<Callout type="note">
	The new Sourcegraph API is a work in progress, and capabilities are
	gradually being ported over. If you have an integration you'd like to build
	that is not currently served by the new Sourcegraph API, please reach out at
	support@sourcegraph.com.
</Callout>

For specific types of integrations, Sourcegraph also offers the following APIs:

- [Sourcegraph streaming search API](/api/stream-api/), for consuming search results as a stream of events
- [Sourcegraph MCP server](/api/mcp/), for connecting AI agents and applications to Sourcegraph's code search capabilities
- [Sourcegraph Analytics API](/analytics/api/), for accessing your Sourcegraph Analytics data
- [Webhooks](/admin/webhooks/), for receiving event notifications from Sourcegraph

For diagnostics use cases, the [Sourcegraph GraphQL debug API](/api/graphql/) is also available without any compatibility guarauntees.

<Callout type="warning">
	<p>The Sourcegraph GraphQL API has historically been an internal interface
	without formal compatibility guarantees. For external integrations,
	[Sourcegraph 7.0](https://sourcegraph.com/changelog/releases/7.0) introduces a new, supported API at `/api-reference`.
	The GraphQL API remains available, but we recommend migrating to the
	new API for a stable integration experience.</p>

    <p>If you have a
    use case that is not currently served by the new Sourcegraph API, please
    reach out at support@sourcegraph.com.</p>

</Callout>
