# BOINC Project Extractor (`datamule/boinc-project-extractor`) Actor

Point at ANY BOINC volunteer-computing project (PrimeGrid, Einstein@Home, Rosetta@Home, yoyo@home, NFS@Home) and extract its public XML: applications & versions, server status & daemons, or the user/team/host stats exports. Sniffs the body, gunzips file-gzip stats. One uniform runner.

- **URL**: https://apify.com/datamule/boinc-project-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

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/actors/running/actors-in-store.md#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

## BOINC Project Extractor

Point this actor at **any BOINC volunteer-computing project** and extract its uniform public XML — no per-project code, no API key.

BOINC powers ~40 distributed-computing projects (PrimeGrid, Einstein@Home, Rosetta@Home, yoyo@home, NFS@Home, World Community Grid, …). Because BOINC is one open-source framework, every project serves the **same** server-side XML endpoints. This actor is a single generic runner over all of them.

### Modes

| Mode | Endpoint | Output |
|------|----------|--------|
| `apps` *(default)* | `apps.php?xml=1` | One row per application **version**: name, friendly name, platform, version number, plan class, release date. |
| `serverStatus` | `server_status.php?xml=1` | One row per **daemon** (host, command, status) + one summary row (queue counters, users, results). |
| `userStats` | `stats/user.gz` | One row per **user**: total credit, exp-avg credit, country, team, created. |
| `teamStats` | `stats/team.gz` | One row per **team**. |
| `hostStats` | `stats/host.gz` | One row per **host**: CPU vendor/model, OS, cores, credit. |

### Input

```json
{
  "projectUrl": "https://www.primegrid.com",
  "mode": "apps",
  "maxRecords": 20000
}
```

- **projectUrl** (required) — the project master URL. The actor appends the mode's path.
- **mode** — `apps` | `serverStatus` | `userStats` | `teamStats` | `hostStats` (default `apps`).
- **maxRecords** — cap on emitted rows (default 20000). Stats exports can be very large (Rosetta's user export is ~1.4M rows); parsing streams so the cap is honored without loading the whole export.
- **userAgent**, **timeoutSecs** — optional overrides.

### Example projects (verified live)

- `https://www.primegrid.com` — apps (25 apps / 265 versions), serverStatus
- `https://einsteinathome.org` — apps (8 apps / 61 versions)
- `https://escatter11.fullerton.edu/nfs` — open stats (21k+ users)
- `https://www.rechenkraft.net/yoyo` — apps, serverStatus, stats

> Note: some projects (e.g. PrimeGrid, Einstein@Home) auth-wall their `stats/*.gz` exports. Use `apps` or `serverStatus` on those, or point stats modes at a project that publishes open stats such as NFS@Home.

### How it handles the awkward parts

- **Content-Type lies.** Some projects serve XML as `text/html`. The actor **sniffs the body** for the expected root element rather than trusting the header.
- **Stats are file-gzip, not transport-gzip.** They're fetched with `Accept-Encoding: identity` and gunzipped as a file, then streamed with `iterparse` so multi-million-row exports don't blow memory.
- **Daemon status is served two ways** (a `<status>` child on some projects, trailing text on others) — both are handled.
- A non-200, an HTML/auth-wall page, or a body missing the expected BOINC root **fails fast** — it never reports an unreachable or empty endpoint as a success.

### Output

Structured JSON rows in the dataset, plus one trailing metadata record (`_recordType: "meta"`) summarizing the run (mode, endpoint, emitted-row count, whether the cap was hit). Every row carries `projectUrl` and `_source`.

### Pricing

Pay-per-event: **$0.0005 per record** (one application version, daemon, or user/team/host stat). The trailing metadata record is not billed.

# Actor input Schema

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

The master URL of ANY BOINC volunteer-computing project. The actor appends the chosen mode's path (e.g. /apps.php?xml=1). Every BOINC project (PrimeGrid, Einstein@Home, Rosetta@Home, yoyo@home, NFS@Home, …) exposes the SAME public XML endpoints. Verified live: https://www.primegrid.com (apps), https://einsteinathome.org (apps), https://escatter11.fullerton.edu/nfs (open stats). A URL that returns HTML / 401 / a body missing the expected BOINC root fails fast (never emits empty).

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

Which BOINC XML surface to extract. 'apps' (default) → one row per application version (clean, always present). 'serverStatus' → one row per daemon + a summary row. 'userStats'/'teamStats'/'hostStats' → the gzipped stats exports, one row per user/team/host (high-volume; note some projects such as PrimeGrid/Einstein auth-wall their stats, so use 'apps'/'serverStatus' on those).

## `maxRecords` (type: `integer`):

Stop after emitting this many rows. Stats exports are large (Rosetta's user export is ~1.4M rows), so the default caps generously; parsing streams so the cap is honored without loading the whole export. Each emitted row is billed as one record; the trailing metadata record is not billed.

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

Override the default browser-ish User-Agent header. Some projects require a real UA + redirect follow to serve the endpoint.

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

Per-request timeout in seconds. The stats exports are multi-MB, so keep this generous (default 120).

## Actor input object example

```json
{
  "projectUrl": "https://www.primegrid.com",
  "mode": "apps",
  "maxRecords": 20000,
  "timeoutSecs": 120
}
```

# 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 = {
    "projectUrl": "https://www.primegrid.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/boinc-project-extractor").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 = { "projectUrl": "https://www.primegrid.com" }

# Run the Actor and wait for it to finish
run = client.actor("datamule/boinc-project-extractor").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 '{
  "projectUrl": "https://www.primegrid.com"
}' |
apify call datamule/boinc-project-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datamule/boinc-project-extractor"
        }
    }
}

```

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/W0A4833SzQjgD1F8n/builds/M1PCXDpNsLGsk92u9/openapi.json
