Last updated
Changelogcrates.io API
HealthyRead-onlyStructured data from crates.io. Generated from crates.io.
/crate_downloads1 credit per callCrate Downloads
Daily download counts for a crate over the last 90 days, per version and in total per day.
Authorization: Bearer <key> on every request.Parameters
crate name, e.g. serde
Response fields
daily_totals
datedownloadsversion_downloads
versiondownloadsdateother_versions_downloads
datedownloadsfetched_atagecurl "https://api.maviapi.com/v1/sites/crates/crate_downloads?name=serde" \-H "Authorization: Bearer $MAVI_KEY"
{
"daily_totals": [
{
"date": "string",
"downloads": 0
}
],
"version_downloads": [
{
"version": 0,
"downloads": 0,
"date": "string"
}
],
"other_versions_downloads": [
{
"date": "string",
"downloads": 0
}
],
"fetched_at": "string",
"age": 0
}Get all the data, no code
Collect every page of GET /crate_downloads into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use crates.io API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of crates.io API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=crates -- npx -y '@maviapi/mcp'Import crates.io API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/crates/openapi.json - Postman
https://api.maviapi.com/v1/apis/crates/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the crates.io API
Choose a starting endpoint
- Crate Downloads
GET /crate_downloadsDaily download counts for a crate over the last 90 days, per version and in total per day.
Parameters and response fields for GET /crate_downloads
Request parameters Name Type / location Required Description name string / query No crate name, e.g. serde Response fields Field Type Description daily_totals object[] daily_totals[].date string daily_totals[].downloads integer version_downloads object[] version_downloads[].version integer version_downloads[].downloads integer version_downloads[].date string other_versions_downloads object[] other_versions_downloads[].date string other_versions_downloads[].downloads integer fetched_at string age integer - Search Crates
GET /search_cratesSearch / list crates (the site's crate list and search page).
Parameters and response fields for GET /search_crates
Request parameters Name Type / location Required Description q string / query No search text; empty string lists all crates sort string / query No one of relevance, downloads, recent-downloads, recent-updates, new, alpha category string / query No optional category slug filter, e.g. parsing keyword string / query No optional keyword filter, e.g. json page integer / query No page number starting at 1 per_page integer / query No results per page (max 100) Response fields Field Type Description total integer page integer per_page integer crates object[] crates[].id string crates[].name string crates[].updated_at string crates[].versions null crates[].keywords null crates[].categories null crates[].badges string[] crates[].created_at string crates[].downloads integer crates[].recent_downloads integer crates[].default_version string crates[].num_versions integer crates[].yanked boolean crates[].max_version string crates[].newest_version string crates[].max_stable_version string crates[].description string crates[].homepage string crates[].documentation string crates[].repository string crates[].links object crates[].links.version_downloads string crates[].links.versions string crates[].links.owners string crates[].links.owner_team string crates[].links.owner_user string crates[].links.reverse_dependencies string crates[].exact_match boolean crates[].trustpub_only boolean pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get Crate
GET /get_crateCrate detail page: metadata, versions, keywords, categories, owners and readme of the default version.
Parameters and response fields for GET /get_crate
Request parameters Name Type / location Required Description name string / query No crate name, e.g. serde Response fields Field Type Description crate object crate.id string crate.name string crate.updated_at string crate.versions integer[] crate.keywords string[] crate.categories string[] crate.badges string[] crate.created_at string crate.downloads integer crate.recent_downloads integer crate.default_version string crate.num_versions integer crate.yanked boolean crate.max_version string crate.newest_version string crate.max_stable_version string crate.description string crate.homepage string crate.documentation string crate.repository string crate.links object crate.links.version_downloads string crate.links.versions null crate.links.owners string crate.links.owner_team string crate.links.owner_user string crate.links.reverse_dependencies string crate.exact_match boolean crate.trustpub_only boolean versions object[] versions[].id integer versions[].crate string versions[].num string versions[].dl_path string versions[].readme_path string versions[].updated_at string versions[].created_at string versions[].downloads integer versions[].features object versions[].features.alloc string[] versions[].features.default string[] versions[].features.derive string[] versions[].features.rc string[] versions[].features.std string[] versions[].features.unstable string[] versions[].yanked boolean versions[].yank_message null versions[].lib_links null versions[].license string versions[].links object versions[].links.dependencies string versions[].links.version_downloads string versions[].links.authors string versions[].crate_size integer versions[].published_by object versions[].published_by.id integer versions[].published_by.login string versions[].published_by.name string versions[].published_by.avatar string versions[].published_by.url string versions[].published_by.github_username_matches boolean versions[].published_by.created_at string versions[].audit_actions object[] versions[].audit_actions[].action string versions[].audit_actions[].user object versions[].audit_actions[].user.id integer versions[].audit_actions[].user.login string versions[].audit_actions[].user.name string versions[].audit_actions[].user.avatar string versions[].audit_actions[].user.url string versions[].audit_actions[].user.github_username_matches boolean versions[].audit_actions[].user.created_at string versions[].audit_actions[].time string versions[].checksum string versions[].rust_version string versions[].has_lib boolean versions[].bin_names string[] versions[].edition string versions[].description string versions[].homepage string versions[].documentation string versions[].repository string versions[].trustpub_data null versions[].linecounts object versions[].linecounts.languages object versions[].linecounts.languages.Rust object versions[].linecounts.languages.Rust.code_lines integer versions[].linecounts.languages.Rust.comment_lines integer versions[].linecounts.languages.Rust.files integer versions[].linecounts.total_code_lines integer versions[].linecounts.total_comment_lines integer keywords object[] keywords[].id string keywords[].keyword string keywords[].created_at string keywords[].crates_cnt integer categories object[] categories[].id string categories[].category string categories[].slug string categories[].description string categories[].created_at string categories[].crates_cnt integer owners object[] owners[].kind string owners[].id integer owners[].login string owners[].url string owners[].name string owners[].avatar string owners[].github_username_matches boolean readme_html string fetched_at string age integer - Crate Versions
GET /crate_versionsList the published versions of a crate (cursor-paginated).
Parameters and response fields for GET /crate_versions
Request parameters Name Type / location Required Description name string / query No crate name, e.g. serde per_page integer / query No results per page (max 100) sort string / query No semver or date seek string / query No cursor from a previous response's next_seek; empty for the first page Response fields Field Type Description total integer next_seek string versions object[] versions[].id integer versions[].crate string versions[].num string versions[].dl_path string versions[].readme_path string versions[].updated_at string versions[].created_at string versions[].downloads integer versions[].features object versions[].features.alloc string[] versions[].features.default string[] versions[].features.derive string[] versions[].features.rc string[] versions[].features.std string[] versions[].features.unstable string[] versions[].yanked boolean versions[].yank_message null versions[].lib_links null versions[].license string versions[].links object versions[].links.dependencies string versions[].links.version_downloads string versions[].links.authors string versions[].crate_size integer versions[].published_by object versions[].published_by.id integer versions[].published_by.login string versions[].published_by.name string versions[].published_by.avatar string versions[].published_by.url string versions[].published_by.github_username_matches boolean versions[].published_by.created_at string versions[].audit_actions object[] versions[].audit_actions[].action string versions[].audit_actions[].user object versions[].audit_actions[].user.id integer versions[].audit_actions[].user.login string versions[].audit_actions[].user.name string versions[].audit_actions[].user.avatar string versions[].audit_actions[].user.url string versions[].audit_actions[].user.github_username_matches boolean versions[].audit_actions[].user.created_at string versions[].audit_actions[].time string versions[].checksum string versions[].rust_version string versions[].has_lib boolean versions[].bin_names string[] versions[].edition string versions[].description string versions[].homepage string versions[].documentation string versions[].repository string versions[].trustpub_data null versions[].linecounts object versions[].linecounts.languages object versions[].linecounts.languages.Rust object versions[].linecounts.languages.Rust.code_lines integer versions[].linecounts.languages.Rust.comment_lines integer versions[].linecounts.languages.Rust.files integer versions[].linecounts.total_code_lines integer versions[].linecounts.total_comment_lines integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Crate Version
GET /crate_versionDetail of one crate version: metadata, features, licence, plus its dependencies.
Parameters and response fields for GET /crate_version
Request parameters Name Type / location Required Description name string / query No crate name, e.g. serde version string / query No exact version number, e.g. 1.0.228; empty for the crate's default version Response fields Field Type Description version object version.id integer version.crate string version.num string version.dl_path string version.readme_path string version.updated_at string version.created_at string version.downloads integer version.features object version.features.alloc string[] version.features.default string[] version.features.derive string[] version.features.rc string[] version.features.std string[] version.features.unstable string[] version.yanked boolean version.yank_message null version.lib_links null version.license string version.links object version.links.dependencies string version.links.version_downloads string version.links.authors string version.crate_size integer version.published_by object version.published_by.id integer version.published_by.login string version.published_by.name string version.published_by.avatar string version.published_by.url string version.published_by.github_username_matches boolean version.published_by.created_at string version.audit_actions object[] version.audit_actions[].action string version.audit_actions[].user object version.audit_actions[].user.id integer version.audit_actions[].user.login string version.audit_actions[].user.name string version.audit_actions[].user.avatar string version.audit_actions[].user.url string version.audit_actions[].user.github_username_matches boolean version.audit_actions[].user.created_at string version.audit_actions[].time string version.checksum string version.rust_version string version.has_lib boolean version.bin_names string[] version.edition string version.description string version.homepage string version.documentation string version.repository string version.trustpub_data null version.linecounts object version.linecounts.languages object version.linecounts.languages.Rust object version.linecounts.languages.Rust.code_lines integer version.linecounts.languages.Rust.comment_lines integer version.linecounts.languages.Rust.files integer version.linecounts.total_code_lines integer version.linecounts.total_comment_lines integer dependencies object[] dependencies[].id integer dependencies[].version_id integer dependencies[].crate_id string dependencies[].req string dependencies[].optional boolean dependencies[].default_features boolean dependencies[].features string[] dependencies[].target null dependencies[].kind string dependencies[].downloads integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Crate Reverse Dependencies
GET /crate_reverse_dependenciesCrates that depend on the given crate (the "Dependents" tab).
Parameters and response fields for GET /crate_reverse_dependencies
Request parameters Name Type / location Required Description name string / query No crate name, e.g. serde page integer / query No page number starting at 1 per_page integer / query No results per page (max 100) Response fields Field Type Description total integer page integer dependents object[] dependents[].crate string dependents[].version string dependents[].req string dependents[].optional boolean dependents[].kind string dependents[].downloads integer dependents[].description string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - List Categories
GET /list_categoriesList all top-level crate categories with their crate counts.
Parameters and response fields for GET /list_categories
Request parameters Name Type / location Required Description page integer / query No page number starting at 1 per_page integer / query No results per page (max 100) sort string / query No alpha or crates Response fields Field Type Description total integer page integer categories object[] categories[].id string categories[].category string categories[].slug string categories[].description string categories[].created_at string categories[].crates_cnt integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Summary
GET /summaryFront-page summary: total crates and downloads, new, most downloaded, recently downloaded, just updated crates, popular keywords and popular categories.
Parameters and response fields for GET /summary
Response fields Field Type Description num_downloads integer num_crates integer new_crates object[] new_crates[].id string new_crates[].name string new_crates[].updated_at string new_crates[].versions null new_crates[].keywords null new_crates[].categories null new_crates[].badges string[] new_crates[].created_at string new_crates[].downloads integer new_crates[].recent_downloads null new_crates[].default_version string new_crates[].num_versions integer new_crates[].yanked boolean new_crates[].max_version string new_crates[].newest_version string new_crates[].max_stable_version string new_crates[].description string new_crates[].homepage null new_crates[].documentation null new_crates[].repository string new_crates[].links object new_crates[].links.version_downloads string new_crates[].links.versions string new_crates[].links.owners string new_crates[].links.owner_team string new_crates[].links.owner_user string new_crates[].links.reverse_dependencies string new_crates[].exact_match boolean new_crates[].trustpub_only boolean most_downloaded object[] most_downloaded[].id string most_downloaded[].name string most_downloaded[].updated_at string most_downloaded[].versions null most_downloaded[].keywords null most_downloaded[].categories null most_downloaded[].badges string[] most_downloaded[].created_at string most_downloaded[].downloads integer most_downloaded[].recent_downloads integer most_downloaded[].default_version string most_downloaded[].num_versions integer most_downloaded[].yanked boolean most_downloaded[].max_version string most_downloaded[].newest_version string most_downloaded[].max_stable_version string most_downloaded[].description string most_downloaded[].homepage null most_downloaded[].documentation null most_downloaded[].repository string most_downloaded[].links object most_downloaded[].links.version_downloads string most_downloaded[].links.versions string most_downloaded[].links.owners string most_downloaded[].links.owner_team string most_downloaded[].links.owner_user string most_downloaded[].links.reverse_dependencies string most_downloaded[].exact_match boolean most_downloaded[].trustpub_only boolean most_recently_downloaded object[] most_recently_downloaded[].id string most_recently_downloaded[].name string most_recently_downloaded[].updated_at string most_recently_downloaded[].versions null most_recently_downloaded[].keywords null most_recently_downloaded[].categories null most_recently_downloaded[].badges string[] most_recently_downloaded[].created_at string most_recently_downloaded[].downloads integer most_recently_downloaded[].recent_downloads integer most_recently_downloaded[].default_version string most_recently_downloaded[].num_versions integer most_recently_downloaded[].yanked boolean most_recently_downloaded[].max_version string most_recently_downloaded[].newest_version string most_recently_downloaded[].max_stable_version string most_recently_downloaded[].description string most_recently_downloaded[].homepage null most_recently_downloaded[].documentation string most_recently_downloaded[].repository string most_recently_downloaded[].links object most_recently_downloaded[].links.version_downloads string most_recently_downloaded[].links.versions string most_recently_downloaded[].links.owners string most_recently_downloaded[].links.owner_team string most_recently_downloaded[].links.owner_user string most_recently_downloaded[].links.reverse_dependencies string most_recently_downloaded[].exact_match boolean most_recently_downloaded[].trustpub_only boolean just_updated object[] just_updated[].id string just_updated[].name string just_updated[].updated_at string just_updated[].versions null just_updated[].keywords null just_updated[].categories null just_updated[].badges string[] just_updated[].created_at string just_updated[].downloads integer just_updated[].recent_downloads integer just_updated[].default_version string just_updated[].num_versions integer just_updated[].yanked boolean just_updated[].max_version string just_updated[].newest_version string just_updated[].max_stable_version string just_updated[].description string just_updated[].homepage string just_updated[].documentation null just_updated[].repository string just_updated[].links object just_updated[].links.version_downloads string just_updated[].links.versions string just_updated[].links.owners string just_updated[].links.owner_team string just_updated[].links.owner_user string just_updated[].links.reverse_dependencies string just_updated[].exact_match boolean just_updated[].trustpub_only boolean popular_keywords object[] popular_keywords[].id string popular_keywords[].keyword string popular_keywords[].created_at string popular_keywords[].crates_cnt integer popular_categories object[] popular_categories[].id string popular_categories[].category string popular_categories[].slug string popular_categories[].description string popular_categories[].created_at string popular_categories[].crates_cnt integer fetched_at string age integer - Get Category
GET /get_categoryCategory detail page: description, subcategories, parent categories and the crates in it.
Parameters and response fields for GET /get_category
Request parameters Name Type / location Required Description slug string / query No category slug, e.g. parsing or web-programming::http-client sort string / query No crate order: recent-downloads, downloads, recent-updates, new, alpha page integer / query No page number of the crate list, starting at 1 per_page integer / query No crates per page (max 100) Response fields Field Type Description category object category.id string category.category string category.slug string category.description string category.created_at string category.crates_cnt integer category.subcategories string[] category.parent_categories string[] total_crates integer page integer crates object[] crates[].id string crates[].name string crates[].updated_at string crates[].versions null crates[].keywords null crates[].categories null crates[].badges string[] crates[].created_at string crates[].downloads integer crates[].recent_downloads integer crates[].default_version string crates[].num_versions integer crates[].yanked boolean crates[].max_version string crates[].newest_version string crates[].max_stable_version string crates[].description string crates[].homepage null crates[].documentation null crates[].repository string crates[].links object crates[].links.version_downloads string crates[].links.versions string crates[].links.owners string crates[].links.owner_team string crates[].links.owner_user string crates[].links.reverse_dependencies string crates[].exact_match boolean crates[].trustpub_only boolean pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - List Keywords
GET /list_keywordsList keywords used by crates, with crate counts.
Parameters and response fields for GET /list_keywords
Request parameters Name Type / location Required Description page integer / query No page number starting at 1 per_page integer / query No results per page (max 100) sort string / query No crates (most used first) or alpha Response fields Field Type Description total integer page integer keywords object[] keywords[].id string keywords[].keyword string keywords[].created_at string keywords[].crates_cnt integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get Keyword
GET /get_keywordKeyword detail page: the keyword and the crates tagged with it.
Parameters and response fields for GET /get_keyword
Request parameters Name Type / location Required Description keyword string / query No keyword, e.g. json sort string / query No crate order: recent-downloads, downloads, recent-updates, new, alpha page integer / query No page number of the crate list, starting at 1 per_page integer / query No crates per page (max 100) Response fields Field Type Description keyword object keyword.id string keyword.keyword string keyword.created_at string keyword.crates_cnt integer total_crates integer page integer crates object[] crates[].id string crates[].name string crates[].updated_at string crates[].versions null crates[].keywords null crates[].categories null crates[].badges string[] crates[].created_at string crates[].downloads integer crates[].recent_downloads integer crates[].default_version string crates[].num_versions integer crates[].yanked boolean crates[].max_version string crates[].newest_version string crates[].max_stable_version string crates[].description string crates[].homepage null crates[].documentation string crates[].repository string crates[].links object crates[].links.version_downloads string crates[].links.versions string crates[].links.owners string crates[].links.owner_team string crates[].links.owner_user string crates[].links.reverse_dependencies string crates[].exact_match boolean crates[].trustpub_only boolean pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get Team
GET /get_teamTeam page: the owning team and the crates it owns.
Parameters and response fields for GET /get_team
Request parameters Name Type / location Required Description login string / query No team login as shown in crate owners, e.g. github:serde-rs:publish sort string / query No crate order: alpha, downloads, recent-downloads, recent-updates, new page integer / query No page number of the crate list, starting at 1 per_page integer / query No crates per page (max 100) Response fields Field Type Description team object team.id integer team.login string team.name string team.avatar string team.url string total_crates integer page integer crates object[] crates[].id string crates[].name string crates[].updated_at string crates[].versions null crates[].keywords null crates[].categories null crates[].badges string[] crates[].created_at string crates[].downloads integer crates[].recent_downloads integer crates[].default_version string crates[].num_versions integer crates[].yanked boolean crates[].max_version string crates[].newest_version string crates[].max_stable_version string crates[].description string crates[].homepage string crates[].documentation string crates[].repository string crates[].links object crates[].links.version_downloads string crates[].links.versions string crates[].links.owners string crates[].links.owner_team string crates[].links.owner_user string crates[].links.reverse_dependencies string crates[].exact_match boolean crates[].trustpub_only boolean pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Get User
GET /get_userUser profile page: the user and the crates they own.
Parameters and response fields for GET /get_user
Request parameters Name Type / location Required Description login string / query No GitHub login of the user, e.g. dtolnay sort string / query No crate order: alpha, downloads, recent-downloads, recent-updates, new page integer / query No page number of the crate list, starting at 1 per_page integer / query No crates per page (max 100) Response fields Field Type Description user object user.id integer user.login string user.name string user.avatar string user.url string user.github_username_matches boolean user.created_at string total_crates integer page integer crates object[] crates[].id string crates[].name string crates[].updated_at string crates[].versions null crates[].keywords null crates[].categories null crates[].badges string[] crates[].created_at string crates[].downloads integer crates[].recent_downloads integer crates[].default_version string crates[].num_versions integer crates[].yanked boolean crates[].max_version string crates[].newest_version string crates[].max_stable_version string crates[].description string crates[].homepage null crates[].documentation string crates[].repository string crates[].links object crates[].links.version_downloads string crates[].links.versions string crates[].links.owners string crates[].links.owner_team string crates[].links.owner_user string crates[].links.reverse_dependencies string crates[].exact_match boolean crates[].trustpub_only boolean pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer
Export crates.io data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
Search CratesGET /search_crates | id, name, updated_at, versions, keywords, categories, badges, created_at, downloads, recent_downloads, default_version, num_versions, yanked, max_version, newest_version, max_stable_version, description, homepage, documentation, repository, links, exact_match, trustpub_only |
Crate VersionsGET /crate_versions | id, crate, num, dl_path, readme_path, updated_at, created_at, downloads, features, yanked, yank_message, lib_links, license, links, crate_size, published_by, audit_actions, checksum, rust_version, has_lib, bin_names, edition, description, homepage, documentation, repository, trustpub_data, linecounts |
Crate VersionGET /crate_version | id, version_id, crate_id, req, optional, default_features, features, target, kind, downloads |
Crate Reverse DependenciesGET /crate_reverse_dependencies | crate, version, req, optional, kind, downloads, description |
List CategoriesGET /list_categories | id, category, slug, description, created_at, crates_cnt |
Get CategoryGET /get_category | id, name, updated_at, versions, keywords, categories, badges, created_at, downloads, recent_downloads, default_version, num_versions, yanked, max_version, newest_version, max_stable_version, description, homepage, documentation, repository, links, exact_match, trustpub_only |
List KeywordsGET /list_keywords | id, keyword, created_at, crates_cnt |
Get KeywordGET /get_keyword | id, name, updated_at, versions, keywords, categories, badges, created_at, downloads, recent_downloads, default_version, num_versions, yanked, max_version, newest_version, max_stable_version, description, homepage, documentation, repository, links, exact_match, trustpub_only |
Get TeamGET /get_team | id, name, updated_at, versions, keywords, categories, badges, created_at, downloads, recent_downloads, default_version, num_versions, yanked, max_version, newest_version, max_stable_version, description, homepage, documentation, repository, links, exact_match, trustpub_only |
Get UserGET /get_user | id, name, updated_at, versions, keywords, categories, badges, created_at, downloads, recent_downloads, default_version, num_versions, yanked, max_version, newest_version, max_stable_version, description, homepage, documentation, repository, links, exact_match, trustpub_only |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
crates.io API questions
What you get, what it costs and how to call it.
Is there an official crates.io API?
This crates.io API is not official. It is an independent, hosted API from maviapi for the public data on crates.io, and it is not made, endorsed or supported by crates.io. Whether crates.io offers a developer API of its own is a question for crates.io. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.
What data can I get from the crates.io API?
The crates.io API has 13 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/crate_downloads: Daily download counts for a crate over the last 90 days, per version and in total per day. - GET
/search_crates: Search / list crates (the site's crate list and search page). - GET
/get_crate: Crate detail page: metadata, versions, keywords, categories, owners and readme of the default version. - GET
/crate_versions: List the published versions of a crate (cursor-paginated). - GET
/crate_version: Detail of one crate version: metadata, features, licence, plus its dependencies. - GET
/crate_reverse_dependencies: Crates that depend on the given crate (the "Dependents" tab). - GET
/list_categories: List all top-level crate categories with their crate counts. - GET
/summary: Front-page summary: total crates and downloads, new, most downloaded, recently downloaded, just updated crates, popular keywords and popular categories. - GET
/get_category: Category detail page: description, subcategories, parent categories and the crates in it. - GET
/list_keywords: List keywords used by crates, with crate counts. - GET
/get_keyword: Keyword detail page: the keyword and the crates tagged with it. - GET
/get_team: Team page: the owning team and the crates it owns. - GET
/get_user: User profile page: the user and the crates they own.
How much does the crates.io API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 1 credit per call. On the Basic plan ($19 a month for 25,000 credits), 1,000 calls cost about $0.76. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the crates.io API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /crate_downloads:
curl 'https://api.maviapi.com/v1/sites/crates/crate_downloads' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get crates.io data as JSON?
Each way to get crates.io data as JSON fits a different need:
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on crates.io are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The crates.io API on this page: 13 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when crates.io changes its layout?
Your code does not change. maviapi keeps the crates.io API working when crates.io changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my crates.io API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), withโฆ
- Eventbrite API
Events listed on Eventbrite for a city and date range: dates, venue with address and coordinates, image and summaryโฆ
- Songkick Concerts API
Upcoming concerts and music festivals in any city from Songkick, for a date window, with venues, performers, pricesโฆ