RubyGems API
Free RubyGems API with no key: gem metadata, versions, download counts, dependencies, licence and source URLs. CORS enabled. Tested curl example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the RubyGems API?
The RubyGems API is a free, key-free registry API returning metadata for any published Ruby gem — current version, download counts, dependencies, licences and source code URLs.
RubyGems exposes clean, flat JSON for every gem. Unlike some registries the response is immediately readable: name, version, downloads, authors, licences and dependencies all sit at the top level with no envelope to unwrap.
The split between `downloads` (all-time) and `version_downloads` (this version only) is useful for judging adoption of a recent release, which a single total cannot tell you.
Quick facts
- Base URL
https://rubygems.org/api/v1- Authentication
- No API key for reads. Publishing gems requires an API key.
- Rate limit
- About 10 requests per second; heavier consumers should use the published data dumps.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the RubyGems API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch metadata for a Ruby gem
GET https://rubygems.org/api/v1/gems/rails.json
curl 'https://rubygems.org/api/v1/gems/rails.json'const res = await fetch("https://rubygems.org/api/v1/gems/rails.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://rubygems.org/api/v1/gems/rails.json", timeout=20)
res.raise_for_status()
print(res.json()){
"name": "rails",
"downloads": 777445565,
"version": "8.1.3.1",
"version_created_at": "2026-07-29T15:02:41.060Z",
"version_downloads": 2902228,
"platform": "ruby",
"authors": "David Heinemeier Hansson",
"info": "Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.",
"licenses": [
"MIT"
],
"metadata": {
"changelog_uri": "https://github.com/rails/rails/releases/tag/v8.1.3.1",
"bug_tracker_uri": "https://github.com/rails/rails/issues",
"source_code_uri": "https://github.com/rails/rails/tree/v8.1.3.1",
"mailing_list_uri": "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"documentation_uri": "https://api.rubyonrails.org/v8.1.3.1/",
"rubygems_mfa_required": "true"
},
"yanked": false,
"sha": "ccd11a36bfc171bf9c66d585d14c0ece91c0c9dde840aae60c0118d6f5c9c52a",
"spec_sha": "5b60af49df6edf722925a85d144f1118abda22485a820da2c516e97cab8347b8",
"project_uri": "https://rubygems.org/gems/rails",
"gem_uri": "https://rubygems.org/gems/rails-8.1.3.1.gem",
"homepage_uri": "https://rubyonrails.org",
"wiki_uri": null,
"documentation_uri": "https://api.rubyonrails.org/v8.1.3.1/",
"mailing_list_uri": "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"source_code_uri": "https://github.com/rails/rails/tree/v8.1.3.1",
"bug_tracker_uri": "https://github.com/rails/rails/issues",
"changelog_uri": "https://github.com/rails/rails/releases/tag/v8.1.3.1",
"funding_uri": null,
"dependencies": {Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
gems/<name>.json | path | Required | Gem name. rails |
versions/<name>.json | path | Optional | All published versions of a gem. rails |
search.json?query= | path | Optional | Search gems by keyword. http |
Response fields
namestring- Gem name.
versionstring- Current released version.
downloadsinteger- All-time download count.
version_downloadsinteger- Downloads of the current version only.
authorsstring- Gem authors as a single string.
licensesarray- Licence identifiers.
source_code_uri / homepage_uristring- Repository and homepage links, often null.
dependenciesobject- Runtime and development dependencies.
What you can build with the RubyGems API
- Display the current version of a gem in documentation or a badge
- Check whether a dependency has a newer release
- Audit gem licences for compliance
- Compare adoption between gems using download counts
Common errors and how to fix them
404
Gem name not found.
Fix: Gem names are case-sensitive and use hyphens or underscores exactly as published.
null source_code_uri
Not every gem declares its repository.
Fix: Fall back to homepage_uri, then to the RubyGems page itself.
RubyGems API — frequently asked questions
Is the RubyGems API free?
Yes, reads require no API key. An API key is only needed to publish or yank gems.
How do I get the latest version of a gem?
Request /api/v1/gems/<name>.json and read the `version` field, which always reflects the current release.
What is the difference between downloads and version_downloads?
`downloads` is all-time across every version; `version_downloads` counts only the current version, which is a better signal of whether a recent release has been adopted.
Can I see a gem's dependencies?
Yes, the `dependencies` object separates runtime from development dependencies, each with version requirements.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
Alternatives to RubyGems API
If RubyGems does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| GitHub REST API | GitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token. | No key | Yes | 19 Aug 2026 |
| JSONPlaceholder | Free fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples. | No key | Yes | 19 Aug 2026 |
| Postman Echo | Postman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example. | No key | No | 19 Aug 2026 |
| DummyJSON | Free fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples. | No key | Yes | 19 Aug 2026 |
| Shields.io | Free badge API with no key: generate SVG status badges for READMEs from a URL, with custom labels, colours, logos and live data from 100+ services. Tested. | No key | Yes | 19 Aug 2026 |
| Simple Icons CDN | Fetch any brand's official SVG logo by slug, already coloured, with one GET request. No key, no npm install, permissive CORS. Verified example and sizing notes. | No key | Yes | 21 Aug 2026 |
RubyGems is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.