# CRAN Packages — R Package Downloads, Versions & Archival Alerts (`alauddinburki/cran-packages`) Actor

Search CRAN, list the most-downloaded R packages, or watch the packages you depend on. Get version, licence, links, release history, R version, imports and weekly and monthly downloads, with alerts on new versions and CRAN archivals. Public APIs, no key.

- **URL**: https://apify.com/alauddinburki/cran-packages.md
- **Developed by:** [Alauddin burki](https://apify.com/alauddinburki) (community)
- **Categories:** Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.

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

## CRAN Packages — R Package Downloads, Versions & Archival Alerts

Search **CRAN**, the R package archive, list **last week's most-downloaded packages**, or **watch the packages you
depend on**. Each row has the latest version, title, description, licence, homepage and repository links, bug
tracker, publication date, **first release and number of releases**, **whether CRAN has archived it**, the
required R version, imports and dependencies, whether it has compiled code, and **downloads over the last week and
month**. Scheduled, it reports **new versions, archivals, returns to CRAN, licence changes and the change in weekly
downloads**. It reads the public METACRAN services run by R-hub, with no key. Authors' and maintainers' names and
e-mails are never collected.

### Use it for

- **R teams and package maintainers:** a weekly check on your dependencies. The most useful alert is a package
  being archived, because an archived package breaks fresh installs.
- **Library authors:** your downloads against alternatives, week by week.
- **Ecosystem research:** the most-used packages for a topic, such as time series, Bayesian models or Shiny.

### Input examples

```json
{ "query": "time series", "sort": "downloads", "maxItems": 50 }
```

```json
{ "topByDownloads": true, "maxItems": 100 }
```

```json
{ "packages": ["data.table", "ggplot2", "https://cran.r-project.org/package=zoo"], "onlyChanges": true }
```

### Output

| Field | Example |
|---|---|
| `name`, `version`, `title` | dplyr · 1.2.1 · A Grammar of Data Manipulation |
| `license`, `urls`, `bugReports` | MIT + file LICENSE · dplyr.tidyverse.org, GitHub |
| `published`, `firstRelease`, `releaseCount` | 2026-04-03 · 2014 · 47 |
| `archived`, `archivedAt` | false |
| `rVersion`, `imports`, `depends`, `suggestsCount`, `needsCompilation` | >= 4.1.0 · \["cli", "rlang", …] |
| `downloadsLastWeek`, `downloadsLastMonth` | 399,887 · 1,753,537 |
| `changes`, `downloadsWeekChange` | `["version 1.17.0 → 1.18.6.1"]` · +1,000 |

Download counts come from cranlogs, which counts the RStudio/Posit CRAN mirror. That is the largest mirror, but it
is not the whole of CRAN.

### Pricing

Pay per result: **$0.0005 per row**. Plus a start fee of $0.0001 per GB of allocated memory (minimum one event).
One row is one package.

### Verification status (2026-11-19, local)

- ✅ 4 unit tests on live fixtures: names from CRAN links, search, a current package with history, dependencies and
  downloads and no people data, an archived package, change detection.
- ✅ Live: "time series" by downloads, 10 results, plus 3 watched packages including an archived one and a fake one
  that was reported → 13 rows, with no e-mail anywhere in the output. Last week's top 5 → 5 rows. A simulated old
  state → the `onlyChanges` rerun returned "version 1.17.0 → 1.18.6.1" (+1,000 weekly downloads) and "archived on
  CRAN", and skipped the unchanged package. 0 schema mismatches.

# Actor input Schema

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

Keywords, e.g. bayesian regression, time series, shiny.

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

Order of search results.

## `topByDownloads` (type: `boolean`):

Last week's top packages (up to 100).

## `packages` (type: `array`):

Names or CRAN links.

## `onlyChanges` (type: `boolean`):

After the first run: new versions, archivals, licence changes.

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

Separate keys keep separate watch lists.

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

Stop after this many search or top-list results (watched packages always included).

## Actor input object example

```json
{
  "query": "time series",
  "sort": "relevance",
  "topByDownloads": false,
  "packages": [
    "data.table",
    "ggplot2"
  ],
  "onlyChanges": false,
  "stateKey": "CRAN_WATCH",
  "maxItems": 20
}
```

# Actor output Schema

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

Every row of the run, in the dataset (fields as listed under Output in the README).

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

Counts, items not found and other notes for the run.

# 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 = {
    "query": "time series",
    "packages": [
        "data.table",
        "ggplot2"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("alauddinburki/cran-packages").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 = {
    "query": "time series",
    "packages": [
        "data.table",
        "ggplot2",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("alauddinburki/cran-packages").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 '{
  "query": "time series",
  "packages": [
    "data.table",
    "ggplot2"
  ],
  "maxItems": 20
}' |
apify call alauddinburki/cran-packages --silent --output-dataset

```

## MCP server setup

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

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/0zUfAuC7PPbbeJcOe/builds/r7cxW770Smwj3DGBL/openapi.json
