Use the DeepSource GraphQL API to retrieve your data programmatically and easily automate your workflows.


For DeepSource Cloud:


For on-premise deployments:


where hostname refers to the hostname of the DeepSource dashboard.


Authenticate via a Personal Access Token (PAT). You need to pass it as a Bearer token in the Authorization header:

curl 'https://api.deepsource.io/graphql/' \
-H 'Authorization: Bearer <PERSONAL_ACCESS_TOKEN>' \
-H 'accept: application/json' \
-H 'content-type: application/json' \
--data '{ "query": "query { viewer { email } }" }'

Because GraphQL depends entirely on multiline JSON, we recommend that you use a GraphQL client like Altair or Insomnia. Note that the client wouldn't be able to perform requests or fetch the schema/documentation (which facilitates auto-complete) unless you add the Authorization header as above.

Rate Limits

Rate limits define the maximum number of requests a single user account can make within a given period of time. If the rate limit is exceeded, the API responds with a HTTP 429 Too Many Requests response code.

Rate limits are applied at the user level and calculated across both read and write operations.

Currently, we enforce a flat rate limit of 10,000 requests per hour.