Crates.io Scraper avatar

Crates.io Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Crates.io Scraper

Crates.io Scraper

Scrape Crates.io with the official Rust package registry. Search crates, lookup by exact name, browse by category or keyword, list a user's crates, and pull reverse dependencies. Returns downloads, versions, licenses, repository URLs, categories, keywords, and more.

Pricing

from $3.00 / 1,000 results

Rating

5.0

(7)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

7

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Scrape Crates.io — the official Rust package registry — at scale via the public REST API. Search crates, look up exact names, browse categories or keywords, list a user's published crates, or pull reverse dependencies for any crate. Returns full metadata: downloads, version history, license, repository, categories, keywords, owners, and more.

What this actor does

  • Six modes:

    • search — free-text query over the crate catalog
    • byCrates — exact crate-name lookup (one record per name)
    • byCategory — browse a category slug (58 categories supported)
    • byKeyword — browse a keyword tag (cli, async, wasm, etc.)
    • userCrates — every crate published by a given crates.io user
    • reverseDeps — every crate that depends on a given source crate
  • Sort orders: relevance, alphabetical, recent updates, recent downloads (90-day), all-time downloads, newest

  • Powerful filters: all-time download range, 90-day download range, version-count range, updated-since-days, substring keyword match

  • Optional enrichments: full version history (per-crate), owner users + teams

  • Pure HTTP via the public crates.io/api/v1 JSON API — no proxy, no cookies, no API key

Output per crate

FieldDescription
idCrate name (same as name)
nameCrate name
descriptionShort description from Cargo.toml
homepageProject homepage URL
documentationExternal docs URL (usually docs.rs/...)
repositorySource repository URL
downloadsAll-time downloads
recentDownloadsDownloads in the last 90 days
maxVersionHighest version published (incl. pre-release)
maxStableVersionHighest stable version
newestVersionMost recently published version
defaultVersionThe version shown on the crate page
versionCountTotal number of published versions
yankedtrue if the latest version is yanked
categories[]Category slugs
categoryTitles[]Human-readable category names (detail mode)
keywords[]Keyword tags
createdAtFirst-publish timestamp (ISO 8601)
updatedAtLatest-update timestamp (ISO 8601)
exactMatchWhether the search query matched this crate's name exactly
badges[]Crate badges
links{}Absolute URLs to upstream sub-resources (versions, owners, etc.)
crateUrlhttps://crates.io/crates/{name}
docsRsUrlhttps://docs.rs/{name}
versions[](optional) Per-version detail: num, downloads, license, crateSize, publishedAt, publishedBy, features, rustVersion, edition
owners{}(optional) users[] + teams[] lists
recordTypecrate (or reverseDependency for that mode)
scrapedAtISO 8601 timestamp

Empty fields are omitted — every key in the output has a real value.

reverseDeps mode output

When mode=reverseDeps, each record is a consumer crate (one that depends on the source crate), with: name, crateUrl, versionNum, requirement, kind (normal/dev/build), optional, defaultFeatures, features[], consumerDownloads, license, publishedAt, plus sourceCrate for context.

Input

FieldTypeDefaultDescription
modestringsearchOne of search, byCrates, byCategory, byKeyword, userCrates, reverseDeps
searchQuerystringtokioFree-text query (mode=search)
crateNamesarrayExact crate names (mode=byCrates)
categoryenumCategory slug (58 options)
keywordstringKeyword tag
userLoginstringCrates.io username (mode=userCrates)
sourceCratestringCrate name (mode=reverseDeps)
sortByenumrelevancerelevance, alphabetical, recent-updates, recent-downloads, downloads, new
minDownloads / maxDownloadsintAll-time download bounds
minRecentDownloads / maxRecentDownloadsint90-day download bounds
minVersionCount / maxVersionCountintVersion-count bounds
updatedSinceDaysintOnly emit crates updated within N days
containsKeywordstringCase-insensitive substring filter
includeVersionsboolfalseFetch full version history per crate
includeOwnersboolfalseFetch owner users + teams per crate
maxItemsint20Hard cap (1–5000)

Example use cases

Find the most-downloaded async runtimes

{
"mode": "byCategory",
"category": "asynchronous",
"sortBy": "downloads",
"maxItems": 25
}

Top CLI crates updated in the last 30 days

{
"mode": "byKeyword",
"keyword": "cli",
"sortBy": "recent-updates",
"updatedSinceDays": 30,
"maxItems": 50
}

Lookup specific crates with full version history

{
"mode": "byCrates",
"crateNames": ["serde", "tokio", "clap"],
"includeVersions": true,
"includeOwners": true
}

All crates by David Tolnay

{
"mode": "userCrates",
"userLogin": "dtolnay",
"sortBy": "downloads",
"maxItems": 100
}

Reverse dependencies of clap

{
"mode": "reverseDeps",
"sourceCrate": "clap",
"maxItems": 200
}

Data Source

All data comes from the public crates.io REST API (https://crates.io/api/v1). The API is rate-limited by user-agent — this actor identifies itself politely per the crates.io data-access policy.

No authentication. No proxy required. No cookies. Works on the Apify free plan.

Limitations

  • The crates.io reverse-dependencies endpoint can 500 for extremely popular crates (e.g. serde_json, tokio). The actor surfaces this via a status message and asks you to pick a smaller source crate.
  • Crates.io paginates search results; this actor stops after 2–3 consecutive empty pages (after filters) or when maxItems is hit.
  • Versions enrichment is capped at the 50 most recent versions per crate to keep payloads reasonable.

FAQ

Q: Do I need an API key? No. crates.io's REST API is fully public.

Q: Does it work without proxy? Yes. The actor runs without any proxy configuration.

Q: How fresh is the data? Real-time. Every record is built from a live API call.

Q: Can I get download stats per day? The per-version daily download stats are available via the /crates/{name}/downloads upstream endpoint. To keep dataset payloads compact, this actor surfaces aggregated downloads (all-time) and recentDownloads (90-day) on every record. Daily breakdown is exposed only when needed and is out of scope for this version.

Q: Why am I missing some fields for some crates? Empty fields are dropped from the output (no nulls, no empty strings). If a crate has no homepage or no repository, those keys won't appear on its record.