Documentation Blog Free tools [email protected]Log in

crates.io API

A crates.io API that runs cargo search from code: query the Rust package registry and each crate comes back as one row — description, latest stable version, all-time and 90-day crate downloads, first-publish and last-update timestamps, and the homepage, documentation and repository links. Order results by relevance, downloads, recent downloads, recent updates or newest.

$0.0003 per delivered crate · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/crates_io/run
$ curl $QD/crates_io/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{}'
{ "status": "done", "count": 10,
  "results": [
    {
      "name": "…",
      "description": "…",
      "version": "…",
      "downloads": … } ],
  "cost": 0.003 }
# 10 crates × $0.0003 · nothing delivered, nothing charged
$0.0003 / crate6,666 crates on the free $2 every month
Semantic inputquery, sort, max_results — no URL lists
Up to 100crates per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

What a crates.io API does

The Rust package registry API is keyless and genuinely searchable at origin — rarer than it sounds, since PyPI offers no equivalent. The value here is the shape: crates arrive in the same row schema as the npm and PyPI collectors, so one key and one format cover a polyglot dependency dataset instead of three registry clients.

Two download columns tell different stories: downloads is the all-time total that rewards old crates, while recent_downloads counts the last 90 days and shows what the ecosystem installs now. An exact_match flag marks the row whose name equals your query, so "serde" the crate is distinguishable from crates about serde.

What one crate looks like

Every delivered crate carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based position.
namestringCrate name.
descriptionstring · nullableDescription.
versionstring · nullableLatest stable version.
downloadsinteger · nullableAll-time downloads.
recent_downloadsinteger · nullableDownloads in the last 90 days.
created_atstring · nullableFirst publish.
updated_atstring · nullableLast update.
homepagestring · nullableHomepage.
documentationstring · nullableDocs URL.
repositorystring · nullableRepository URL.
exact_matchbooleanQuery matched the name exactly.
urlstringcrates.io page.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
querystringyesCrate name or keyword.
sortstringnoResult order.
max_resultsintegernoHow many crates to deliver at most (1–100). You pay only for delivered crates.

Pricing

crates.io API pricing

$0.0003 per delivered crate. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 crates before you spend anything.

$0.0003per delivered crate$0.3 per 1,000 delivered crates
6,666 crateson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Pay as you go

$0/mo
  • $2 free credit / month
  • 60 requests / min
  • List unit prices

Starter

$19/mo
  • $15 free credit / month
  • 300 requests / min
  • 10% off unit prices

Scale

$299/mo
  • $250 free credit / month
  • 1,200 requests / min
  • 30% off unit prices

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/crates_io/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/crates_io/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

What people build with the crates.io API

Three shapes of work this endpoint was designed around.

Rust dependency shortlists

Search "http client" sorted by downloads and hand over the ranked rows — version, links, both download counts — to whoever picks the dependency.

Cross-registry comparison

The same query against this, npm and PyPI yields three tables in one schema, which turns an ecosystem comparison into a join instead of a chore.

Crate freshness checks

Low recent_downloads against a large all-time total, plus an old updated_at, flags the abandoned crates in a dependency list.

crates.io API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
Registry searchPage through the web UI or raw API yourselfRanked crate rows in one call, sorted how you ask
Activity signalAn all-time total that flatters old cratesA separate 90-day downloads column beside it
Exact hitsGuess whether the top result is the crate you namedAn exact-match flag on the row that is

FAQ

Questions we get about the crates.io API.

Something else? Ask us →

Does crates.io have a real search endpoint?

Yes — unlike PyPI, the Rust registry supports keyword search natively, and this reads it directly: one row per crate with metadata, links and both download counts, no token required at the source.

What is the difference between downloads and recent_downloads?

downloads is the crate's all-time total; recent_downloads covers the last 90 days. Sorting by the recent figure surfaces what Rust projects install today rather than what they installed years ago.

Can I see a crate's dependencies in the results?

No — rows describe the crates themselves: version, downloads, dates and links. Dependency graphs are not part of the registry's search response, so resolving a tree stays a job for cargo.

Is there a free crates.io API?

Every account gets $2 of credit every month with no card, which is about 6,666 delivered crates on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0003. A run capped at 100 crates — the maximum for this collector — costs $0.03 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the crates.io API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Get my free API key
Get my free API key