# crates.io API — $0.0003 per crate

> crates.io API: Rust package search from the crates.io registry — downloads, versions. $0.0003 per delivered crate, nothing delivered means nothing charged.

[Home](https://quanticdata.io/)/[Collectors](https://quanticdata.io/collectors/)/*crates.io API*

# 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.

[Get my free API key](https://app.quanticdata.io/register) [See the request](/collectors/crates-io-api/#integration)

$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 / crate**6,666 crates on the free $2 every month

**Semantic input**query, sort, max_results — no URL lists

**Up to 100**crates per run, pagination handled for you

**No browser**read over HTTP/TLS — cheaper and faster than rendering

On this page: [What it is](/collectors/crates-io-api/#what) [Output fields](/collectors/crates-io-api/#output) [Inputs](/collectors/crates-io-api/#input) [Pricing](/collectors/crates-io-api/#pricing) [Integration](/collectors/crates-io-api/#integration) [Use cases](/collectors/crates-io-api/#use-cases) [Versus the alternatives](/collectors/crates-io-api/#compare) [FAQ](/collectors/crates-io-api/#faq)

## 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.

Input is meaning, not a URL *query* *sort* *max_results*

## 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.

| Field | Type | What it holds |
| --- | --- | --- |
| `rank` | integer | 1-based position. |
| `name` | string | Crate name. |
| `description` | string · nullable | Description. |
| `version` | string · nullable | Latest stable version. |
| `downloads` | integer · nullable | All-time downloads. |
| `recent_downloads` | integer · nullable | Downloads in the last 90 days. |
| `created_at` | string · nullable | First publish. |
| `updated_at` | string · nullable | Last update. |
| `homepage` | string · nullable | Homepage. |
| `documentation` | string · nullable | Docs URL. |
| `repository` | string · nullable | Repository URL. |
| `exact_match` | boolean | Query matched the name exactly. |
| `url` | string | crates.io page. |

## Inputs

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

| Input | Type | Required | What it does |
| --- | --- | --- | --- |
| `query` | string | yes | Crate name or keyword. |
| `sort` | string | no | Result order. |
| `max_results` | integer | no | How 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.0003**per delivered crate*$0.3 per 1,000 delivered crates*

**6,666 crates**on the free allowance*$2 every month, no card*

**Zero rows**zero charge*blocks, captchas and retries are on us*

**−30%**on volume tiers*the 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

Most popular

### Growth

$79/mo

- $50 free credit / month

- 600 requests / min

- 20% 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](https://quanticdata.io/web-data-api-for-ai/). 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 '{}'
```

```
import requests

r = requests.post(
    "https://api.quanticdata.io/v1/scraper/collectors/crates_io/run",
    headers={"Authorization": f"Bearer {QD_API_KEY}"},
    json={},
    timeout=120,
)
for row in r.json()["payload"]["results"]:
    print(row)
```

```
const res = await fetch(
  "https://api.quanticdata.io/v1/scraper/collectors/crates_io/run",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.QD_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({}),
  },
);
const { payload } = await res.json();
console.table(payload.results);
```

```
claude mcp add quantumproxies \
  -e QUANTUMPROXIES_API_KEY=qd_live_your_key_here \
  -- npx -y quantumproxies-mcp

# then, in the chat:
> run the crates_io collector with
```

## 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 scraper | This collector |
| --- | --- | --- |
| Registry search | Page through the web UI or raw API yourself | Ranked crate rows in one call, sorted how you ask |
| Activity signal | An all-time total that flatters old crates | A separate 90-day downloads column beside it |
| Exact hits | Guess whether the top result is the crate you named | An exact-match flag on the row that is |

## FAQ

Questions we get about the crates.io API.

[Something else? Ask us →](mailto:hello@quanticdata.io)

### 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](https://app.quanticdata.io/register)

Related: [All 74 collectors](https://quanticdata.io/collectors/) [npm registry API](https://quanticdata.io/collectors/npm-registry-api/) [PyPI API](https://quanticdata.io/collectors/pypi-api/) [Docker Hub API](https://quanticdata.io/collectors/docker-hub-api/) [Documentation](https://quanticdata.io/docs/)

---

Source: https://quanticdata.io/collectors/crates-io-api/ · Site index for AI: https://quanticdata.io/llms.txt
