Table of contents

Sources

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: //sources.debian.org/api/search/query example

File search

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

Code search

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

Package list

All packages

//sources.debian.org/api/list example

By prefix

//sources.debian.org/api/prefix/prefix example

Package information

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

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

Navigation in source folders and files

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

Check the service status

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

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

File search

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

Path search

The URL for a path search is: //sources.debian.org/copyright/api/file/packagename/version/path Both package name and version are required parameters. See example

Batch search

The URL for a batch (many files) search is: //sources.debian.org/copyright/api/sha256/ The API accepts an HTTP POST request. The data must be form-encoded, repeating the checksum parameter for multiple values. For example, if you are using python requests to create the POST request then the dictionnary containing the values should have the following structure:

{
    "checksums": [SUM1, SUM2, SUM3, ...],
    "package": PACKAGE,
    "suite": SUITE
}
Package and suite parameters are optional.

Package list

All packages

//sources.debian.org/copyright/api/list example

By prefix

//sources.debian.org/copyright/api/prefix/prefix example

Check the service status

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

Patches

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.

Patches

Package summary

You can retrieve a summary for a package: //sources.debian.org/patches/api/packagename/version The package summary contains the names of the patches and some basic information about the package
example

Patch view

The URL for a patch view is: //sources.debian.org/patches/api/packagename/version/path Both package name and version are required parameters. The path is the relative path of the patch starting from the debian/patches directory.
This query retrieves the file-deltas, the description and the bug number if they exist. See example

Package list

All packages

//sources.debian.org/patches/api/list example

By prefix

//sources.debian.org/patches/api/prefix/prefix example

Check the service status

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