# F-Droid API

> Returns F-Droid app packages and builds, search results, app pages and the repository index state.

Category: Developer & Tech. Region: global. 4 endpoints at `https://api.hoshime.com/v1/fdroid/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/fdroid
## GET /v1/fdroid/package

One F-Droid app: the suggested version and every build the index lists.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Android application id, such as org.fdroid.fdroid. (e.g. org.fdroid.fdroid) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `id` (string), `suggestedVersion` (string), `suggestedVersionCode` (integer (int64)), `versions` (Version[]), `versions[].code` (integer (int64)), `versions[].name` (string)

```bash
curl "https://api.hoshime.com/v1/fdroid/package?id=org.fdroid.fdroid" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/fdroid/search

F-Droid apps whose name or summary match the words.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as firefox. (e.g. firefox) |
| `limit` | integer | no | Items per page, 1 to 50. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `icon` (string), `id` (string), `name` (string), `summary` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/fdroid/search?query=firefox" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/fdroid/app

One F-Droid app's public page: its name, summary, description, license and project links.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Android application id, such as org.fdroid.fdroid. (e.g. org.fdroid.fdroid) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `icon` (string), `id` (string), `license` (string), `licenseUrl` (string), `links` (Link[]), `links[].label` (string), `links[].url` (string), `name` (string), `summary` (string)

```bash
curl "https://api.hoshime.com/v1/fdroid/app?id=org.fdroid.fdroid" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/fdroid/repo

The state of the F-Droid repository: when its index was built and how many apps it lists.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `indexSize` (integer (int64)), `maxAgeDays` (integer (int64)), `packages` (integer (int64)), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/fdroid/repo" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
