# Homebrew Packages & Install Analytics Scraper (Formulae/Casks) (`scrapers_lat/homebrew-packages-analytics-scraper`) Actor

Scrape Homebrew formulae and macOS casks: description, homepage, license, version, dependencies and REAL 30/90/365-day install analytics with rank. Search or list top packages, get reverse dependents and AI summaries. Export JSON, CSV, Excel.

- **URL**: https://apify.com/scrapers\_lat/homebrew-packages-analytics-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.32 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![Homebrew Packages & Install Analytics Scraper](https://scrapers.lat/banners/homebrew-packages-analytics-scraper.png)](https://apify.com/scrapers_lat/homebrew-packages-analytics-scraper)

## Homebrew Packages & Install Analytics Scraper

Turn the Homebrew ecosystem into structured, ranked package intelligence. This actor pairs full **formula** (CLI tools and libraries) and **cask** (macOS apps) metadata with the **official Homebrew install analytics**: real 30, 90 and 365 day install counts plus leaderboard rank. Browse the most-installed packages, look up specific packages, or search by name and description. Optional add-ons compute reverse dependents (supply-chain impact) and an AI summary of each package.

Perfect for developer-tool market research, package popularity ranking, dependency and supply-chain analysis, and developer marketing (which CLI tools and macOS apps developers actually install).

### What you get

- **Real install analytics** - 30d / 90d / 365d install counts and the leaderboard rank for each package.
- **Full metadata** - description, homepage, license, latest version, tap, deprecated / disabled / keg-only flags.
- **Dependencies** - runtime and build dependencies for every formula.
- **Cask fields** - version and auto-updates flag for macOS apps.
- **Reverse dependents (add-on)** - which other formulae depend on a package, with a count and a sample list.
- **AI summary (add-on)** - what the package is, its category, what it is an alternative to, and its target user.
- Export to **JSON, CSV or Excel**.

### Example output

```json
{
  "name": "openssl@3",
  "type": "formula",
  "description": "Cryptography and SSL/TLS Toolkit",
  "homepage": "https://openssl.org/",
  "license": "Apache-2.0",
  "latestVersion": "3.6.3",
  "dependencies": ["ca-certificates"],
  "buildDependencies": [],
  "deprecated": false,
  "deprecationReason": null,
  "disabled": false,
  "kegOnly": false,
  "tap": "homebrew/core",
  "caskVersion": null,
  "autoUpdates": null,
  "installs30d": 522254,
  "installs90d": 1455561,
  "installs365d": 5656093,
  "installRank": 2,
  "dependentCount": 524,
  "dependents": ["adios2", "afflib", "alpine", "amber", "..."],
  "aiWhatItIs": null,
  "aiCategory": null,
  "aiAlternativeTo": null,
  "aiTargetUser": null,
  "observedAt": "2026-08-17T09:20:00.000Z",
  "error": null
}
```

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | `top` (most-installed leaderboard), `package` (specific names), or `search` (name / description contains). Default `top`. |
| `type` | select | `formula` (CLI tools / libraries) or `cask` (macOS apps). Default `formula`. |
| `names` | array | Exact package names for `package` mode, for example `git`, `wget`, `google-chrome`. |
| `query` | string | Text to match in name or description for `search` mode. |
| `analyticsWindow` | select | `30d`, `90d` or `365d` - window used to rank top results and attach counts and rank. Default `30d`. |
| `includeDependents` | boolean | Add-on: attach reverse dependents to each formula (count + sample). Paid plans only. Default off. |
| `withAiSummary` | boolean | Add-on: attach an AI summary to each package. Paid plans only. Default off. |
| `maxResults` | integer | Maximum number of packages to return. |

### Output fields

