# Flathub API

> Returns Flathub Linux apps: search, app details, curated collections, install statistics, categories and build summaries.

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

Flathub apps matching a search, most relevant first.

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 | Number of apps, from 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: `category` (string), `developer` (string), `freeLicense` (boolean), `id` (string), `installsLastMonth` (integer (int64)), `keywords` (Keyword[]), `keywords[].name` (string), `license` (string), `name` (string), `releasedAt` (string), `summary` (string), `updatedAt` (string), `version` (string)

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

## GET /v1/flathub/app

One Flathub app by its application id: summary, license, keywords and latest release.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Application id, such as org.mozilla.firefox. (e.g. org.mozilla.firefox) |
| `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: `category` (string), `developer` (string), `freeLicense` (boolean), `id` (string), `installsLastMonth` (integer (int64)), `keywords` (Keyword[]), `keywords[].name` (string), `license` (string), `name` (string), `releasedAt` (string), `summary` (string), `updatedAt` (string), `version` (string)

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

## GET /v1/flathub/collection

One of Flathub's published lists of apps: popular, recently-added, recently-updated, trending, verified or mobile.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `collection` | string | no | Which list: popular, recently-added, recently-updated, trending, verified or mobile. (one of popular, recently-added, recently-updated, trending, verified, mobile; default popular; e.g. popular) |
| `limit` | integer | no | Number of apps, from 1 to 50. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `category` (string), `developer` (string), `freeLicense` (boolean), `id` (string), `installsLastMonth` (integer (int64)), `keywords` (Keyword[]), `keywords[].name` (string), `license` (string), `name` (string), `releasedAt` (string), `summary` (string), `updatedAt` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/flathub/collection?collection=popular" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/flathub/stats

Install counts of one Flathub app: the totals and the daily series of recent days.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Application id, such as org.mozilla.firefox. (e.g. org.mozilla.firefox) |
| `days` | integer | no | How many recent days of the daily series, from 1 to 365. (default 30) |
| `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: `daily` (Install[]), `daily[].date` (string), `daily[].installs` (integer (int64)), `id` (string), `installsLast7Days` (integer (int64)), `installsLastMonth` (integer (int64)), `installsTotal` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/flathub/stats?id=org.mozilla.firefox" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/flathub/category

The Flathub apps in one category, most popular first. Page with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `category` | string | yes | Category: audiovideo, development, education, healthfitness, game, graphics, network, office, science, system or utility. (one of audiovideo, development, education, healthfitness, game, graphics, network, office, science, system, utility; e.g. game) |
| `limit` | integer | no | Number of apps, from 1 to 50. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `category` (string), `developer` (string), `freeLicense` (boolean), `id` (string), `installsLastMonth` (integer (int64)), `keywords` (Keyword[]), `keywords[].name` (string), `license` (string), `name` (string), `releasedAt` (string), `summary` (string), `updatedAt` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/flathub/category?category=game" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/flathub/summary

The newest stable build of a Flathub app: its size, architectures, runtime and launch command.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Application id, such as org.mozilla.firefox. (e.g. org.mozilla.firefox) |
| `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: `arches` (string[]), `branch` (string), `built` (string), `command` (string), `downloadSize` (integer (int64)), `installedSize` (integer (int64)), `runtime` (string), `sdk` (string)

```bash
curl "https://api.hoshime.com/v1/flathub/summary?id=org.mozilla.firefox" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/flathub/developer

The Flathub apps published by one developer or publisher, by the developer name as the app page shows it, such as Mozilla. Page with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Developer name as the app's page shows it, such as Mozilla or Valve Corporation. (e.g. Mozilla) |
| `limit` | integer | no | Number of apps, from 1 to 50. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `category` (string), `developer` (string), `freeLicense` (boolean), `id` (string), `installsLastMonth` (integer (int64)), `keywords` (Keyword[]), `keywords[].name` (string), `license` (string), `name` (string), `releasedAt` (string), `summary` (string), `updatedAt` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/flathub/developer?name=Mozilla" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
