The API is accessible via https://f-droid.org/api.
For now only https://f-droid.org/api/v1/packages
exists, which can be used to query information about the applications in the main repository. Archived applications can’t be accessed this way.
Example request:
GET https://f-droid.org/api/v1/packages/org.fdroid.fdroid HTTP/1.1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"packageName": "org.fdroid.fdroid",
"suggestedVersionCode": 1009000,
"packages": [
{
"versionName": "1.10-alpha0",
"versionCode": 1010000
},
{
"versionName": "1.9",
"versionCode": 1009000
}
]
}
This API is already used by shields.io project to provide F-Droid badges, like this.
As you may notice, only a small amount of data may be retrieved from this API. That’s normal, because it was designed to be extendible. It might be possible to expand its functionality in the future if someone will be needed in more details.
You can always create an issue or open a merge request on F-Droid / Website GitLab project page, if you want to ask something or contribute.