# Flathub API
> The Linux desktop-app store — Flathub (Flatpak) — as an API. Look up any app by its reverse-DNS id for its name, summary and description, developer, license, categories, homepage / bug-tracker / donation links, latest version and release date, screenshot count and total install count; search the whole store by keyword; and read an app's install statistics, including last-month and last-7-day installs and the top countries. Every app comes with the exact `flatpak install` command. Covers the Linux desktop from Firefox, Blender, GIMP, OBS Studio and Inkscape to VLC, Krita and LibreOffice. Live from the official flathub.org API. Ideal for app catalogs and dashboards, software-center integrations, Linux developer tooling and install-analytics. Open data from Flathub.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/flathub-api/..."
```

## Pricing
- **Free** (Free) — 3,580 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 47,900 calls/Mo, 8 req/s
- **Pro** ($13/Mo) — 238,000 calls/Mo, 20 req/s
- **Mega** ($34/Mo) — 1,192,000 calls/Mo, 50 req/s

## Endpoints

### Flathub

#### `GET /v1/app` — App metadata + install count

**Parameters:**
- `id` (query, required, string) — Flatpak app id (reverse-DNS), e.g. org.mozilla.firefox Example: `org.mozilla.firefox`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flathub-api/v1/app?id=org.mozilla.firefox"
```

**Response:**
```json
{
    "data": {
        "app": {
            "id": "org.mozilla.firefox",
            "help": "https://support.mozilla.org/",
            "name": "Firefox",
            "install": "flatpak install flathub org.mozilla.firefox",
            "license": "MPL-2.0",
            "summary": "Fast, Private & Safe Web Browser",
            "donation": "https://donate.mozilla.org/",
            "homepage": "https://www.mozilla.org/firefox/",
            "keywords": [
                "Browser",
                "Explorer",
                "Internet"
            ],
            "developer": "Mozilla",
            "bugtracker": "https://bugzilla.mozilla.org/",
            "categories": [
                "Network",
                "WebBrowser"
            ],
            "description": "When it comes to your life online, you have a choice: accept the factory settings or put your privacy first. When you choose Firefox as your default browser, you’re choosing to protect your data while supporting an independent tech company. Firefox is also the only major browser backed by a non-profit fighting to give you more openness, transparency and control of your life online. Join hundreds of millions of people who choose to protect what's important by choosing Firefox - a web browser designed to be fast, easy to use, customizable and private.",
            "flathub_url": "https://flathub.org/apps/org.mozilla.firefox",
            "installs_total": 11464201,
            "latest_version": "151.0.2",
    
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search the store

**Parameters:**
- `q` (query, required, string) — Search term Example: `blender`
- `limit` (query, optional, string) — Results (1-100, default 20)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flathub-api/v1/search?q=blender"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "query": "blender",
        "results": [
            {
                "name": "Blender",
                "app_id": "org.blender.Blender",
                "license": "GPL-3.0",
                "summary": "Free and open source 3D creation suite",
                "developer": "Blender Foundation",
                "categories": [],
                "flathub_url": "https://flathub.org/apps/org.blender.Blender",
                "installs_last_month": 26892
            },
            {
                "name": "Bforartists",
                "app_id": "de.bforartists.Bforartists",
                "license": "GPL-3.0",
                "summary": "Blender but with a UX for artists",
                "developer": "Bforartists",
                "categories": [],
                "flathub_url": "https://flathub.org/apps/de.bforartists.Bforartists",
                "installs_last_month": 689
            },
            {
                "name": "UPBGE",
                "app_id": "org.upbge.UPBGE",
                "license": "GPL-3.0-only",
                "summary": "UPBGE is a free and open source 3D Game Engine integrated in Blender",
                "developer": "UPBGE Community",
                "categories": [],
                "flathub_url": "https://flathub.org/apps/org.upbge.UPBGE",
                "installs_last_month": 392
            },
            {
                "name": "OpenSCAD",
                "app_id": "org.openscad.OpenSCAD",
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/stats` — Install statistics + top countries

**Parameters:**
- `id` (query, required, string) — Flatpak app id, e.g. org.mozilla.firefox Example: `org.mozilla.firefox`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flathub-api/v1/stats?id=org.mozilla.firefox"
```

**Response:**
```json
{
    "data": {
        "stats": {
            "id": "org.mozilla.firefox",
            "flathub_url": "https://flathub.org/apps/org.mozilla.firefox",
            "top_countries": [
                {
                    "country": "US",
                    "installs": 1380749
                },
                {
                    "country": "DE",
                    "installs": 322097
                },
                {
                    "country": "GB",
                    "installs": 263814
                },
                {
                    "country": "BR",
                    "installs": 177089
                },
                {
                    "country": "RU",
                    "installs": 172157
                },
                {
                    "country": "CA",
                    "installs": 153712
                },
                {
                    "country": "FR",
                    "installs": 144620
                },
                {
                    "country": "ES",
                    "installs": 105986
                },
                {
                    "country": "AU",
                    "installs": 86678
                },
                {
                    "country": "PL",
                    "installs": 81847
                }
            ],
            "installs_total": 11464201,
            "installs_last_month": 187942,
            "installs_last_7_days": 35935
        }
    },
    "meta": {
        "timestamp"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Source & options

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flathub-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Live Flathub data. /v1/app = app metadata (summary, description, developer, license, categories, links, latest version, install count) + the flatpak install command; /v1/search = search the store; /v1/stats = install statistics with top countries. Apps are addressed by reverse-DNS id, e.g. org.mozilla.firefox.",
        "source": "Flathub — the Linux desktop-app store (Flatpak)",
        "endpoints": [
            "/v1/app",
            "/v1/search",
            "/v1/stats",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T13:49:01.942Z",
        "request_id": "2b27863a-ddc6-43e8-b948-3fc34040423a"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/flathub-api
OpenAPI spec: https://www.oanor.com/api/flathub-api/openapi.json