| Field | Description |
|-------|-------------|
| `name` | Package name or cask token |
| `type` | `formula` or `cask` |
| `description` | Short package description |
| `homepage` | Project homepage URL |
| `license` | SPDX license (formulae) |
| `latestVersion` | Latest stable version |
| `dependencies` | Runtime dependencies (formulae) |
| `buildDependencies` | Build-time dependencies (formulae) |
| `deprecated` / `deprecationReason` | Deprecation flag and reason |
| `disabled` / `kegOnly` | Disabled and keg-only flags |
| `tap` | Homebrew tap |
| `caskVersion` / `autoUpdates` | Version and auto-update flag (casks) |
| `installs30d` / `installs90d` / `installs365d` | Install counts per window (integers, null if unavailable) |
| `installRank` | Rank in the chosen window leaderboard (null if not ranked) |
| `dependentCount` / `dependents` | Reverse dependents (add-on) |
| `aiWhatItIs` / `aiCategory` / `aiAlternativeTo` / `aiTargetUser` | AI summary fields (add-on) |
| `observedAt` | Collection timestamp |
| `error` | Error message if a package could not be fetched (unbilled) |

### Use cases

- **Developer tools research** - rank CLI tools and libraries by real install volume across 30, 90 and 365 day windows.
- **Package popularity tracking** - monitor which formulae and macOS apps are trending up or down.
- **Dependency and supply-chain analysis** - map runtime and build dependencies, and use reverse dependents to see the blast radius of a package.
- **Developer marketing** - find which tools and apps your target developers already install and where your product fits.
- **Competitive and category research** - pair AI summaries with install counts to size categories and spot alternatives.

### Billing

This actor uses pay-per-event pricing. You are never charged for failed lookups.

| Event | Price (USD) | When it is charged |
|-------|-------------|--------------------|
| `result` | $0.008 | Per package record returned |
| `dependents` | $0.008 | Per formula enriched with reverse dependents (opt-in add-on) |
| `ai_summary` | $0.012 | Per package with a successful AI summary (opt-in add-on) |

Free Apify users are capped at 10 results per run and cannot use the paid add-ons.

### Data source and honest limitations

- Data comes from the public, keyless Homebrew formulae API. Install counts are Homebrew's own opt-in analytics, so they reflect users who did not disable analytics, not every install on earth.
- `installRank` is only present when the package appears in the chosen window leaderboard; less-popular packages may have a rank of null while still reporting install counts.
- `dependents` covers formula-to-formula dependencies from the core catalog; it does not include casks or third-party taps outside the main list.
- License and dependency fields apply to formulae; casks expose version and auto-updates instead.

# Actor input Schema

## `mode` (type: `string`):

How to select packages. 'top' returns the most-installed packages from the official Homebrew analytics leaderboard for the chosen window. 'package' returns the specific names you list. 'search' returns packages whose name or description contains your query.

## `type` (type: `string`):

Which Homebrew catalog to use: 'formula' (CLI tools and libraries, macOS + Linux) or 'cask' (macOS GUI apps).

## `names` (type: `array`):

One or more exact formula or cask names to fetch, for example git, wget, node (formulae) or google-chrome, visual-studio-code (casks). Used only in 'package' mode.

## `query` (type: `string`):

Return packages whose name or description contains this text (case-insensitive), for example 'kubernetes', 'password manager'. Used only in 'search' mode.

## `analyticsWindow` (type: `string`):

Time window used to rank 'top' results and to attach install counts / rank. 30d, 90d or 365d.

## `includeDependents` (type: `boolean`):

When enabled, each formula is enriched with the other formulae that depend on it (reverse-dependency / supply-chain impact): a dependent count and a sample list. Charged per formula enriched. Paid plans only.

## `withAiSummary` (type: `boolean`):

Use AI to summarise each package into what it is, category, what it is an alternative to and its target user. Charged per package summarised. Paid plans only.

## `maxResults` (type: `integer`):

Maximum number of packages to return.

## Actor input object example

```json
{
  "mode": "top",
  "type": "formula",
  "names": [
    "git",
    "wget"
  ],
  "analyticsWindow": "30d",
  "includeDependents": false,
  "withAiSummary": false,
  "maxResults": 50
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "names": [
        "git",
        "wget"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/homebrew-packages-analytics-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "names": [
        "git",
        "wget",
    ],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/homebrew-packages-analytics-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "names": [
    "git",
    "wget"
  ],
  "maxResults": 50
}' |
apify call scrapers_lat/homebrew-packages-analytics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/homebrew-packages-analytics-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/phvt1tWgVEauN0oR0/builds/HoWye4iEYqMYRByrc/openapi.json
