| layout | page | ||
|---|---|---|---|
| permalink | /docs/api/ | ||
| redirect_from |
|
List the brew info --json output for all current {{ site.taps.core.fullname }} formulae or {{ site.taps.cask.fullname }} casks.
curl https://formulae.brew.sh/api/formula.json
curl https://formulae.brew.sh/api/cask.json{% include api-samples/formula.md %}
Get the brew info --json --formula <formula> output for a single, current {{ site.taps.core.fullname }} formula with extra keys containing analytics data and generation date.
curl https://formulae.brew.sh/api/formula/${FORMULA}.jsonVariables:
${FORMULA}: the name of the formula, e.g.wget
{% include api-samples/formula_wget.md %}
Get the brew info --json=v2 --cask <cask> JSON output for a single, current {{ site.taps.cask.fullname }} cask with extra keys containing analytics data and generation date.
curl https://formulae.brew.sh/api/cask/${CASK}.jsonVariables:
${CASK}: the name of the cask, e.g.docker-desktop
{% include api-samples/cask_docker_desktop.md %}
List all analytics events for a specified category over a number of days, ordered by event frequency count. This is the data source for brew info --analytics.
curl https://formulae.brew.sh/api/analytics/${CATEGORY}/${DAYS}.jsonVariables:
${CATEGORY}: the analytics event category, i.e.install: the installation of all formulaeinstall-on-request: the requested installation of all formulae (i.e. not as a dependency of other formulae)build-error: the installation failure of all formulae
${DAYS}: the number of days of analytics events, i.e.30d: 30 days90d: 90 days365d: 365 days
{% include api-samples/analytics_install_30d.md %}
List all the {{ site.taps.core.fullname }} formulae's analytics events for a specified category over a number of days, grouped by formula name. This is the data source for brew info --analytics --formula <formula>.
curl https://formulae.brew.sh/api/analytics/${CATEGORY}/homebrew-core/${DAYS}.jsonVariables:
${CATEGORY}: the analytics event category, i.e.install: the installation of all {{ site.taps.core.repository }} formulaeinstall-on-request: the requested installation of all {{ site.taps.core.repository }} formulae (i.e. not as a dependency of other formulae)build-error: the installation failure of all {{ site.taps.core.repository }} formulae- only
${DAYS}: 30d(30 days) is available
- only
${DAYS}: the number of days of analytics events, i.e.30d: 30 days90d: 90 days365d: 365 days
{% include api-samples/analytics_install_homebrew_core_30d.md %}
List all the {{ site.taps.cask.fullname }} cask's analytics events for the cask-install category over a number of days, grouped by cask token.
This is the data source for brew info --analytics --cask <cask>.
curl https://formulae.brew.sh/api/analytics/cask-install/homebrew-cask/${DAYS}.jsonVariables:
${DAYS}: the number of days of analytics events, i.e.30d: 30 days90d: 90 days365d: 365 days
{% include api-samples/analytics_cask_install_homebrew_cask_30d.md %}