# CRAN R Packages Metadata Scraper (`parseforge/cran-r-packages-scraper`) Actor

Scrapes CRAN R package metadata by package name and returns each package as a flat row with title, version, author, dependencies, and publication date.

- **URL**: https://apify.com/parseforge/cran-r-packages-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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?

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### CRAN R Packages Metadata Scraper

**Scrape CRAN R package metadata by package name, up to a million per run.** Every package comes with its title, version, author, dependencies, and publication date. No API key or registration. Export to CSV, JSON, Excel, or XML.

CRAN hosts over 20,000 R packages, but browsing the web interface or querying the official API one package at a time is slow and manual. This Actor reads the CRAN crandb database directly, so you can fetch metadata for a list of package names in a single run. It returns a flat dataset ready for analysis, dependency mapping, or package discovery.

| Who uses it | What they scrape CRAN for |
|---|---|
| R developers | Audit the dependencies and maintainers of the packages their project relies on. |
| Data science team leads | Build an internal catalog of approved R packages with version and author details. |
| Bioinformatics researchers | Track the latest versions and publication dates of domain-specific CRAN packages. |
| Software compliance officers | Check the license and author fields across a list of R packages before procurement. |

### What it does

This Actor collects CRAN R package metadata by package name and returns each package as a flat row.

- 📋 **Batch by package name:** provide a list of CRAN package names and the Actor fetches metadata for each one.
- 🔢 **Capped runs:** set a maximum number of packages to collect per run, up to 1,000,000.
- 📄 **Flat row output:** each package returns as one row with title, version, author, maintainer, dependencies, license, and publication date.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with CRAN data

**📦 Audit project dependencies.**

An R developer feeds a list of package names from their DESCRIPTION file and gets back the current version, license, and maintainer for each dependency.

**🧪 Build a research software catalog.**

A bioinformatics core facility scrapes metadata for 200 domain-specific CRAN packages to populate an internal tool registry with version and author details.

**📊 Monitor package updates.**

A data science team lead runs the Actor weekly on their stack of 50 packages and diffs the version column to spot new releases.

**🔍 Discover package maintainers.**

A compliance officer pulls the author and maintainer fields for a list of candidate packages to verify provenance before approval.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Reads the public CRAN crandb database with no registration or authentication. |
| **Batch lookups** | Fetch metadata for hundreds or thousands of packages in one run. |
| **Fixed schema** | Every package returns the same fields, so your downstream scripts never break. |
| **Export anywhere** | Save results as CSV, JSON, Excel, or XML for use in R, Python, or BI tools. |

### How it compares

No other Store actor targets CRAN the same way, so the honest comparison is with the alternatives teams actually weigh.

| | CRAN R Packages Metadata Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When CRAN changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a list of CRAN package names and cap the total packages collected per run. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "packageNames": [
    "ggplot2",
    "dplyr",
    "data.table",
    "shiny",
    "Rcpp",
    "stringr",
    "tidyr",
    "jsonlite",
    "httr"
  ],
  "maxItems": 10
}
```

A larger pull:

```json
{
  "packageNames": [
    "ggplot2",
    "dplyr",
    "data.table",
    "shiny",
    "Rcpp",
    "stringr",
    "tidyr",
    "jsonlite",
    "httr"
  ],
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.003 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.30 |
| 1,000 results | $3.00 |
| 10,000 results | $30.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [CRAN R Packages Metadata Scraper](https://apify.com/parseforge/cran-r-packages-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to CRAN through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/cran-r-packages-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting fewer results than the number of package names I provided?**

Check the maxItems setting. The Actor stops after collecting that many packages, even if your input list is longer. Increase maxItems to fetch more.

**Some packages are missing from the output.**

The package name may be misspelled or the package may have been archived on CRAN. Verify the exact name on the CRAN website and try again.

**The run takes a long time for a large package list.**

The Actor queries the CRAN crandb database once per package. For lists of thousands of names, expect a few minutes of runtime. You can split the list across multiple runs if needed.

**I see an error about an invalid package name.**

CRAN package names are case-sensitive and must match exactly. Check for typos, extra spaces, or incorrect capitalization in your input list.

### FAQ

| Question | Answer |
|---|---|
| What CRAN metadata fields does this Actor return? | It returns the package name, title, version, author, maintainer, description, license, dependencies, suggests, imports, and publication date from the CRAN crandb database. |
| Do I need an API key or CRAN account? | No. The Actor reads the public CRAN crandb database directly, so no registration, API key, or authentication is required. |
| How many packages can I scrape in one run? | You can set the maximum packages per run up to 1,000,000. The Actor will stop after collecting that many, even if your package name list is longer. |
| Can I scrape all CRAN packages? | Yes, if you provide a complete list of package names and set a high enough maxItems value. The Actor fetches metadata for each name you supply. |
| What format does the output come in? | You can export the dataset as CSV, JSON, Excel, or XML from the Apify platform. |
| Does this Actor download the R package source code? | No, it only fetches metadata from the CRAN crandb database. It does not download or inspect the package tarball or source files. |
| How do I get the list of all CRAN package names? | You can obtain the full package list from the CRAN web interface or by using the available.packages() function in R, then pass that list to this Actor. |
| Can I filter packages by author or license? | The Actor fetches metadata for every package name you provide. You can filter the resulting dataset by author, license, or any other field after the run completes. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by The R Foundation. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `packageNames` (type: `array`):

List of CRAN R package names to fetch metadata for. Each name is looked up on the CRAN crandb database.

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

How many packages to collect per run.

## Actor input object example

```json
{
  "packageNames": [
    "ggplot2",
    "dplyr",
    "data.table",
    "shiny",
    "Rcpp",
    "stringr",
    "tidyr",
    "jsonlite",
    "httr"
  ],
  "maxItems": 10
}
```

# 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 = {
    "packageNames": [
        "ggplot2",
        "dplyr",
        "data.table",
        "shiny",
        "Rcpp",
        "stringr",
        "tidyr",
        "jsonlite",
        "httr"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/cran-r-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 = {
    "packageNames": [
        "ggplot2",
        "dplyr",
        "data.table",
        "shiny",
        "Rcpp",
        "stringr",
        "tidyr",
        "jsonlite",
        "httr",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/cran-r-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 '{
  "packageNames": [
    "ggplot2",
    "dplyr",
    "data.table",
    "shiny",
    "Rcpp",
    "stringr",
    "tidyr",
    "jsonlite",
    "httr"
  ],
  "maxItems": 10
}' |
apify call parseforge/cran-r-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/cran-r-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/BO7sJKSQEGbg35aCh/builds/QfHcbOPgwEgAqbD6L/openapi.json
