# Homebrew formula API

Get Homebrew formula metadata by name, command or URL via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as name, output, and retrieve structured data including formula name, stable version metadata, runtime dependencies, build-time dependencies, and bottle target platform for dependency review, and artifact index.

Documentation: https://openany.si/homebrew/homebrew-formula-api/4296e9b3-3f44-4bbd-a1ed-e67e89fb81e7/
API ID: 4296e9b3-3f44-4bbd-a1ed-e67e89fb81e7
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/homebrew/v1/formula
Page update time: 2026-12-03T02:45:30.483Z
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.963Z. 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 Formula API

Use name to resolve a formula. The JSON separates runtime and build dependencies, source metadata, and platform-specific bottles so that a bottle entry is not mistaken for a universal binary.

## What You Can Build

- **Dependency review**: Keep runtime, build and test dependencies separate.
- **Artifact index**: Associate source checksums and bottle metadata with formula versions.

## Returned Data

| Field | Meaning |
| --- | --- |
| `name` | Formula name |
| `version` | Stable version metadata |
| `dependencies` | Runtime dependencies |
| `build_dependencies` | Build-time dependencies |
| `bottles[].platform` | Bottle target platform |
| `source_checksum` | Source checksum |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Homebrew formula 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": {
        "name": {
          "type": "string",
          "description": "Formula name (wget), a `brew install` 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": [
        "name"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "aliases": {
      "type": "array",
      "items": {}
    },
    "analytics": {
      "type": "object",
      "properties": {
        "build_error": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "integer"
            }
          }
        },
        "build_error_by_option": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "install": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "integer"
            },
            "365d": {
              "type": "integer"
            },
            "90d": {
              "type": "integer"
            }
          }
        },
        "install_by_option": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            },
            "365d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            },
            "90d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "install_on_request": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "integer"
            },
            "365d": {
              "type": "integer"
            },
            "90d": {
              "type": "integer"
            }
          }
        },
        "install_on_request_by_option": {
          "type": "object",
          "properties": {
            "30d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            },
            "365d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            },
            "90d": {
              "type": "object",
              "properties": {
                "wget": {
                  "type": "integer"
                },
                "wget --HEAD": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "bottle_platforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "bottles": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "cellar": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "build_dependencies": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cached": {
      "type": "boolean"
    },
    "caveats": {
      "type": "null"
    },
    "conflicts_with": {
      "type": "array",
      "items": {}
    },
    "conflicts_with_reasons": {
      "type": "array",
      "items": {}
    },
    "credits_used": {
      "type": "integer"
    },
    "dependencies": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "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"
    },
    "full_name": {
      "type": "string"
    },
    "generated_date": {
      "type": "string"
    },
    "has_bottle": {
      "type": "boolean"
    },
    "head": {
      "type": "string"
    },
    "head_url": {
      "type": "string"
    },
    "homepage": {
      "type": "string"
    },
    "keg_only": {
      "type": "boolean"
    },
    "keg_only_reason": {
      "type": "null"
    },
    "license": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "old_names": {
      "type": "array",
      "items": {}
    },
    "optional_dependencies": {
      "type": "array",
      "items": {}
    },
    "recommended_dependencies": {
      "type": "array",
      "items": {}
    },
    "requirements": {
      "type": "array",
      "items": {}
    },
    "revision": {
      "type": "integer"
    },
    "service": {
      "type": "null"
    },
    "source_checksum": {
      "type": "string"
    },
    "source_file": {
      "type": "string"
    },
    "source_url": {
      "type": "string"
    },
    "tap": {
      "type": "string"
    },
    "test_dependencies": {
      "type": "array",
      "items": {}
    },
    "uses_from_macos": {
      "type": "array",
      "items": {}
    },
    "version": {
      "type": "string"
    },
    "versioned_formulae": {
      "type": "array",
      "items": {}
    },
    "…": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/homebrew/v1/formula?name=wget&output=json' \
  -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
{
  "aliases": [],
  "analytics": {
    "build_error": {
      "30d": 21
    },
    "build_error_by_option": {
      "30d": {
        "wget": 6,
        "wget --HEAD": 15
      }
    },
    "install": {
      "30d": 35541,
      "365d": 325180,
      "90d": 92122
    },
    "install_by_option": {
      "30d": {
        "wget": 35473,
        "wget --HEAD": 68
      },
      "365d": {
        "wget": 324572,
        "wget --HEAD": 608
      },
      "90d": {
        "wget": 91935,
        "wget --HEAD": 187
      }
    },
    "install_on_request": {
      "30d": 35296,
      "365d": 321241,
      "90d": 91385
    },
    "install_on_request_by_option": {
      "30d": {
        "wget": 35228,
        "wget --HEAD": 68
      },
      "365d": {
        "wget": 320633,
        "wget --HEAD": 608
      },
      "90d": {
        "wget": 91198,
        "wget --HEAD": 187
      }
    }
  },
  "bottle_platforms": [
    "arm64_golden_gate",
    "arm64_tahoe",
    "… 3 more"
  ],
  "bottles": [
    {
      "cellar": "/opt/homebrew/Cellar",
      "platform": "arm64_golden_gate",
      "sha256": "d89ea78fbc8ec79a80d52c7dcaa28e50c2bb435acd1470ee2cae4ef7646eff7e",
      "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:d89ea78fbc8ec79a80d52c7dcaa28e50c2bb435acd1470ee2cae4ef7646eff7e"
    },
    {
      "cellar": "/opt/homebrew/Cellar",
      "platform": "arm64_tahoe",
      "sha256": "38024004cafd418d1ce2e2cd6b11ecf8a5e6a24d2641ba624dd016bb650d2240",
      "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:38024004cafd418d1ce2e2cd6b11ecf8a5e6a24d2641ba624dd016bb650d2240"
    },
    "… 3 more"
  ],
  "build_dependencies": [
    "pkgconf"
  ],
  "cached": false,
  "caveats": null,
  "conflicts_with": [],
  "conflicts_with_reasons": [],
  "credits_used": 1,
  "dependencies": [
    "libidn2",
    "libpsl",
    "… 3 more"
  ],
  "deprecated": false,
  "deprecation_date": null,
  "deprecation_reason": null,
  "description": "Internet file retriever",
  "disable_date": null,
  "disable_reason": null,
  "disabled": false,
  "full_name": "wget",
  "generated_date": "2026-11-06",
  "has_bottle": true,
  "head": "HEAD",
  "head_url": "https://git.savannah.gnu.org/git/wget.git",
  "homepage": "https://www.gnu.org/software/wget/",
  "keg_only": false,
  "keg_only_reason": null,
  "license": "GPL-3.0-or-later",
  "name": "wget",
  "old_names": [],
  "optional_dependencies": [],
  "recommended_dependencies": [],
  "requirements": [],
  "revision": 2,
  "service": null,
  "source_checksum": "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784",
  "source_file": "https://github.com/Homebrew/homebrew-core/blob/main/Formula/w/wget.rb",
  "source_url": "https://ftpmirror.gnu.org/wget/wget-1.25.0.tar.gz",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version": "1.25.0",
  "versioned_formulae": [],
  "…": "4 more fields"
}
```

## 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 use a brew install command as input?
Yes. name accepts a formula name, supported brew install command or formulae.brew.sh link. The command is not executed.

### Are build_dependencies runtime requirements?
They are separately declared build dependencies. Keep them distinct from dependencies and optional or test dependencies.

### Is every bottle suitable for every system?
No. Match each bottle platform and other requirements to the target system.

### Does the formula revision identify the upstream version?
No. Keep the formula revision distinct from version; a packaging revision can change without changing the upstream version string.

### 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-formula-api/4296e9b3-3f44-4bbd-a1ed-e67e89fb81e7/

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