APIs / Apps and media / crates.io
1 credit per call3 endpoints11 datapointsChecked working 6 Dec 2026
crates.io API
crates.io API for Rust crate search, crate details with downloads and version history, and reverse dependencies as JSON. 1 credit per successful call.
{
"success": true,
"data": {
"total": 26924,
"page": 1,
"has_more": true,
"count": 10,
"items": [
{
"name": "serde",
"description": "A generic serialization/deserialization framework",
"latest_version": "1.0.229",
"downloads": 1817058559,
"recent_downloads": 473498822,
"created_at": "2014-12-05T20:20:39.487502Z",
"updated_at": "2026-07-18T23:05:13.266456Z",
"repository": "https://github.com/serde-rs/serde",
"homepage": "https://serde.rs",
"documentation": "https://docs.rs/serde",
"url": "https://crates.io/crates/serde"
},
{
"name": "serde-saphyr",
"description": "YAML (de)serializer for Serde, emphasizing panic-free parsing, fast builds and good error reporting. Supports properties, include, tag and comment capture",
"latest_version": "2.2.0",
"downloads": 24968458,
"recent_downloads": 19277102,
"created_at": "2025-09-27T20:32:53.691021Z",
"updated_at": "2026-11-18T17:29:51.155259Z",
"repository": "https://github.com/bourumir-wyngs/serde-saphyr",
"documentation": "https://docs.rs/serde-saphyr/latest/serde-saphyr/",
"url": "https://crates.io/crates/serde-saphyr"
},
{
"name": "clickhouse",
"description": "Official Rust client for ClickHouse DB",
"latest_version": "0.15.3",
"downloads": 18479195,
"recent_downloads": 6388959,
"created_at": "2017-05-17T22:21:47.894469Z",
"updated_at": "2026-10-13T08:26:54.451769Z",
"repository": "https://github.com/ClickHouse/clickhouse-rs",
"homepage": "https://clickhouse.com",
"url": "https://crates.io/crates/clickhouse"
}
]
},
"meta": {
"request_id": "req_0e5468a6abb64ad1bd3920ec78ed7e68",
"credits_charged": 1,
"credits_remaining": 1997
}
}Sample data
What one call returns
A recorded run of search: the fields and shapes you will get, shortened to 3 items.
| # | namestring | descriptionstring | latest_versionstring | downloadsinteger | recent_downloadsinteger | created_atstring | updated_atstring | repositoryurl | homepageurl | documentationurl | urlurl |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | serde | A generic serialization/deserialization framework | 1.0.229 | 1817058559 | 473498822 | 2014-12-05T20:20:39.487502Z | 2026-07-18T23:05:13.266456Z | https://github.com/serde-rs/serde | https://serde.rs | https://docs.rs/serde | https://crates.io/crates/serde |
| 2 | serde-saphyr | YAML (de)serializer for Serde, emphasizing panic-free parsing, fast builds and good error reporting. Supports properties, include, tag and comment capture | 2.2.0 | 24968458 | 19277102 | 2025-09-27T20:32:53.691021Z | 2026-11-18T17:29:51.155259Z | https://github.com/bourumir-wyngs/serde-saphyr | — | https://docs.rs/serde-saphyr/latest/serde-saphyr/ | https://crates.io/crates/serde-saphyr |
| 3 | clickhouse | Official Rust client for ClickHouse DB | 0.15.3 | 18479195 | 6388959 | 2017-05-17T22:21:47.894469Z | 2026-10-13T08:26:54.451769Z | https://github.com/ClickHouse/clickhouse-rs | https://clickhouse.com | — | https://crates.io/crates/clickhouse |
[
{
"name": "serde",
"description": "A generic serialization/deserialization framework",
"latest_version": "1.0.229",
"downloads": 1817058559,
"recent_downloads": 473498822,
"created_at": "2014-12-05T20:20:39.487502Z",
"updated_at": "2026-07-18T23:05:13.266456Z",
"repository": "https://github.com/serde-rs/serde",
"homepage": "https://serde.rs",
"documentation": "https://docs.rs/serde",
"url": "https://crates.io/crates/serde"
},
{
"name": "serde-saphyr",
"description": "YAML (de)serializer for Serde, emphasizing panic-free parsing, fast builds and good error reporting. Supports properties, include, tag and comment capture",
"latest_version": "2.2.0",
"downloads": 24968458,
"recent_downloads": 19277102,
"created_at": "2025-09-27T20:32:53.691021Z",
"updated_at": "2026-11-18T17:29:51.155259Z",
"repository": "https://github.com/bourumir-wyngs/serde-saphyr",
"documentation": "https://docs.rs/serde-saphyr/latest/serde-saphyr/",
"url": "https://crates.io/crates/serde-saphyr"
},
{
"name": "clickhouse",
"description": "Official Rust client for ClickHouse DB",
"latest_version": "0.15.3",
"downloads": 18479195,
"recent_downloads": 6388959,
"created_at": "2017-05-17T22:21:47.894469Z",
"updated_at": "2026-10-13T08:26:54.451769Z",
"repository": "https://github.com/ClickHouse/clickhouse-rs",
"homepage": "https://clickhouse.com",
"url": "https://crates.io/crates/clickhouse"
}
]name,description,latest_version,downloads,recent_downloads,created_at,updated_at,repository,homepage,documentation,url serde,A generic serialization/deserialization framework,1.0.229,1817058559,473498822,2014-12-05T20:20:39.487502Z,2026-07-18T23:05:13.266456Z,https://github.com/serde-rs/serde,https://serde.rs,https://docs.rs/serde,https://crates.io/crates/serde serde-saphyr,"YAML (de)serializer for Serde, emphasizing panic-free parsing, fast builds and good error reporting. Supports properties, include, tag and comment capture",2.2.0,24968458,19277102,2025-09-27T20:32:53.691021Z,2026-11-18T17:29:51.155259Z,https://github.com/bourumir-wyngs/serde-saphyr,,https://docs.rs/serde-saphyr/latest/serde-saphyr/,https://crates.io/crates/serde-saphyr clickhouse,Official Rust client for ClickHouse DB,0.15.3,18479195,6388959,2017-05-17T22:21:47.894469Z,2026-10-13T08:26:54.451769Z,https://github.com/ClickHouse/clickhouse-rs,https://clickhouse.com,,https://crates.io/crates/clickhouse
Recorded from our API · 3 items shown · 11 datapoints per itemGET /v1/crates-io/search?query=serde&per_page=10
11 datapoints
Identity
- namestring
Contact
- urlurl
Location
- latest_versionstring
Other
- descriptionstring
- downloadsinteger
- recent_downloadsinteger
- created_atstring
- updated_atstring
- repositoryurl
- homepageurl
- documentationurl
Playground
Run this API
curl "https://api.perceptlayer.com/v1/crates-io/search?query=serde&per_page=10" \
-H "X-API-Key: $API_KEY"crates.io · 3 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/crates-io/crate | name | namedescriptionlatest_versiondownloadsrecent_downloadscreated_at+10 more | 1 credit |
GET/v1/crates-io/reverse-dependencies | name+2 optional | crateversionrequirementkindoptionaldownloads+1 more | 1 credit |
GET/v1/crates-io/search | query+3 optional | namedescriptionlatest_versiondownloadsrecent_downloadscreated_at+5 more | 1 credit |
Overview
About the crates.io API
What you can get
The crates.io API returns Rust crate data from crates.io as JSON through 3 endpoints.
- Search:
searchtakes aquery, withsort(relevance, downloads, recent-downloads, recent-updates, new or alpha),pageandper_page(1 to 100). - Crates:
cratetakes a cratename. - Reverse dependencies:
reverse-dependenciestakes a cratename, withpageandper_page.
The recorded search for "serde" returns items, each with name, description, latest_version, downloads, recent_downloads, created_at, updated_at, repository, homepage, documentation and url, plus total (26,924 in that recording), page and has_more. The first result, serde, was at 1.0.229 with 1,817,058,559 downloads. crate adds latest_stable_version, version_count (316 for serde), keywords, categories and versions, each with version, created_at, downloads, yanked, license, rust_version, size_bytes and published_by.
How a call works
Search, then look up: GET /v1/crates-io/search?query=serde&per_page=10 with your key in the X-API-Key header returns each crate's name; crate and reverse-dependencies take that name, for example GET /v1/crates-io/reverse-dependencies?name=serde&per_page=10. Check has_more before asking for the next page. Answers come from a cache for up to an hour, so download counts can be up to an hour old. Every successful call costs 1 credit; failed calls cost nothing.
More apps and media APIs
Use cases
Vet a dependency: licence, minimum Rust version, yanked versions and release cadence
Use the crates.io API to vet a dependency: licence, minimum Rust version, yanked versions and release cadenceRank crates for a job by all-time or recent downloads
Use the crates.io API to rank crates for a job by all-time or recent downloadsMeasure a crate's reach through the crates that depend on it
Use the crates.io API to measure a crate's reach through the crates that depend on itSee how dependents use a crate, with each one's `requirement`, `kind` and `optional`
Use the crates.io API to see how dependents use a crate, with each one's `requirement`, `kind` and `optional`FAQ
Questions
How much does the crates.io API cost?
Each successful call costs one credit, and each page of results is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.
What does `reverse-dependencies` return?
Each dependent's `crate`, `version`, `requirement` (the version range it asks for), `kind`, `optional`, `downloads` and `url`, with a `total`. In the recording, `serde` had 146,477 reverse dependencies.
Does `crate` return every version?
It returns `version_count` and a `versions` list, each with its date, downloads, licence, `rust_version` and whether it was `yanked`. It does not return a crate's own dependency list.
Do I need a crates.io account?
No. You call this crates.io API with your Perceptlayer key in the `X-API-Key` header, with no crates.io login or token.
Is this the official crates.io API?
No. Perceptlayer is an independent service and is not affiliated with crates.io. It returns crates.io data as JSON with a Perceptlayer key, so there is no crates.io developer account, app review or partner approval to get first. It only reads data: if crates.io has an official API and you need to act on your own crates.io account, such as posting, managing orders or reading private data, use that one.
Should I build a crates.io scraper instead?
You can, but a crates.io scraper is code you maintain: page changes break it, requests get blocked, and crates.io's terms govern how you collect data. The crates.io API gives you 3 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.
Try the crates.io API with 100 free credits
No credit card. Failed calls are never billed.