# RubyGems Scraper — Gem Metadata, Versions & Downloads (`hipersoft/rubygems-scraper`) Actor

Look up exact Ruby gems or search RubyGems in bulk and get clean structured data: current version, all-time and version downloads, authors, description, licenses, runtime dependencies, homepage, source, docs and project links. Built for dependency audits, dev tooling and n8n.

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

## Pricing

from $0.0005 / gem scraped

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

## RubyGems Scraper — Gem Metadata, Versions, Downloads & Dependencies

Look up exact Ruby gems by name or search RubyGems in bulk and get back clean, structured JSON for every gem: current version, all-time and per-version download counts, authors, description, licenses, runtime dependencies, and homepage, source, documentation and project links. Built for Ruby developers, dependency auditors and OSS analysts who need reliable, ready-to-use gem data. Export to JSON, CSV or Excel.

### Features

- 🎯 **Exact lookups** — pass precise gem names like `rails`, `sinatra` or `nokogiri` and get one clean record each.
- 🔎 **Bulk search** — run a free-text query (`http client`, `background jobs`) and collect matching gems up to your limit.
- 📊 **Download metrics** — capture both all-time `downloads` and current `versionDownloads` for popularity and trend analysis.
- 🧾 **Licenses & dependencies** — every record includes `licenses` and the gem's runtime `dependencies` for fast auditing.
- 🔗 **Ready-to-use links** — `homepageUri`, `sourceCodeUri`, `documentationUri` and the canonical `projectUri`.
- 🧩 **Integrations** — plug the output straight into n8n, Make, Zapier and more.
- ⚙️ **Reliable by design** — retry-with-backoff and graceful handling of missing gems so runs finish cleanly.

### What you get

Each gem becomes one clean JSON record.

```json
{
  "name": "rails",
  "version": "8.1.3.1",
  "downloads": 781542425,
  "versionDownloads": 4585012,
  "authors": "David Heinemeier Hansson",
  "info": "Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity.",
  "homepageUri": "https://rubyonrails.org",
  "sourceCodeUri": "https://github.com/rails/rails/tree/v8.1.3.1",
  "documentationUri": "https://api.rubyonrails.org/v8.1.3.1/",
  "licenses": ["MIT"],
  "dependencies": ["actioncable", "actionmailbox", "actionmailer", "actionpack"],
  "sha": "ccd11a36bfc171bf9c66d585d14c0ece91c0c9dde840aae60c0118d6f5c9c52a",
  "projectUri": "https://rubygems.org/gems/rails",
  "ok": true
}
```

#### Output schema

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Gem name. |
| `version` | string | Current published version. |
| `downloads` | integer | All-time download count for the gem. |
| `versionDownloads` | integer | Download count for the current version. |
| `authors` | string | Gem author(s). |
| `info` | string | Gem description / summary. |
| `homepageUri` | string (URL) | Project homepage. |
| `sourceCodeUri` | string (URL) | Source repository URL. |
| `documentationUri` | string (URL) | Documentation URL. |
| `licenses` | array | SPDX license identifiers. |
| `dependencies` | array | Runtime dependency gem names. |
| `sha` | string | Checksum of the current version's gem file. |
| `projectUri` | string (URL) | Canonical RubyGems page for the gem. |
| `ok` | boolean | `true` for a fetched gem; `false` with an `error` for a gem that could not be found. |

### Input

```json
{
  "gems": ["rails", "sinatra", "nokogiri"],
  "search": "http client",
  "maxItems": 100
}
```

| Field | Description |
|-------|-------------|
| `gems` | Exact gem names to look up. Always fetched, in addition to any search results. |
| `search` | Free-text query matching gem name and description. Matches are collected up to `maxItems`. |
| `maxItems` | Maximum number of gems to collect from the search query (1–5000). |

Provide `gems`, `search`, or both in a single run.

### Use cases

- Audit the licenses and dependencies of the gems in your `Gemfile` before shipping.
- Track download momentum to compare competing gems in a category.
- Build a catalog of gems for a topic (e.g. HTTP clients) for research or content.
- Enrich an internal dependency dashboard with versions, descriptions and repo links.

### Pricing

Pay-per-event: you're billed a small amount per gem scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**How many gems can I scrape per run?**
Add any number of exact gem names in the `gems` field and collect up to `maxItems` (5000) more from a search query — all in one run.

**What's the output format?**
Structured JSON — one record per gem with fields such as `version`, `downloads`, `versionDownloads`, `authors`, `info`, `licenses` and `dependencies`. Export as JSON, CSV, Excel or via the API.

**What happens to a gem name that doesn't exist?**
It's returned as a record with `ok: false` and an `error`, so a typo never breaks the run — every other gem is still scraped.

**Can I use this with n8n?**
Yes. Run the actor from the [Apify node for n8n](https://docs.apify.com/platform/integrations/n8n) and map the gem records straight into your workflow — enrich a dependency list, trigger alerts on new versions, or sync gem data into a database or spreadsheet.

**Can I connect this Actor to other apps?**
The RubyGems Scraper works with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations): [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Related Actors

Tracking packages across ecosystems? Pair this with our other developer-data scrapers:

- [npm Package Scraper](https://apify.com/hipersoft/npm-scraper) — search and look up npm packages with metadata, dependencies and downloads.
- [PyPI Package Scraper](https://apify.com/hipersoft/pypi-scraper) — metadata, dependencies, licenses and downloads for Python packages.
- [crates.io Scraper](https://apify.com/hipersoft/crates-scraper) — Rust crates with downloads, versions, license and repository links.
- [GitHub Scraper](https://apify.com/hipersoft/github-scraper) — repositories and user profiles with stars, topics and licenses.

### Notes

This actor reads only publicly available gem data from RubyGems. It is an independent tool and is not affiliated with, endorsed by, or sponsored by RubyGems.org or Ruby Central; "RubyGems" and "Ruby" are trademarks of their respective owners. Original clean-room implementation.

# Actor input Schema

## `gems` (type: `array`):

Look up specific Ruby gems by their exact name, e.g. "rails", "sinatra", "nokogiri". Combined with any search results in the same run.

## `search` (type: `string`):

Free-text RubyGems search (matches gem name and description), e.g. "http client". Matching gems are collected up to Max items.

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

Maximum number of gems to collect from the search query. Exact gem names above are always fetched in addition to this.

## Actor input object example

```json
{
  "gems": [
    "rails",
    "devise",
    "puma"
  ],
  "search": "http client",
  "maxItems": 100
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "gems": [
        "rails",
        "sinatra"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/rubygems-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 = { "gems": [
        "rails",
        "sinatra",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/rubygems-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 '{
  "gems": [
    "rails",
    "sinatra"
  ]
}' |
apify call hipersoft/rubygems-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/rubygems-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/Vzk0NwyHpNtAvHnm8/builds/C09RfP6mlYZbFmY7z/openapi.json
