Search Jobs in the Sourcegraph API
Run exhaustive, codebase-wide searches from your own integrations with Search Jobs in the Sourcegraph API.

Run exhaustive, codebase-wide searches from your own integrations with Search Jobs in the Sourcegraph API.
Search Jobs have landed in the Sourcegraph API. A Search Job runs your query across every repository, branch, and revision in your codebase. Use it for audits, security reviews, and large scale migrations.

Search Jobs are served from the versioned /api/ endpoints and authenticated with access tokens scoped to externalapi:read and externalapi:write. Jobs run asynchronously, and results are available as JSONL once a job completes. Each token only sees and manages its own jobs.
You can explore the available operations and download the OpenAPI schema from the searchjobs service section of the interactive API reference at /api-reference (e.g. https://sourcegraph.example.com/api-reference).
The Search Jobs operations in the Sourcegraph GraphQL API, now the debug API, remain available and unchanged. For long-term support and a stable integration experience, we recommend building on the new Sourcegraph API instead.
If you have any feedback, please reach out to support@sourcegraph.com.