RubyGems Scraper: Gem Metadata & Version History avatar

RubyGems Scraper: Gem Metadata & Version History

Pricing

from $0.37 / 1,000 gem scrapeds

Go to Apify Store
RubyGems Scraper: Gem Metadata & Version History

RubyGems Scraper: Gem Metadata & Version History

Pull gem data from RubyGems: version, total and per-version downloads, licences, runtime and development dependencies, source code URI and documentation links. Bulk gems, no auth.

Pricing

from $0.37 / 1,000 gem scrapeds

Rating

0.0

(0)

Developer

Arman Hossain

Arman Hossain

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

7 days ago

Last modified

Share

RubyGems Scraper: Latest version, download counts, licences, dependencies and every declared link for any RubyGems package

RubyGems Scraper turns any list of gem names into flat, structured records, latest version, total and per-version download counts, licences, runtime and development dependencies, and every link the gem declares: homepage, source, docs, changelog, bug tracker and funding.

It reads the same RubyGems metadata Bundler resolves against. No proxy setup, no browser, no credentials to manage. A gem lookup is a single request.

Agent skill: SKILL.md

https://api.apify.com/v2/key-value-stores/t7YoTxpZEJOWvw4Ug/records/rubygems-scraper.md

What you get

Output fieldMeaning
name, version, platformGem name as RubyGems spells it, latest version, and its platform (ruby, java, …)
downloads, versionDownloadsAll-time downloads for the gem, and downloads for the latest version alone
lastReleaseWhen the latest version was pushed
authors, infoAuthor line and the gem's description, verbatim from the gemspec
licensesDeclared SPDX licence identifiers
yanked, shaWhether the latest version was withdrawn, plus its checksum
homepageUri, sourceCodeUri, documentationUri, changelogUri, bugTrackerUri, mailingListUri, wikiUri, fundingUriThe gem's declared links, each null when unset
projectUri, gemUriRubyGems page and the direct .gem download URL
metadataThe raw gemspec metadata map, including flags like rubygems_mfa_required
runtimeDependencies, developmentDependenciesDependency name and version requirement for the latest version
releaseCount, firstRelease, releasesVersion history, total count, project age, and per-version detail (opt-in)
scrapedAtRun timestamp

A RUN_SUMMARY record in the key-value store holds per-run counts, the filters used, unknown gem names and any lookup that failed.

Common use cases

  • Dependency and licence audits. Resolve a Gemfile.lock into licences, maintainership and transitive requirements.
  • Adoption tracking. downloads versus versionDownloads shows how fast a new release is actually being taken up.
  • Abandonment detection. A large releaseCount with an old lastRelease is the signal you are looking for.
  • Release monitoring. Run with no input on a schedule to capture whatever RubyGems published since the last sweep.

Quick start

Three gems, default depth:

{
"packages": ["rails", "rspec", "sidekiq"]
}

A dependency audit with full history:

{
"packages": ["rails", "puma", "nokogiri", "devise"],
"includeVersionHistory": true,
"maxVersions": 50,
"includeDependencies": true
}

Release monitor, no input at all:

{}

Input

FieldTypeDefaultNotes
packagesarray[]Gem names or rubygems.org/gems/. URLs. Empty pulls the most recently published gems from the activity feed.
includeVersionHistorybooleanfalseAdd the releases array and fill in releaseCount and firstRelease. Costs one extra request per gem.
maxVersionsinteger20Cap on entries in releases, newest first. releaseCount still reports the true total.
includeDependenciesbooleantrueInclude runtimeDependencies and developmentDependencies. They arrive free with the gem lookup.
maxPackagesinteger25Cap on gems per run. Applies to both an explicit list and the activity-feed fallback.

Blanks, duplicates and trailing .json are stripped before any request goes out, and two inputs that resolve to the same gem are only saved once.

Gem names are case-sensitive

This trips people up more than anything else about the RubyGems API. rubygems.org/api/v1/gems/RedCloth.json returns 200; the same URL with redcloth returns 404. Paste the name exactly as it appears on the gem's RubyGems page.

As a safety net, a mixed-case name that 404s is retried once in lowercase, so Rails still finds rails. The reverse is not recoverable: nothing about redcloth tells the Actor where the capitals belong.

Output example

