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 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.

Search

Package search

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

File search

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

Code search

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

Package list

All packages

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

By prefix

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

Package information

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

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

Navigation in source folders and files

List folders and files in a folder: http://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): http://sources.debian.net/api/src/packagename/version/path/to/file example

Check the service status

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