API documentation

This API is not stable yet and, as such, has no associated version number. For the time being use this API at your own risk and keep an eye on this page for changes.
You can also check the documentation for the copyright API
You can also check the documentation for the patches API

You can query all information available in Debian Sources, and get a JSON object which allows you to navigate packages and source files programmaticaly.
The JSON result will be pretty-printed, unless the X-Requested-With HTTP header is set to XmlHttpRequest.

Note: wherever a specific version number is required, you can use the string "latest" instead to get redirected to the most recent version of the package.


Package search

By accessing the following URL: //sources.debian.net/api/search/query example

File search

You can search files by SHA-256 sum: //sources.debian.net/api/sha256/?checksum=sha256&package=packagename Specifying a package name is optional.

Code search

You can search within the code through tags. //sources.debian.net/api/ctag/?ctag=tag&package=packagename Specifying a package name is optional.

Package list

All packages

//sources.debian.net/api/list example

By prefix

//sources.debian.net/api/prefix/prefix example

Package information

List different versions of a package: //sources.debian.net/api/src/packagename example

Package information, including metrics, suites where is present, PTS link, and the like: //sources.debian.net/api/info/package/packagename/version example

Navigation in source folders and files

List folders and files in a folder: //sources.debian.net/api/src/packagename/version/path/to/folder example

Get information about a file (including the raw_url of the file, which allows you to retrieve its content): //sources.debian.net/api/src/packagename/version/path/to/file example

Check the service status

Check service status and retrieve last update timestamp: //sources.debian.net/api/ping/ example