# Homebrew Formulae Scraper (`bigibyte/homebrew-formulae-scraper`) Actor

Extract Homebrew formula metadata, cask details, and install analytics instantly. Gather software versions, licenses, and download metrics into a clean dataset ready for JSON, CSV, or Excel export without any setup

- **URL**: https://apify.com/bigibyte/homebrew-formulae-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Homebrew Formulae Scraper: Homebrew formula metadata and installs

Homebrew Formulae Scraper reads structured data and writes formula metadata, cask records, and install counts. No setup required, and no proxy needed by default. You get a clean dataset you can export as JSON, CSV, or Excel.

The scraper handles formula details, cask records, and install analytics for 30, 90, or 365 days.

### Use cases

- **Mac fleet inventory**: pull wget, openssl@3, and the rest of a formula list on a schedule and keep versions next to your setup
- **Cask tracking**: record Firefox and other cask tokens, homepages, and versions without opening a browser
- **Install ranking**: export the popular install list, capped, for a spreadsheet
- **Dependency notes**: keep the dependency names that come back on a formula payload
- **Quiet failures**: a missing name becomes one error row with the details, and the run continues

### What data does this actor extract?

Each success row uses the fields below. Analytics rows fill `name` and `install_30d`. Formula and cask rows fill the metadata fields and leave `install_30d` empty.

```json
{
    "name": "wget",
    "desc": "Internet file retriever",
    "license": "GPL-3.0-or-later",
    "homepage": "https://www.gnu.org/software/wget/",
    "version_stable": "1.25.0",
    "tap": "homebrew/core",
    "dependencies": ["libidn2", "libpsl"],
    "install_30d": null,
    "deprecated": false,
    "scraped_at": "2026-10-12T00:00:00+00:00"
}

```

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Formula name, cask token, or analytics formula name |
| `desc` | string | Description from the formula or cask payload |
| `license` | string | License string when the payload includes one |
| `homepage` | string | Project homepage |
| `version_stable` | string | Stable version on a formula, or version on a cask |
| `tap` | string | Tap such as homebrew/core or homebrew/cask |
| `dependencies` | array | Dependency names from the formula payload |
| `install_30d` | integer | Install count from analytics items, commas removed |
| `deprecated` | boolean | True when deprecated, otherwise false |
| `scraped_at` | string | UTC timestamp when the row was built |

Error rows use `error`, `url`, `status`, and `message`

### Input

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `formula` | Formula, cask, or install analytics mode |
| `formulae` | array | `wget` | Formula names, one per line |
| `casks` | array | `firefox` | Cask tokens, one per line |
| `period` | string | `30d` | `30d`, `90d`, or `365d` for analytics |
| `requestDelaySecs` | number | `1` | Pause before each request |
| `userAgent` | string | BigiByteActorResearch/1.0 | Contact string sent as User-Agent |
| `timeoutSecs` | integer | `300` | Stop the run after this many seconds |
| `requestTimeoutSecs` | integer | `30` | Per-request timeout |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Optional proxy. Off unless you turn it on |

#### Example input

```json
{
    "mode": "formula",
    "formulae": ["wget"],
    "requestDelaySecs": 1,
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": false }
}

```

Analytics example: set `mode` to `analytics` and `period` to `30d`. The actor pulls the install analytics list, keeps the first  formulae, and parses install counts into integers.

### How it works

1. Send requests one at a time with your user agent, waiting the specified delay between calls.
2. On temporary server errors, retry up to five times with intelligent backoff intervals.
3. Drop duplicate names in the same run and push rows in convenient batches. Missing or invalid names result in a clean error row without stopping the entire run.

### Pricing and Usage Limits

The actor is free to run on Apify aside from normal platform usage. There are no key requirements or hidden subscription fees to worry about.

### FAQ

**Do I need any special setup or keys to run this?**

No. Everything works out of the box. Leave the proxy off unless you have a specific routing reason to turn it on.

**What happens if a formula name is incorrect?**

You get one error row with the request URL, status 404, and a descriptive message. The run keeps going.

**Can I export CSV?**

Yes. Apify datasets export cleanly to JSON, CSV, and Excel.

***

#### Related Tools

If you plan to map or join these rows, a geocoding pass or a quick CSV cleanup are the usual next steps. BigiByte also builds scrapers for other open-data portals when you need them as a separate job.

Need another city's open data, a scheduled monitor, or a custom pipeline? BigiByte builds custom scrapers and APIs: <https://bigibyte.com>

#### Trademark Notice

Homebrew Formulae and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the scope of the data and does not imply affiliation, sponsorship, endorsement, or partnership.

#### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or otherwise officially associated with Homebrew Formulae or its owners. All data is collected from publicly available feeds. Users are responsible for complying with any applicable terms and usage guidelines.

#### Is web scraping legal?

This actor only collects publicly available data without logging in or bypassing any access controls. Scraping public data is generally legal, but how you use it matters:

- **Personal data:** If the results include personal data, laws such as the GDPR in the EU and the CCPA in California may apply. Only collect and store personal data when you have a legitimate reason.
- **Copyright:** Some content (articles, images, descriptions) may be protected by copyright. Do not republish full copyrighted content without permission.
- **Terms of use:** Respect source terms and stated rate limits.
- **Legal advice:** This is general information, not legal advice. If you're unsure, consult a lawyer.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

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

formula loads GET /api/formula/{name}.json for each name. cask loads GET /api/cask/{token}.json. analytics loads GET /api/analytics/install/{30d|90d|365d}.json. all is listed for compatibility and does not call the unverified full catalogue URL.

## `formulae` (type: `array`):

Homebrew formula names for formula mode, one per line. Example: wget. Names are URL-encoded. Duplicates in one run are requested once.

## `casks` (type: `array`):

Homebrew cask tokens for cask mode, one per line. Example: firefox.

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

Install window for analytics mode. Requests https://formulae.brew.sh/api/analytics/install/{period}.json. The count is stored on install_30d for every period.

## `requestDelaySecs` (type: `number`):

Seconds to wait before each request. A short burst of the public endpoints returned 2xx with no rate-limit headers, and the actor still waits. One request runs at a time.

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

User-Agent sent on every request. Include an app name and a contact so the host can identify the client.

## `timeoutSecs` (type: `integer`):

Stop the run after this many seconds and keep rows already collected. Default 300. Maximum 3600.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for one response before treating that call as failed. Default 30 seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy for formulae.brew.sh requests. Leave useApifyProxy off. The public JSON API does not need a proxy.

## Actor input object example

```json
{
  "mode": "formula",
  "formulae": [
    "wget"
  ],
  "casks": [
    "firefox"
  ],
  "period": "30d",
  "requestDelaySecs": 1,
  "userAgent": "BigiByteActorResearch/1.0 (contact: research@bigibyte.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Name, description, license, homepage, stable version, tap, dependencies, install count, and source URL.

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

Failed requests with URL, HTTP status, and message.

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

Every row from the run, without a table view applied.

# 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 = {
    "formulae": [
        "wget"
    ],
    "casks": [
        "firefox"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/homebrew-formulae-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 = {
    "formulae": ["wget"],
    "casks": ["firefox"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/homebrew-formulae-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 '{
  "formulae": [
    "wget"
  ],
  "casks": [
    "firefox"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call bigibyte/homebrew-formulae-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/homebrew-formulae-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/rsPZRq1KUsRiYaiLO/builds/TSrkyJkOuLd5EHCrf/openapi.json
