crates.io HTTP API Reference
Reference
Note: All paths presented here are relative to https://crates.io/api/v1!
/cratesGET/versionsGET/{version_id}GET
/keywordsGET/{keyword_id}GET
/categoriesGET/{category_id}GET
/category_slugsGET/users(no access)/{user_id}GET
Description
GET /crates
Get general info about crates.
Parameters
categoryLimit results to crates in this category- valid values: any
- no fall back
followingLimit results to crates the requesting user is following- valid values: any
- no fall back
keywordsLimit results to crates with this keyword- valid values: any
- no fall back
letterPattern-based search (in particular, SQL LIKE-based)- valid values: any
- no fall back
q?- valid values: ?
- no fall back
sortResults sorting method- valid values:
alpha,downloads - falls back to
alpha
- valid values:
user_idLimit results to crates of this user- valid values: any
- no fall back
PUT /crates/new
Create a new crate.
GET /crates/{crate_id}
Get general info about :crate_id crate.
GET /crates/{crate_id}/{version}
Get info about :crate_id crate of version :version.
GET /crates/{crate_id}/{version}/download
Download tar-gzipped source code of :crate_id crate of version :version.
GET /crates/{crate_id}/{version}/dependencies
List dependencies of :crate_id crate of version :version.
GET /crates/{crate_id}/{version}/downloads
Get number of downloads by date of :crate_id crate of version :version.
Parameters
before_dateLimit results to downloads before the specified date- valid values: date in format
%Y-%m-%d, where%Y— 4 digits of year,%m— month from 1 to 12,%d— day of month from 1 to 31 - no fall back
- valid values: date in format
GET /crates/{crate_id}/{version}/authors
List authors of :crate_id crate of version :version.
DELETE /crates/{crate_id}/{version}/yank
Yank :crate_id crate of version :version.
PUT /crates/{crate_id}/{version}/unyank
Unyank :crate_id crate of version :version.
GET /crates/{crate_id}/downloads
Get number of total downloads of :crate_id crate.
GET /crates/{crate_id}/versions
List versions of :crate_id crate.
PUT /crates/{crate_id}/follow
?
DELETE /crates/{crate_id}/follow
?
GET /crates/{crate_id}/following
?
GET /crates/{crate_id}/owners
List owners of :crate_id crate.
PUT /crates/{crate_id}/owners
Add an owner to :crate_id crate.
DELETE /crates/{crate_id}/owners
Delete an owner from :crate_id crate.
GET /crates/{crate_id}/reverse_dependencies
List reverse dependencies of :crate_id crate.
GET /versions
?
Parameters
ids[]?- valid values: ?
- no fall back
GET /versions/{version_id}
?
GET /keywords
List keywords of crates uploaded to crates.io.
Parameters
sortResults sorting method- valid values:
alpha,crates - falls back to
alpha
- valid values:
GET /keywords/{keyword_id}
Get info about the :keyword_id keyword.
GET /categories
List categories of crates uploaded to crates.io.
Parameters
sortResults sorting method- valid values:
alpha,crates - falls back to
alpha
- valid values:
GET /categories/{category_id}
Get info about the :category_id category.
GET /category_slugs
?
GET /users/{user_id}
Get info about the :user_id user.