Debian Code Search API keys

Why get an API key at all?

The API works without a key, but then you are sharing resource limits with other users on your IP address or even network. Getting a personal API key gives you your own limits.

Our API keys encode an (encrypted) identity, which makes all API requests programmatically identifiable. This makes Debian Code Search more available:

  1. When the service would otherwise be overwhelmed by requests, instead of turning off the entire API, we can throttle or reject only requests coming in with an individual API key.
  2. Because the keys are personalized, we can reach out to the right person and resolve any issues as quickly as possible.

Your personal API key

🔑 After you log in via the salsa.debian.org GitLab instance,
you will see a personal API key file for download here.

If you need a non-personal API key for a CLI tool, web service, etc.,
please reach out to stapelberg@debian.org.

OpenAPI Specification, Client Libraries, Docs, Examples

The Debian Code Search API is described in an OpenAPI specification (OAS),
which you can use with various Swagger tools:

Documentation Browser

For your convenience, here is an embedded Swagger UI documentation browser:

(Embedded Swagger UI loading…)

OpenAPI spec URLs

This table lists all available Debian Code Search OpenAPI spec URLs:

Format OpenAPI version URL Note
YAML OpenAPI 2 https://codesearch.debian.net/openapi2.yaml Canonical

OpenAPI 2 is our canonical spec because one can derive OpenAPI 3 from it, but the other way around is not possible. As of September 2020, it is worthwhile to keep OpenAPI 2 around because some tools offer broader compatibility with it.

Table Of Contents
  1. Why get an API key at all?
  2. Your personal API key
  3. OpenAPI
    1. Documentation Browser
    2. Spec URLs