# Homebrew cask API

Look up Homebrew casks by token, command or URL via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, token, and retrieve structured data including cask identifier, cask version, source download link, declared dependencies, and source disablement flag for cask inventory, and update preparation.

Documentation: https://openany.si/homebrew/homebrew-cask-api/a5fc3b1c-b909-4977-84c8-5d1b3ea2f50b/
API ID: a5fc3b1c-b909-4977-84c8-5d1b3ea2f50b
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/homebrew/v1/cask
Page update time: 2026-12-03T02:45:30.471Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:45:28.871Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## Homebrew Cask API

Set token to a cask identifier, supported brew install --cask command or formulae.brew.sh link. Version, download, dependencies and lifecycle fields describe the cask definition; the API does not run the command.

## What You Can Build

- **Cask inventory**: Record cask tokens, versions and lifecycle flags.
- **Update preparation**: Inspect declared dependencies and supported platforms before installation.

## Returned Data

| Field | Meaning |
| --- | --- |
| `token` | Cask identifier |
| `version` | Cask version |
| `download_url` | Source download link |
| `depends_on` | Declared dependencies |
| `disabled` | Source disablement flag |
| `supported_platforms` | Listed supported platforms |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Homebrew cask API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "Cask token (firefox), a `brew install --cask` command or a formulae.brew.sh link."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      },
      "required": [
        "token"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "analytics": {
      "type": "object",
      "properties": {
        "install": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "integer"
            },
            "365d": {
              "type": "integer"
            },
            "90d": {
              "type": "integer"
            }
          }
        },
        "install_by_option": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "object",
              "properties": {
                "firefox": {
                  "type": "integer"
                }
              }
            },
            "365d": {
              "type": "object",
              "properties": {
                "firefox": {
                  "type": "integer"
                }
              }
            },
            "90d": {
              "type": "object",
              "properties": {
                "firefox": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "artifacts": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "uninstall": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "quit": {
                      "type": "string"
                    }
                  }
                }
              },
              "app": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "target": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "auto_updates": {
      "type": "boolean"
    },
    "cached": {
      "type": "boolean"
    },
    "caveats": {
      "type": "null"
    },
    "conflicts_with": {
      "type": "object",
      "properties": {
        "cask": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "container": {
      "type": "null"
    },
    "credits_used": {
      "type": "integer"
    },
    "depends_on": {
      "type": "object",
      "properties": {
        "macos": {
          "type": "object",
          "properties": {}
        }
      }
    },
    "deprecated": {
      "type": "boolean"
    },
    "deprecation_date": {
      "type": "null"
    },
    "deprecation_reason": {
      "type": "null"
    },
    "description": {
      "type": "string"
    },
    "disable_date": {
      "type": "null"
    },
    "disable_reason": {
      "type": "null"
    },
    "disabled": {
      "type": "boolean"
    },
    "download_url": {
      "type": "string"
    },
    "full_token": {
      "type": "string"
    },
    "generated_date": {
      "type": "string"
    },
    "homepage": {
      "type": "string"
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "names": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "old_tokens": {
      "type": "array",
      "items": {}
    },
    "sha256": {
      "type": "string"
    },
    "source_file": {
      "type": "string"
    },
    "supported_platforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tap": {
      "type": "string"
    },
    "token": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/homebrew/v1/cask?output=json&token=firefox' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "analytics": {
    "install": {
      "30d": 13139,
      "365d": 183480,
      "90d": 33726
    },
    "install_by_option": {
      "30d": {
        "firefox": 13139
      },
      "365d": {
        "firefox": 183480
      },
      "90d": {
        "firefox": 33726
      }
    }
  },
  "artifacts": [
    {
      "uninstall": [
        {
          "quit": "org.mozilla.firefox"
        }
      ]
    },
    {
      "app": [
        "Firefox.app"
      ],
      "target": "/Applications/Firefox.app"
    },
    "… 2 more"
  ],
  "auto_updates": true,
  "cached": false,
  "caveats": null,
  "conflicts_with": {
    "cask": [
      "firefox@beta",
      "firefox@cn",
      "… 1 more"
    ]
  },
  "container": null,
  "credits_used": 1,
  "depends_on": {
    "macos": {}
  },
  "deprecated": false,
  "deprecation_date": null,
  "deprecation_reason": null,
  "description": "Web browser",
  "disable_date": null,
  "disable_reason": null,
  "disabled": false,
  "download_url": "https://download-installer.cdn.mozilla.net/pub/firefox/releases/159.0.1/mac/en-US/Firefox%20159.0.1.dmg",
  "full_token": "firefox",
  "generated_date": "2026-11-06",
  "homepage": "https://www.mozilla.org/firefox/",
  "languages": [
    "ach",
    "af",
    "… 101 more"
  ],
  "names": [
    "Mozilla Firefox"
  ],
  "old_tokens": [],
  "sha256": "0c214da4439c1eb4cea28a3c141ff112d511aa32c67f9d12e91116569c8d8dda",
  "source_file": "https://github.com/Homebrew/homebrew-cask/blob/main/Casks/f/firefox.rb",
  "supported_platforms": [
    "golden_gate",
    "arm64_golden_gate",
    "… 12 more"
  ],
  "tap": "homebrew/cask",
  "token": "firefox",
  "url": "https://formulae.brew.sh/cask/firefox",
  "version": "159.0.1"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Can I pass an installation command?
Yes. token accepts a cask token, supported brew install --cask command or formulae.brew.sh link; it is parsed as input rather than executed.

### Does this install an application?
No. It returns JSON metadata and a download link.

### How are deprecated and disabled different?
Preserve each lifecycle flag and its associated date or reason. Deprecation and disablement are separate source states.

### Does auto_updates refer to OpenAny caching?
No. It describes the application update behavior in the cask definition. Request caching uses fresh separately.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/homebrew/homebrew-cask-api/a5fc3b1c-b909-4977-84c8-5d1b3ea2f50b/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
