crates.io Scraper: Crates, Versions, Downloads & Dependents avatar

crates.io Scraper: Crates, Versions, Downloads & Dependents

Pricing

from $5.00 / 1,000 crate (details or search hit)s

Go to Apify Store
crates.io Scraper: Crates, Versions, Downloads & Dependents

crates.io Scraper: Crates, Versions, Downloads & Dependents

Export Rust crate metadata, version history, daily download series, owners and reverse dependencies from the official crates.io API. No login, no HTML parsing.

Pricing

from $5.00 / 1,000 crate (details or search hit)s

Rating

0.0

(0)

Developer

Alex Burton

Alex Burton

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Export Rust package data from crates.io to JSON, CSV or Excel. Everything comes from the official crates.io API, so there is no HTML parsing and no login.

One Actor, six jobs:

ModeWhat you get
Crate detailsDescription, newest and max-stable version, all-time and recent downloads, keywords, categories, licence, minimum Rust version, edition, crate size, repository and dates
Version historyEvery version with its publish date, download count, yanked flag, licence, size, minimum Rust version, edition and publisher
Daily downloadsOne row per day, optionally broken down by version
OwnersEvery user and team that can publish the crate
Reverse dependenciesThe crates that depend on yours, with their version, download count and the version requirement they declare
Registry searchcrates.io search results sorted by relevance, downloads, recency or name

Why use this one

  • Reverse dependencies are actually usable. The crates.io API returns dependency edges and crate versions as two separate arrays that mean nothing until you join them on an internal ID. This Actor does the join, so you get "crate X version Y depends on you, requiring ^1.0" in one flat row.
  • Minimum Rust version and edition as columns. rustVersion and edition are pulled from the newest version of every crate, which is what you need when checking whether a dependency tree will build on your toolchain.
  • Yanked versions kept by default. Auditing a lockfile means seeing what was withdrawn, not hiding it.
  • Polite by design. crates.io asks clients to identify themselves and throttles hard. This Actor sends a descriptive User-Agent and defaults to two parallel requests, so runs finish instead of getting rate-limited.

How to use it

  1. Choose What to scrape.
  2. Add Crates by name or crates.io link, or write Search queries.
  3. Click Start, then download the results or pull them through the Apify API.

Example input: who depends on my crate

{
"mode": "reverseDependencies",
"crates": ["serde"],
"maxReverseDependencies": 500
}

Example input: audit a dependency list

{
"mode": "crateDetails",
"crates": ["serde", "tokio", "reqwest", "clap"]
}

Example input: the most downloaded HTTP crates

{
"mode": "search",
"searchQueries": ["http client"],
"searchSort": "downloads",
"maxResultsPerSearch": 100
}

Output

Each item carries a type field: crate, version, downloads, owner or reverseDependency.

Crate

{
"type": "crate",
"registry": "crates.io",
"name": "serde",
"description": "A generic serialization/deserialization framework",
"newestVersion": "1.0.229",
"downloads": 512345678,
"recentDownloads": 41234567,
"versionCount": 291,
"license": "MIT OR Apache-2.0",
"rustVersion": "1.61",
"edition": "2018",
"repository": "https://github.com/serde-rs/serde",
"url": "https://crates.io/crates/serde"
}

Reverse dependency

{
"type": "reverseDependency",
"name": "serde",
"dependentCrate": "hashbrown",
"dependentVersion": "0.17.1",
"dependentDownloads": 98123456,
"requirement": "^1.0",
"dependencyKind": "normal",
"isOptional": true,
"url": "https://crates.io/crates/hashbrown"
}

How daily downloads are counted

crates.io splits a day's downloads between the few versions it itemises and a remainder covering every other version. A day's total here is the sum of both, so it matches the figure on the crate's page. Turn on Break downloads down by version to get a row per version instead; the remainder arrives as one extra row per day labelled other versions, flagged with isRemainder.

Pricing

Pay only for results:

ResultPrice
Crate (details or search hit)$5.00 per 1,000
Version, owner, download day or reverse dependency$1.00 per 1,000

Set a maximum spend per run in the run options and the Actor stops cleanly when it is reached.

Limits to know about

These come from crates.io, not from this Actor:

  • crates.io rate-limits hard. Keep Max parallel requests at 2 unless you see no throttling in the log. A throttled run retries with backoff rather than failing, but it takes longer.
  • Daily downloads cover roughly the last 90 days. crates.io does not serve a longer public series, and per-version rows exist only for versions still being downloaded. Older traffic is folded into an "extra downloads" total with no version attached.
  • Reverse dependencies are paged 100 at a time and widely used crates have tens of thousands, so set Max reverse dependencies to what you actually need.
  • license, rustVersion, edition and crateSizeBytes describe the newest version, not the crate as a whole. They can differ between versions; use Version history mode for the full picture.
  • Only published crates are visible. There is no private registry access here.

FAQ

Do I need a crates.io account or token? No. Everything here is public.

Why is my search returning fewer results than crates.io shows? Set Max results per search query higher; it defaults to 50.

Can I track a crate daily? Yes. Create a schedule in Apify Console and connect the dataset to Slack, Google Sheets, Zapier or Make.

What does dependencyKind mean? normal, dev or build, matching Cargo's dependency sections.

Feedback

Found a bug or need a field that is missing? Open an issue on the Actor's Issues tab.