# CRAN Packages Scraper - R Package Metadata (`benthepythondev/cran-packages-scraper`) Actor

Scrape CRAN package metadata: package names, versions, titles and R package registry descriptions.

- **URL**: https://apify.com/benthepythondev/cran-packages-scraper.md
- **Developed by:** [ben](https://apify.com/benthepythondev) (community)
- **Categories:** Developer tools, Business, Automation
- **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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## CRAN Packages Scraper - R Package Metadata

Scrape structured records from **CRAN** with a reliable Apify actor. This actor uses public data endpoints, normalizes the result into flat dataset rows, and is designed for scheduled monitoring, data enrichment, research, reporting, and API-driven workflows.

### What does it do?

The actor fetches live CRAN data at runtime and converts it into a clean Apify dataset. Instead of maintaining a custom connector, retry logic, exports, and schedules yourself, you can run this actor from the Console, API, CLI, webhook, Make, Zapier, n8n, or a saved task.

### Input

```json
{
  "query": "dplyr",
  "maxResults": 25
}
````

Use a small limit for testing and increase it when running production jobs. The query can be a package name, app name, research keyword, organization name, condition, project type, or another source-specific search term.

### Output

Rows are pushed to the default dataset. The exact fields depend on the source, but the output is intentionally flat and easy to join with other data. Typical fields include identifier, name, description, source URL, version or date fields, related organizations, category or status fields, and the original search query.

```json
{
  "name": "example",
  "description": "Normalized source metadata",
  "source": "CRAN",
  "search": "dplyr"
}
```

### Use cases

Use this actor to monitor package and app ecosystems, enrich internal databases, build market maps, track changes over time, create client reports, populate dashboards, trigger alerts, or feed a data warehouse. It is especially useful when you need recurring data from a source but do not want to maintain a custom script.

### Reliability

This actor avoids fragile browser automation. It uses direct HTTP requests, retries, timeouts, small default inputs, and normalized output fields. That makes it inexpensive to run and suitable for Apify's daily reliability checks. If the upstream source changes, the actor can be updated while preserving the same workflow for users.

### Data quality

The actor cleans HTML snippets, flattens nested fields, keeps source identifiers, and includes the original query in every row. For monitoring, create one saved task per important query and run it on a schedule. For larger exports, split searches into multiple tasks so each run stays predictable.

### Pricing

The actor uses pay-per-event pricing: a small run-start charge plus a per-result charge for each dataset item. This keeps quick checks affordable and lets larger jobs scale with usage.

### FAQ

#### Does it require credentials?

No. The default workflow uses public endpoints and does not need an API key.

#### Can I schedule it?

Yes. Apify schedules are ideal for daily or weekly monitoring.

#### Can I export the data?

Yes. Export the dataset as JSON, CSV, Excel, XML, RSS, or HTML table, or connect it to automation tools.

#### Is this good for production?

Yes, for modest scheduled workloads and enrichment jobs. Start with small limits, validate the output, then increase the result count.

#### Can I combine this with other actors?

Yes. Many users run a source-specific actor like this first, then enrich the output with contact, company, website, package, vulnerability, or repository data from other actors.

### Related actors

You might also like: Homebrew Formulae Scraper, NuGet Package Scraper, Open VSX Extensions Scraper, CISA KEV Scraper, NVD CVE Scraper, Crossref Papers Scraper, and Wikipedia Scraper.

### Keywords

CRAN scraper, CRAN API, metadata extraction, public data API, package metadata, research data, registry data, business intelligence, Apify dataset, CSV export, JSON export, no-code data extraction, scheduled monitoring

### Production workflow tips

For recurring use, save a task with your preferred query and run it on a schedule. Keep the query field in the output when storing results so you can merge multiple tasks into one warehouse table. For alerts, compare stable identifiers first and then compare timestamp, version, status, count, or score fields. This prevents duplicate alerts and makes downstream automation easier to maintain.

### Maintenance approach

The actor is intentionally small and direct. It avoids login sessions, browser fingerprinting, and residential proxy costs. This reduces operational risk and keeps the actor easy to maintain as part of a larger portfolio.

### Field coverage and normalization

The actor keeps the output intentionally practical. Source-specific nested objects are converted into fields that analysts can sort, filter, and join. Where the upstream source includes arrays, the actor keeps them as JSON arrays instead of flattening them into comma-separated strings, so exports remain useful for both spreadsheets and programmatic pipelines. The `source` field identifies the upstream registry, while the `search` field preserves the input that produced each row.

### Recommended setup

For production, create multiple saved tasks instead of one very broad run. A saved task for each important package family, research area, application category, funder keyword, or study topic gives you cleaner output and easier monitoring. You can schedule each task independently and send the dataset to your warehouse, Google Sheets, Slack alert, webhook, or integration tool.

### Why this belongs in a portfolio

This actor targets a reliable public-data source with recurring business value. It may not be a social-media mega actor, but it can earn steadily because it solves a concrete monitoring and enrichment problem. It also has low operating cost: no paid proxy, no browser pool, no login, and no fragile challenge bypass. That reliability protects rankings and avoids under-maintenance flags.

### Scaling notes

When increasing result limits, keep the upstream source in mind. Public APIs often prefer several smaller scheduled runs over one large scrape. If you need broad coverage, split by query and combine the resulting datasets downstream. This keeps individual runs fast and easier to retry.

# Actor input Schema

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

Source-specific search term.

## `maxResults` (type: `integer`):

Maximum number of rows to return.

## Actor input object example

```json
{
  "query": "dplyr",
  "maxResults": 10
}
```

# 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": "dplyr",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/cran-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 = {
    "query": "dplyr",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/cran-packages-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "dplyr",
  "maxResults": 10
}' |
apify call benthepythondev/cran-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/cran-packages-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CRAN Packages Scraper - R Package Metadata",
        "description": "Scrape CRAN package metadata: package names, versions, titles and R package registry descriptions.",
        "version": "1.0",
        "x-build-id": "c7hMxNhkflXWj964i"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~cran-packages-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-cran-packages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~cran-packages-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-cran-packages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~cran-packages-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-cran-packages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Source-specific search term.",
                        "default": "dplyr"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of rows to return.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
