BYTETOOLS

crates.io API

Free crates.io API with no key: Rust crate metadata, versions, download counts, dependencies and repository links. CORS enabled. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 19 Aug 2026

What is the crates.io API?

The crates.io API is the free, key-free registry API for Rust packages, returning crate metadata, every published version, download statistics, dependencies and repository links.

crates.io is the official Rust package registry, and its API is fully open for reads. A single crate request returns the description, licence, repository, documentation link, download totals and the complete version history.

The registry asks that automated clients send a descriptive User-Agent with contact details. This is enforced in practice — generic user agents can be blocked — so set one before building anything that polls.

Quick facts

Base URL
https://crates.io/api/v1
Authentication
No API key for reads. crates.io requires a descriptive User-Agent identifying your tool and a contact address.
Rate limit
Roughly 1 request per second for automated clients; bulk consumers should use the database dumps instead.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the crates.io 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 Rust crate

GET https://crates.io/api/v1/crates/serde

curl
curl 'https://crates.io/api/v1/crates/serde'
JavaScript (fetch)
const res = await fetch("https://crates.io/api/v1/crates/serde");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://crates.io/api/v1/crates/serde", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "crate": {
    "id": "serde",
    "name": "serde",
    "updated_at": "2026-07-18T23:05:13.266456Z",
    "versions": [
      2817185,
      1748414,
      1746112,
      1739049,
      1731560,
      1730829,
      1729657,
      1729573,
      1728804,
      1728680,
      1476368,
      1453061,
      1387964,
      1370847,
      1336088,
      1317878,
      1311481,
      1311391,
      1310780,
      1262146,
      1246742,
      1236532,
      1232938,
      1231005,
      1227207,
      1195122,
      1155749,
      1145069,
      1138012,
      1131884,
      1127880,
      1117094,
      1057075,
      1029184,
      1005793,
      1001382,
      962580,
      947780,
      947429,
      935283,
      924082,
      881758,
      881445,
      879591,
      876663,
      876632,
      865547,
      864891,
      862726,
      859451,
      858772,
      857573,
      856339,
      855606,
      853213,
      851305,
      850113,
      850061,
      850055,
      842589,
      842403,
      842025,
      841944,
      840681,
      837934,
      837604,
      818064,
      797029,
      792938,
      792908,
      773194,
      761332,
      754405,
      752788,
      749292,
      747404,
      745129,
      744000,
      691601,
      685308,
      681082,
      676945,
      671664,
      647090,
      646778,
      626961,
      606237,
      598895,
      595739,
      594649,
      587380,
      582429,
      577052,
      541963,
      489577,
      488041,
      487064,
      475782,
      469421,
      465434,
      418637,
      416728,
      415805,

Parameters

ParameterTypeRequiredDescription
crates/<name>pathRequiredCrate name. serde
qstringOptionalSearch query on /crates. http client
per_pageintegerOptionalResults per page on search, max 100. 10
sortstringOptionaldownloads, recent-downloads, recent-updates or alphabetical. downloads

Response fields

crate.id / namestring
Crate identifier.
crate.descriptionstring
Short description.
crate.downloadsinteger
All-time download count.
crate.recent_downloadsinteger
Downloads in the last 90 days — a better activity signal.
crate.max_stable_versionstring
Latest stable release.
crate.repository / documentationstring
Source and docs URLs.
versionsarray
Every published version with yank status and licence.

What you can build with the crates.io API

  • Display the current version of a Rust crate in documentation
  • Compare crates by recent download activity when choosing a dependency
  • Audit licences across a Cargo dependency tree
  • Detect yanked versions in use

Common errors and how to fix them

403 or blocked

Missing or generic User-Agent.

Fix: Send a User-Agent naming your tool and a contact email, as crates.io policy requires.

404

Crate name not found.

Fix: Crate names use hyphens, not underscores, in the URL even when the Rust module uses underscores.

429

Polling too fast.

Fix: Keep to about one request per second; for bulk analysis use the published database dumps instead of the API.

crates.io API — frequently asked questions

Does the crates.io API need an API key?

No key is needed for reads, but crates.io requires a descriptive User-Agent header identifying your tool and a contact address. Requests without one can be blocked.

What is the difference between downloads and recent_downloads?

`downloads` is all-time and heavily favours old crates. `recent_downloads` covers the last 90 days and is a much better signal of whether a crate is actively used.

How do I check if a version was yanked?

Each entry in the `versions` array has a `yanked` boolean. Yanked versions remain downloadable for existing lockfiles but should not be newly adopted.

Can I use this for bulk analysis of the whole registry?

No — crates.io asks that bulk consumers use the daily database dumps rather than crawling the API, which is rate limited to about one request per second.

Tools that pair with this API

Alternatives to crates.io API

If crates.io 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.

APIWhat it doesAuthCORSLast verified
GitHub REST APIGitHub 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 keyYes19 Aug 2026
JSONPlaceholderFree 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 keyYes19 Aug 2026
Postman EchoPostman 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 keyNo19 Aug 2026
DummyJSONFree 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 keyYes19 Aug 2026
CTANRead LaTeX package metadata from CTAN as JSON: authors, licence, version, documentation links and descriptions. No API key. Verified example and parsing notes.No keyNo21 Aug 2026
Debian SourcesSearch Debian source packages and browse their file trees as JSON, with no key. Covers every suite from oldstable to sid. Verified example and endpoint map.No keyNo21 Aug 2026
All Developer & Testing APIs

crates.io 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.