API documentation

You can query anything in the Debian sources, and get a JSON object which allows you to navigate into packages and source files.

The JSON result will be pretty-printed, unless the X-Requested-With header is set to XmlHttpRequest.


Package search

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

File search

You can look for duplicate files using their SHA-256 sum: http://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. http://sources.debian.net/api/ctag/?ctag=tag&package=packagename Specifying a package name is optional.

Package list

All packages


By prefix

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

Navigation in source folders and files

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

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

You can use http://sources.debian.net/api/src/packagename/latest to use automatically the latest available version of the package.

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 See example


Query the list of indexed source files by SHA256 hash: http://sources.debian.net/api/sha256/sha256. See example

Check the service status

Through the following URL: http://sources.debian.net/api/ping/.
You can check the "status" variable and/or the HTTP response.