# R Universe Packages Scraper (`zerobreak/r-universe-packages-scraper`) Actor

This Actor collects R package records, metadata, and build statistics from R-Universe based on universe owners, package names, or search queries. It extracts package titles, versions, descriptions, maintainers, dependencies, vignettes, and repository URLs

- **URL**: https://apify.com/zerobreak/r-universe-packages-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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/actors/running/actors-in-store.md#pay-per-event

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

### R-universe Packages Scraper — Search and Collect R Package Metadata

![R-universe Packages Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/r-universe-packages-scraper-cover.png)

R-universe Packages Scraper collects publicly available R package search results across R-universe. Enter a search query, choose how many records to collect, and export the results in JSON, CSV, Excel, or other supported dataset formats.

### What It Does

Search for R packages using a keyword and collect useful package information, including package names, titles, descriptions, publishers, usage statistics, maintainers, update timestamps, stars, topics, search scores, and ranking details.

The scraper supports paginated search results, duplicate detection, request pacing, and a configurable item limit.

### Features

- Search R packages across R-universe using a keyword.
- Collect package names, titles, and descriptions.
- Retrieve publisher and maintainer information.
- Capture package usage counts, stars, and topics.
- Include search scores and ranking information.
- Handle paginated search results.
- Skip duplicate records during a run.
- Set a maximum number of records to collect.
- Export results in JSON, CSV, Excel, and other supported formats.

### Search Mode

**Search:** Searches R-universe packages using the supplied query and collects matching package records.

### Input Parameters

| Parameter | Description |
|---|---|
| `mode` | Search mode. Use `search`. |
| `q` | Keyword or phrase used to search for R packages. |
| `maxItems` | Maximum number of records to collect per run, up to 1,000. |
| `requestDelayMs` | Delay between requests in milliseconds. Default: `1000`. |

### Input Example

```json
{
  "mode": "search",
  "q": "python",
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

### Output Fields

| Field | Description |
|---|---|
| `recordId` | Unique identifier for the package record. |
| `Package` | R package name. |
| `packageTitle` | Package title. |
| `packageDescription` | Package description. |
| `_user` | Publisher's R-universe username. |
| `_usedby` | Package usage count. |
| `_searchresults` | Number of search results. |
| `_score` | Search relevance score. |
| `_uuid` | Package UUID. |
| `maintainer` | Maintainer information, including name, email, and login. |
| `updated` | Package update timestamp. |
| `stars` | Number of package stars. |
| `topics` | Package topics or tags. |
| `match` | Match score associated with the search result. |
| `rank` | Package ranking value. |
| `scrapedAt` | Date and time when the record was collected. |

### Output Example

```json
{
  "recordId": "6ad2633d475807f7554a6098",
  "Package": "reticulate",
  "packageTitle": "Interface to 'Python'",
  "packageDescription": "Interface to 'Python' modules, classes, and functions.",
  "_user": "rstudio",
  "_usedby": 596,
  "_searchresults": 30720,
  "_score": 21.11,
  "_uuid": 513560,
  "maintainer": {
    "name": "Tomasz Kalinowski",
    "email": "tomasz@posit.co",
    "login": "t-kalinowski"
  },
  "updated": 1792159706,
  "stars": 1764,
  "topics": ["cpp"],
  "match": 153.77,
  "rank": 3166.78,
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **R Package Research:** Collect package metadata for specific programming topics.
- **Universe Monitoring:** Track packages matching recurring search queries.
- **Dependency Discovery:** Find packages and maintainers related to particular technologies.
- **Data Analysis:** Export package information for spreadsheet analysis.
- **Dashboard Feeds:** Refresh package search results periodically for monitoring and reporting.

### Exporting Data

Results are stored in an Apify dataset. You can export collected records in formats such as:

- JSON
- CSV
- Excel
- Other supported Apify dataset formats

### FAQ

**Who can use this scraper?**

R developers, researchers, data analysts, and teams interested in discovering and monitoring R packages.

**What information does it collect?**

It collects package names, descriptions, publisher details, maintainer information, usage statistics, stars, topics, update timestamps, and search ranking fields.

**Can I search for different package topics?**

Yes. Change the `q` parameter to search for a different keyword or phrase.

**Can I run it on a schedule?**

Yes. You can use Apify schedules to run the scraper periodically and refresh your collected dataset.

**How many records can it collect?**

You can collect up to 1,000 records per run by setting `maxItems`.

**What happens if a package appears more than once?**

Duplicate records are skipped during the run.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to fetch. Search queries R packages across R-universe.

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

Search query passed to R-universe as `q` (tested value: python).

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait between requests. Raise if you see 429.

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

User-Agent header sent with each request.

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

Overall run budget in seconds.

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

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "search",
  "q": "python",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

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

Full dataset for this run.

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

Dataset items as JSON.

# 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 = {
    "q": "python"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/r-universe-packages-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 = { "q": "python" }

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/r-universe-packages-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 '{
  "q": "python"
}' |
apify call zerobreak/r-universe-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/r-universe-packages-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/dU2hueHnblNzuLdlU/builds/qvsBoG8w7T2OWgMIB/openapi.json