{
"name": "rails",
"version": "8.1.3.1",
"platform": "ruby",
"lastRelease": "2026-07-29T15:02:41.060Z",
"downloads": 772174102,
"versionDownloads": 981377,
"authors": "David Heinemeier Hansson",
"info": "Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity.",
"licenses": ["MIT"],
"yanked": false,
"sha": "ccd11a36bfc171bf9c66d585d14c0ece91c0c9dde840aae60c0118d6f5c9c52a",
"projectUri": "https://rubygems.org/gems/rails",
"gemUri": "https://rubygems.org/gems/rails-8.1.3.1.gem",
"homepageUri": "https://rubyonrails.org",
"documentationUri": "https://api.rubyonrails.org/v8.1.3.1/",
"sourceCodeUri": "https://github.com/rails/rails/tree/v8.1.3.1",
"bugTrackerUri": "https://github.com/rails/rails/issues",
"changelogUri": "https://github.com/rails/rails/releases/tag/v8.1.3.1",
"mailingListUri": "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"wikiUri": null,
"fundingUri": null,
"metadata": { "rubygems_mfa_required": "true" },
"runtimeDependencies": [
{ "name": "activesupport", "requirements": "= 8.1.3.1" },
{ "name": "bundler", "requirements": ">= 1.15.0" }
],
"developmentDependencies": [],
"releaseCount": 519,
"firstRelease": "2009-07-25T18:01:56.000Z",
"releases": [
{
"version": "8.1.3.1",
"platform": "ruby",
"releasedAt": "2026-07-29T15:02:41.060Z",
"downloads": 984407,
"prerelease": false,
"rubyVersion": ">= 3.2.0",
"licenses": ["MIT"],
"sha": "ccd11a36bfc171bf9c66d585d14c0ece91c0c9dde840aae60c0118d6f5c9c52a"
}
],
"scrapedAt": "2026-08-06T11:41:07.204Z"
}

API example

curl -X POST "https://api.apify.com/v2/acts/arman-bd~rubygems-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"packages": ["rails", "sidekiq"],
"includeVersionHistory": true,
"maxVersions": 10
}'

Limits and behaviour

  • authors is a single string, not a list. RubyGems stores it as free text and plenty of gems use a comma inside one name, "Datadog, Inc.", so splitting on commas would invent authors that do not exist. The field is passed through exactly as published.
  • Version history is a second endpoint. releaseCount, firstRelease and releases come from /api/v1/versions/{gem}.json, which is why they are null unless includeVersionHistory is on. That response is large, Rails returns 519 versions and about 450 KB.
  • The no-input path costs one request. The activity feed returns fully-formed gem objects, so the 25 default records are built without a single per-gem lookup. It lists a gem once per push, so repeats are collapsed before the cap is applied.
  • A missing gem is a per-item failure. RubyGems answers 404 with a plain-text body, not JSON; that name lands in RUN_SUMMARY.unknownPackages and the run carries on. The Actor errors out only when every lookup failed.
  • Transient errors are retried. 429 and 5xx get three attempts with backoff, honouring Retry-After when RubyGems sends one. Requests are spaced 200 ms apart, comfortably inside the documented public-API budget.
  • Dependencies describe the latest version only. The API does not expose historical dependency graphs; releases entries carry version, date, downloads and platform, not requirements.

Defaults: 1 GB memory, 15 minute timeout.

FAQ

Do I need a RubyGems account or API key? No. You supply no credentials.

Does it need a proxy? No. There is nothing for a proxy to solve.

Why is versionDownloads so much smaller than downloads? downloads is all-time across every version ever published; versionDownloads counts only the latest one. Their ratio is a decent proxy for upgrade velocity.

Can I get metadata for a specific old version? Turn on includeVersionHistory, each entry carries its own date, download count, Ruby requirement and checksum.

What does platform mean? Most gems are ruby (pure Ruby, any platform). Native extensions publish per-platform variants such as java or x86_64-linux, and each is a separate row in the version history.

Can I schedule it? Yes. Diff on version or lastRelease between runs to detect new releases, and use the empty-input mode to catch gems you weren't already tracking.

Can I integrate it with something else? Yes, Apify API, client libraries, webhooks, scheduled runs, dataset exports (JSON/CSV/Excel) or MCP. Output is structured JSON.