# Homebrew API
> The macOS and Linux package manager — Homebrew (brew) — as an API. Look up any formula (command-line package) for its description, latest version, license, homepage, dependencies and build dependencies, caveats and deprecation status; look up any cask (graphical macOS app) for its version, bundled apps and homepage; and search the whole registry of 8,300+ formulae and 7,600+ casks by name and description. Each result comes with the exact `brew install` command. Covers the Homebrew world from wget, git, ffmpeg, node and python to Firefox, Visual Studio Code, Docker and Rectangle. Live from the official formulae.brew.sh API. Ideal for developer dashboards, package and dependency tooling, dotfiles and setup automation, and macOS app catalogs. Open data from Homebrew.

## 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/brew-api/..."
```

## Pricing
- **Free** (Free) — 3,660 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 49,800 calls/Mo, 8 req/s
- **Pro** ($14/Mo) — 243,000 calls/Mo, 20 req/s
- **Mega** ($36/Mo) — 1,212,000 calls/Mo, 50 req/s

## Endpoints

### Homebrew

#### `GET /v1/cask` — Cask (GUI app) detail

**Parameters:**
- `name` (query, required, string) — Cask token, e.g. firefox Example: `firefox`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/brew-api/v1/cask?name=firefox"
```

**Response:**
```json
{
    "data": {
        "cask": {
            "tap": "homebrew/cask",
            "url": "https://download-installer.cdn.mozilla.net/pub/firefox/releases/151.0.2/mac/en-US/Firefox%20151.0.2.dmg",
            "apps": [
                "Firefox.app"
            ],
            "desc": "Web browser",
            "name": [
                "Mozilla Firefox"
            ],
            "token": "firefox",
            "install": "brew install --cask firefox",
            "version": "151.0.2",
            "brew_url": "https://formulae.brew.sh/cask/firefox",
            "disabled": false,
            "homepage": "https://www.mozilla.org/firefox/",
            "deprecated": false,
            "auto_updates": true,
            "deprecation_reason": null
        }
    },
    "meta": {
        "timestamp": "2026-05-31T13:40:25.113Z",
        "request_id": "18ecf5f1-312b-4dd7-ba69-8c43e453fd61"
    },
    "status": "ok",
    "message": "Cask retrieved",
    "success": true
}
```

#### `GET /v1/formula` — Formula (CLI package) detail

**Parameters:**
- `name` (query, required, string) — Formula name, e.g. wget Example: `wget`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/brew-api/v1/formula?name=wget"
```

**Response:**
```json
{
    "data": {
        "formula": {
            "tap": "homebrew/core",
            "desc": "Internet file retriever",
            "name": "wget",
            "aliases": [],
            "caveats": null,
            "install": "brew install wget",
            "license": "GPL-3.0-or-later",
            "version": "1.25.0",
            "brew_url": "https://formulae.brew.sh/formula/wget",
            "disabled": false,
            "homepage": "https://www.gnu.org/software/wget/",
            "full_name": "wget",
            "deprecated": false,
            "has_bottle": true,
            "dependencies": [
                "libidn2",
                "openssl@3",
                "gettext",
                "libunistring"
            ],
            "conflicts_with": [],
            "build_dependencies": [
                "pkgconf"
            ],
            "deprecation_reason": null
        }
    },
    "meta": {
        "timestamp": "2026-05-31T13:40:25.315Z",
        "request_id": "14f8e06c-ace0-474d-8973-6e272d1a3a4c"
    },
    "status": "ok",
    "message": "Formula retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search formulae and casks

**Parameters:**
- `q` (query, required, string) — Search term Example: `browser`
- `type` (query, optional, string) — formula | cask | all (default all)
- `limit` (query, optional, string) — Results (1-100, default 20)

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

**Response:**
```json
{
    "data": {
        "type": "all",
        "count": 20,
        "query": "browser",
        "total": 168,
        "results": [
            {
                "desc": "Shortcuts for your browser",
                "name": "Browser Actions",
                "type": "cask",
                "token": "browser-actions",
                "install": "brew install --cask browser-actions",
                "version": "2025.2.0,5186",
                "brew_url": "https://formulae.brew.sh/cask/browser-actions"
            },
            {
                "desc": "Command palette in any application",
                "name": "Browser Deputy",
                "type": "cask",
                "token": "browser-deputy",
                "install": "brew install --cask browser-deputy",
                "version": "1.10",
                "brew_url": "https://formulae.brew.sh/cask/browser-deputy"
            },
            {
                "desc": "Open-source agentic browser",
                "name": "BrowserOS",
                "type": "cask",
                "token": "browseros",
                "install": "brew install --cask browseros",
                "version": "0.44.0.1",
                "brew_url": "https://formulae.brew.sh/cask/browseros"
            },
            {
                "desc": "Open-source browser prompter",
                "name": "Browserosaurus",
                "type": "cask",
                "token": "browserosaurus",
                "install": "brew install --cask bro
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Homebrew packages. /v1/formula = live CLI-package detail (desc, license, version, dependencies, caveats, deprecation); /v1/cask = live GUI-app detail (version, apps, homepage); /v1/search = search the bundled index of formulae and casks (type=formula|cask|all).",
        "source": "Homebrew — the macOS / Linux package manager (formulae.brew.sh)",
        "endpoints": [
            "/v1/formula",
            "/v1/cask",
            "/v1/search",
            "/v1/meta"
        ],
        "total_casks": 7677,
        "total_formulae": 8385
    },
    "meta": {
        "timestamp": "2026-05-31T13:40:25.468Z",
        "request_id": "1783fd0d-412b-4695-a84a-5279723c605c"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


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