Skip to content

Last updated

Changelog

crates.io API

HealthyRead-only

Structured data from crates.io. Generated from crates.io.

Base URL
https://api.maviapi.com/v1/sites/crates
13
Endpoints
14 min ago
Last verified
100%
Uptime / 7d
926ms
p50 latency
GET/crate_downloads1 credit per call

Crate Downloads

Daily download counts for a crate over the last 90 days, per version and in total per day.

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

crate name, e.g. serde

daily_totalsobject[]2 fields
datestring
downloadsinteger
version_downloadsobject[]3 fields
versioninteger
downloadsinteger
datestring
other_versions_downloadsobject[]2 fields
datestring
downloadsinteger
fetched_atstring
ageinteger
Try itLive
GET
https://api.maviapi.com/v1/sites/crates/crate_downloads?name=serde
Request
curl "https://api.maviapi.com/v1/sites/crates/crate_downloads?name=serde" \
-H "Authorization: Bearer $MAVI_KEY"
Example323 B
{
  "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.

How to connect
https://mcp.maviapi.com/mcp

Or 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 import

Paste 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_downloads

    Daily 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
    NameType / locationRequiredDescription
    namestring / queryNocrate name, e.g. serde
    Response fields
    FieldTypeDescription
    daily_totalsobject[]
    daily_totals[].datestring
    daily_totals[].downloadsinteger
    version_downloadsobject[]
    version_downloads[].versioninteger
    version_downloads[].downloadsinteger
    version_downloads[].datestring
    other_versions_downloadsobject[]
    other_versions_downloads[].datestring
    other_versions_downloads[].downloadsinteger
    fetched_atstring
    ageinteger
  • Search Crates GET /search_crates

    Search / list crates (the site's crate list and search page).

    Parameters and response fields for GET /search_crates
    Request parameters
    NameType / locationRequiredDescription
    qstring / queryNosearch text; empty string lists all crates
    sortstring / queryNoone of relevance, downloads, recent-downloads, recent-updates, new, alpha
    categorystring / queryNooptional category slug filter, e.g. parsing
    keywordstring / queryNooptional keyword filter, e.g. json
    pageinteger / queryNopage number starting at 1
    per_pageinteger / queryNoresults per page (max 100)
    Response fields
    FieldTypeDescription
    totalinteger
    pageinteger
    per_pageinteger
    cratesobject[]
    crates[].idstring
    crates[].namestring
    crates[].updated_atstring
    crates[].versionsnull
    crates[].keywordsnull
    crates[].categoriesnull
    crates[].badgesstring[]
    crates[].created_atstring
    crates[].downloadsinteger
    crates[].recent_downloadsinteger
    crates[].default_versionstring
    crates[].num_versionsinteger
    crates[].yankedboolean
    crates[].max_versionstring
    crates[].newest_versionstring
    crates[].max_stable_versionstring
    crates[].descriptionstring
    crates[].homepagestring
    crates[].documentationstring
    crates[].repositorystring
    crates[].linksobject
    crates[].links.version_downloadsstring
    crates[].links.versionsstring
    crates[].links.ownersstring
    crates[].links.owner_teamstring
    crates[].links.owner_userstring
    crates[].links.reverse_dependenciesstring
    crates[].exact_matchboolean
    crates[].trustpub_onlyboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get Crate GET /get_crate

    Crate detail page: metadata, versions, keywords, categories, owners and readme of the default version.

    Parameters and response fields for GET /get_crate
    Request parameters
    NameType / locationRequiredDescription
    namestring / queryNocrate name, e.g. serde
    Response fields
    FieldTypeDescription
    crateobject
    crate.idstring
    crate.namestring
    crate.updated_atstring
    crate.versionsinteger[]
    crate.keywordsstring[]
    crate.categoriesstring[]
    crate.badgesstring[]
    crate.created_atstring
    crate.downloadsinteger
    crate.recent_downloadsinteger
    crate.default_versionstring
    crate.num_versionsinteger
    crate.yankedboolean
    crate.max_versionstring
    crate.newest_versionstring
    crate.max_stable_versionstring
    crate.descriptionstring
    crate.homepagestring
    crate.documentationstring
    crate.repositorystring
    crate.linksobject
    crate.links.version_downloadsstring
    crate.links.versionsnull
    crate.links.ownersstring
    crate.links.owner_teamstring
    crate.links.owner_userstring
    crate.links.reverse_dependenciesstring
    crate.exact_matchboolean
    crate.trustpub_onlyboolean
    versionsobject[]
    versions[].idinteger
    versions[].cratestring
    versions[].numstring
    versions[].dl_pathstring
    versions[].readme_pathstring
    versions[].updated_atstring
    versions[].created_atstring
    versions[].downloadsinteger
    versions[].featuresobject
    versions[].features.allocstring[]
    versions[].features.defaultstring[]
    versions[].features.derivestring[]
    versions[].features.rcstring[]
    versions[].features.stdstring[]
    versions[].features.unstablestring[]
    versions[].yankedboolean
    versions[].yank_messagenull
    versions[].lib_linksnull
    versions[].licensestring
    versions[].linksobject
    versions[].links.dependenciesstring
    versions[].links.version_downloadsstring
    versions[].links.authorsstring
    versions[].crate_sizeinteger
    versions[].published_byobject
    versions[].published_by.idinteger
    versions[].published_by.loginstring
    versions[].published_by.namestring
    versions[].published_by.avatarstring
    versions[].published_by.urlstring
    versions[].published_by.github_username_matchesboolean
    versions[].published_by.created_atstring
    versions[].audit_actionsobject[]
    versions[].audit_actions[].actionstring
    versions[].audit_actions[].userobject
    versions[].audit_actions[].user.idinteger
    versions[].audit_actions[].user.loginstring
    versions[].audit_actions[].user.namestring
    versions[].audit_actions[].user.avatarstring
    versions[].audit_actions[].user.urlstring
    versions[].audit_actions[].user.github_username_matchesboolean
    versions[].audit_actions[].user.created_atstring
    versions[].audit_actions[].timestring
    versions[].checksumstring
    versions[].rust_versionstring
    versions[].has_libboolean
    versions[].bin_namesstring[]
    versions[].editionstring
    versions[].descriptionstring
    versions[].homepagestring
    versions[].documentationstring
    versions[].repositorystring
    versions[].trustpub_datanull
    versions[].linecountsobject
    versions[].linecounts.languagesobject
    versions[].linecounts.languages.Rustobject
    versions[].linecounts.languages.Rust.code_linesinteger
    versions[].linecounts.languages.Rust.comment_linesinteger
    versions[].linecounts.languages.Rust.filesinteger
    versions[].linecounts.total_code_linesinteger
    versions[].linecounts.total_comment_linesinteger
    keywordsobject[]
    keywords[].idstring
    keywords[].keywordstring
    keywords[].created_atstring
    keywords[].crates_cntinteger
    categoriesobject[]
    categories[].idstring
    categories[].categorystring
    categories[].slugstring
    categories[].descriptionstring
    categories[].created_atstring
    categories[].crates_cntinteger
    ownersobject[]
    owners[].kindstring
    owners[].idinteger
    owners[].loginstring
    owners[].urlstring
    owners[].namestring
    owners[].avatarstring
    owners[].github_username_matchesboolean
    readme_htmlstring
    fetched_atstring
    ageinteger
  • Crate Versions GET /crate_versions

    List the published versions of a crate (cursor-paginated).

    Parameters and response fields for GET /crate_versions
    Request parameters
    NameType / locationRequiredDescription
    namestring / queryNocrate name, e.g. serde
    per_pageinteger / queryNoresults per page (max 100)
    sortstring / queryNosemver or date
    seekstring / queryNocursor from a previous response's next_seek; empty for the first page
    Response fields
    FieldTypeDescription
    totalinteger
    next_seekstring
    versionsobject[]
    versions[].idinteger
    versions[].cratestring
    versions[].numstring
    versions[].dl_pathstring
    versions[].readme_pathstring
    versions[].updated_atstring
    versions[].created_atstring
    versions[].downloadsinteger
    versions[].featuresobject
    versions[].features.allocstring[]
    versions[].features.defaultstring[]
    versions[].features.derivestring[]
    versions[].features.rcstring[]
    versions[].features.stdstring[]
    versions[].features.unstablestring[]
    versions[].yankedboolean
    versions[].yank_messagenull
    versions[].lib_linksnull
    versions[].licensestring
    versions[].linksobject
    versions[].links.dependenciesstring
    versions[].links.version_downloadsstring
    versions[].links.authorsstring
    versions[].crate_sizeinteger
    versions[].published_byobject
    versions[].published_by.idinteger
    versions[].published_by.loginstring
    versions[].published_by.namestring
    versions[].published_by.avatarstring
    versions[].published_by.urlstring
    versions[].published_by.github_username_matchesboolean
    versions[].published_by.created_atstring
    versions[].audit_actionsobject[]
    versions[].audit_actions[].actionstring
    versions[].audit_actions[].userobject
    versions[].audit_actions[].user.idinteger
    versions[].audit_actions[].user.loginstring
    versions[].audit_actions[].user.namestring
    versions[].audit_actions[].user.avatarstring
    versions[].audit_actions[].user.urlstring
    versions[].audit_actions[].user.github_username_matchesboolean
    versions[].audit_actions[].user.created_atstring
    versions[].audit_actions[].timestring
    versions[].checksumstring
    versions[].rust_versionstring
    versions[].has_libboolean
    versions[].bin_namesstring[]
    versions[].editionstring
    versions[].descriptionstring
    versions[].homepagestring
    versions[].documentationstring
    versions[].repositorystring
    versions[].trustpub_datanull
    versions[].linecountsobject
    versions[].linecounts.languagesobject
    versions[].linecounts.languages.Rustobject
    versions[].linecounts.languages.Rust.code_linesinteger
    versions[].linecounts.languages.Rust.comment_linesinteger
    versions[].linecounts.languages.Rust.filesinteger
    versions[].linecounts.total_code_linesinteger
    versions[].linecounts.total_comment_linesinteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • Crate Version GET /crate_version

    Detail of one crate version: metadata, features, licence, plus its dependencies.

    Parameters and response fields for GET /crate_version
    Request parameters
    NameType / locationRequiredDescription
    namestring / queryNocrate name, e.g. serde
    versionstring / queryNoexact version number, e.g. 1.0.228; empty for the crate's default version
    Response fields
    FieldTypeDescription
    versionobject
    version.idinteger
    version.cratestring
    version.numstring
    version.dl_pathstring
    version.readme_pathstring
    version.updated_atstring
    version.created_atstring
    version.downloadsinteger
    version.featuresobject
    version.features.allocstring[]
    version.features.defaultstring[]
    version.features.derivestring[]
    version.features.rcstring[]
    version.features.stdstring[]
    version.features.unstablestring[]
    version.yankedboolean
    version.yank_messagenull
    version.lib_linksnull
    version.licensestring
    version.linksobject
    version.links.dependenciesstring
    version.links.version_downloadsstring
    version.links.authorsstring
    version.crate_sizeinteger
    version.published_byobject
    version.published_by.idinteger
    version.published_by.loginstring
    version.published_by.namestring
    version.published_by.avatarstring
    version.published_by.urlstring
    version.published_by.github_username_matchesboolean
    version.published_by.created_atstring
    version.audit_actionsobject[]
    version.audit_actions[].actionstring
    version.audit_actions[].userobject
    version.audit_actions[].user.idinteger
    version.audit_actions[].user.loginstring
    version.audit_actions[].user.namestring
    version.audit_actions[].user.avatarstring
    version.audit_actions[].user.urlstring
    version.audit_actions[].user.github_username_matchesboolean
    version.audit_actions[].user.created_atstring
    version.audit_actions[].timestring
    version.checksumstring
    version.rust_versionstring
    version.has_libboolean
    version.bin_namesstring[]
    version.editionstring
    version.descriptionstring
    version.homepagestring
    version.documentationstring
    version.repositorystring
    version.trustpub_datanull
    version.linecountsobject
    version.linecounts.languagesobject
    version.linecounts.languages.Rustobject
    version.linecounts.languages.Rust.code_linesinteger
    version.linecounts.languages.Rust.comment_linesinteger
    version.linecounts.languages.Rust.filesinteger
    version.linecounts.total_code_linesinteger
    version.linecounts.total_comment_linesinteger
    dependenciesobject[]
    dependencies[].idinteger
    dependencies[].version_idinteger
    dependencies[].crate_idstring
    dependencies[].reqstring
    dependencies[].optionalboolean
    dependencies[].default_featuresboolean
    dependencies[].featuresstring[]
    dependencies[].targetnull
    dependencies[].kindstring
    dependencies[].downloadsinteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • Crate Reverse Dependencies GET /crate_reverse_dependencies

    Crates that depend on the given crate (the "Dependents" tab).

    Parameters and response fields for GET /crate_reverse_dependencies
    Request parameters
    NameType / locationRequiredDescription
    namestring / queryNocrate name, e.g. serde
    pageinteger / queryNopage number starting at 1
    per_pageinteger / queryNoresults per page (max 100)
    Response fields
    FieldTypeDescription
    totalinteger
    pageinteger
    dependentsobject[]
    dependents[].cratestring
    dependents[].versionstring
    dependents[].reqstring
    dependents[].optionalboolean
    dependents[].kindstring
    dependents[].downloadsinteger
    dependents[].descriptionstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • List Categories GET /list_categories

    List all top-level crate categories with their crate counts.

    Parameters and response fields for GET /list_categories
    Request parameters
    NameType / locationRequiredDescription
    pageinteger / queryNopage number starting at 1
    per_pageinteger / queryNoresults per page (max 100)
    sortstring / queryNoalpha or crates
    Response fields
    FieldTypeDescription
    totalinteger
    pageinteger
    categoriesobject[]
    categories[].idstring
    categories[].categorystring
    categories[].slugstring
    categories[].descriptionstring
    categories[].created_atstring
    categories[].crates_cntinteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Summary GET /summary

    Front-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
    FieldTypeDescription
    num_downloadsinteger
    num_cratesinteger
    new_cratesobject[]
    new_crates[].idstring
    new_crates[].namestring
    new_crates[].updated_atstring
    new_crates[].versionsnull
    new_crates[].keywordsnull
    new_crates[].categoriesnull
    new_crates[].badgesstring[]
    new_crates[].created_atstring
    new_crates[].downloadsinteger
    new_crates[].recent_downloadsnull
    new_crates[].default_versionstring
    new_crates[].num_versionsinteger
    new_crates[].yankedboolean
    new_crates[].max_versionstring
    new_crates[].newest_versionstring
    new_crates[].max_stable_versionstring
    new_crates[].descriptionstring
    new_crates[].homepagenull
    new_crates[].documentationnull
    new_crates[].repositorystring
    new_crates[].linksobject
    new_crates[].links.version_downloadsstring
    new_crates[].links.versionsstring
    new_crates[].links.ownersstring
    new_crates[].links.owner_teamstring
    new_crates[].links.owner_userstring
    new_crates[].links.reverse_dependenciesstring
    new_crates[].exact_matchboolean
    new_crates[].trustpub_onlyboolean
    most_downloadedobject[]
    most_downloaded[].idstring
    most_downloaded[].namestring
    most_downloaded[].updated_atstring
    most_downloaded[].versionsnull
    most_downloaded[].keywordsnull
    most_downloaded[].categoriesnull
    most_downloaded[].badgesstring[]
    most_downloaded[].created_atstring
    most_downloaded[].downloadsinteger
    most_downloaded[].recent_downloadsinteger
    most_downloaded[].default_versionstring
    most_downloaded[].num_versionsinteger
    most_downloaded[].yankedboolean
    most_downloaded[].max_versionstring
    most_downloaded[].newest_versionstring
    most_downloaded[].max_stable_versionstring
    most_downloaded[].descriptionstring
    most_downloaded[].homepagenull
    most_downloaded[].documentationnull
    most_downloaded[].repositorystring
    most_downloaded[].linksobject
    most_downloaded[].links.version_downloadsstring
    most_downloaded[].links.versionsstring
    most_downloaded[].links.ownersstring
    most_downloaded[].links.owner_teamstring
    most_downloaded[].links.owner_userstring
    most_downloaded[].links.reverse_dependenciesstring
    most_downloaded[].exact_matchboolean
    most_downloaded[].trustpub_onlyboolean
    most_recently_downloadedobject[]
    most_recently_downloaded[].idstring
    most_recently_downloaded[].namestring
    most_recently_downloaded[].updated_atstring
    most_recently_downloaded[].versionsnull
    most_recently_downloaded[].keywordsnull
    most_recently_downloaded[].categoriesnull
    most_recently_downloaded[].badgesstring[]
    most_recently_downloaded[].created_atstring
    most_recently_downloaded[].downloadsinteger
    most_recently_downloaded[].recent_downloadsinteger
    most_recently_downloaded[].default_versionstring
    most_recently_downloaded[].num_versionsinteger
    most_recently_downloaded[].yankedboolean
    most_recently_downloaded[].max_versionstring
    most_recently_downloaded[].newest_versionstring
    most_recently_downloaded[].max_stable_versionstring
    most_recently_downloaded[].descriptionstring
    most_recently_downloaded[].homepagenull
    most_recently_downloaded[].documentationstring
    most_recently_downloaded[].repositorystring
    most_recently_downloaded[].linksobject
    most_recently_downloaded[].links.version_downloadsstring
    most_recently_downloaded[].links.versionsstring
    most_recently_downloaded[].links.ownersstring
    most_recently_downloaded[].links.owner_teamstring
    most_recently_downloaded[].links.owner_userstring
    most_recently_downloaded[].links.reverse_dependenciesstring
    most_recently_downloaded[].exact_matchboolean
    most_recently_downloaded[].trustpub_onlyboolean
    just_updatedobject[]
    just_updated[].idstring
    just_updated[].namestring
    just_updated[].updated_atstring
    just_updated[].versionsnull
    just_updated[].keywordsnull
    just_updated[].categoriesnull
    just_updated[].badgesstring[]
    just_updated[].created_atstring
    just_updated[].downloadsinteger
    just_updated[].recent_downloadsinteger
    just_updated[].default_versionstring
    just_updated[].num_versionsinteger
    just_updated[].yankedboolean
    just_updated[].max_versionstring
    just_updated[].newest_versionstring
    just_updated[].max_stable_versionstring
    just_updated[].descriptionstring
    just_updated[].homepagestring
    just_updated[].documentationnull
    just_updated[].repositorystring
    just_updated[].linksobject
    just_updated[].links.version_downloadsstring
    just_updated[].links.versionsstring
    just_updated[].links.ownersstring
    just_updated[].links.owner_teamstring
    just_updated[].links.owner_userstring
    just_updated[].links.reverse_dependenciesstring
    just_updated[].exact_matchboolean
    just_updated[].trustpub_onlyboolean
    popular_keywordsobject[]
    popular_keywords[].idstring
    popular_keywords[].keywordstring
    popular_keywords[].created_atstring
    popular_keywords[].crates_cntinteger
    popular_categoriesobject[]
    popular_categories[].idstring
    popular_categories[].categorystring
    popular_categories[].slugstring
    popular_categories[].descriptionstring
    popular_categories[].created_atstring
    popular_categories[].crates_cntinteger
    fetched_atstring
    ageinteger
  • Get Category GET /get_category

    Category detail page: description, subcategories, parent categories and the crates in it.

    Parameters and response fields for GET /get_category
    Request parameters
    NameType / locationRequiredDescription
    slugstring / queryNocategory slug, e.g. parsing or web-programming::http-client
    sortstring / queryNocrate order: recent-downloads, downloads, recent-updates, new, alpha
    pageinteger / queryNopage number of the crate list, starting at 1
    per_pageinteger / queryNocrates per page (max 100)
    Response fields
    FieldTypeDescription
    categoryobject
    category.idstring
    category.categorystring
    category.slugstring
    category.descriptionstring
    category.created_atstring
    category.crates_cntinteger
    category.subcategoriesstring[]
    category.parent_categoriesstring[]
    total_cratesinteger
    pageinteger
    cratesobject[]
    crates[].idstring
    crates[].namestring
    crates[].updated_atstring
    crates[].versionsnull
    crates[].keywordsnull
    crates[].categoriesnull
    crates[].badgesstring[]
    crates[].created_atstring
    crates[].downloadsinteger
    crates[].recent_downloadsinteger
    crates[].default_versionstring
    crates[].num_versionsinteger
    crates[].yankedboolean
    crates[].max_versionstring
    crates[].newest_versionstring
    crates[].max_stable_versionstring
    crates[].descriptionstring
    crates[].homepagenull
    crates[].documentationnull
    crates[].repositorystring
    crates[].linksobject
    crates[].links.version_downloadsstring
    crates[].links.versionsstring
    crates[].links.ownersstring
    crates[].links.owner_teamstring
    crates[].links.owner_userstring
    crates[].links.reverse_dependenciesstring
    crates[].exact_matchboolean
    crates[].trustpub_onlyboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • List Keywords GET /list_keywords

    List keywords used by crates, with crate counts.

    Parameters and response fields for GET /list_keywords
    Request parameters
    NameType / locationRequiredDescription
    pageinteger / queryNopage number starting at 1
    per_pageinteger / queryNoresults per page (max 100)
    sortstring / queryNocrates (most used first) or alpha
    Response fields
    FieldTypeDescription
    totalinteger
    pageinteger
    keywordsobject[]
    keywords[].idstring
    keywords[].keywordstring
    keywords[].created_atstring
    keywords[].crates_cntinteger
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get Keyword GET /get_keyword

    Keyword detail page: the keyword and the crates tagged with it.

    Parameters and response fields for GET /get_keyword
    Request parameters
    NameType / locationRequiredDescription
    keywordstring / queryNokeyword, e.g. json
    sortstring / queryNocrate order: recent-downloads, downloads, recent-updates, new, alpha
    pageinteger / queryNopage number of the crate list, starting at 1
    per_pageinteger / queryNocrates per page (max 100)
    Response fields
    FieldTypeDescription
    keywordobject
    keyword.idstring
    keyword.keywordstring
    keyword.created_atstring
    keyword.crates_cntinteger
    total_cratesinteger
    pageinteger
    cratesobject[]
    crates[].idstring
    crates[].namestring
    crates[].updated_atstring
    crates[].versionsnull
    crates[].keywordsnull
    crates[].categoriesnull
    crates[].badgesstring[]
    crates[].created_atstring
    crates[].downloadsinteger
    crates[].recent_downloadsinteger
    crates[].default_versionstring
    crates[].num_versionsinteger
    crates[].yankedboolean
    crates[].max_versionstring
    crates[].newest_versionstring
    crates[].max_stable_versionstring
    crates[].descriptionstring
    crates[].homepagenull
    crates[].documentationstring
    crates[].repositorystring
    crates[].linksobject
    crates[].links.version_downloadsstring
    crates[].links.versionsstring
    crates[].links.ownersstring
    crates[].links.owner_teamstring
    crates[].links.owner_userstring
    crates[].links.reverse_dependenciesstring
    crates[].exact_matchboolean
    crates[].trustpub_onlyboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get Team GET /get_team

    Team page: the owning team and the crates it owns.

    Parameters and response fields for GET /get_team
    Request parameters
    NameType / locationRequiredDescription
    loginstring / queryNoteam login as shown in crate owners, e.g. github:serde-rs:publish
    sortstring / queryNocrate order: alpha, downloads, recent-downloads, recent-updates, new
    pageinteger / queryNopage number of the crate list, starting at 1
    per_pageinteger / queryNocrates per page (max 100)
    Response fields
    FieldTypeDescription
    teamobject
    team.idinteger
    team.loginstring
    team.namestring
    team.avatarstring
    team.urlstring
    total_cratesinteger
    pageinteger
    cratesobject[]
    crates[].idstring
    crates[].namestring
    crates[].updated_atstring
    crates[].versionsnull
    crates[].keywordsnull
    crates[].categoriesnull
    crates[].badgesstring[]
    crates[].created_atstring
    crates[].downloadsinteger
    crates[].recent_downloadsinteger
    crates[].default_versionstring
    crates[].num_versionsinteger
    crates[].yankedboolean
    crates[].max_versionstring
    crates[].newest_versionstring
    crates[].max_stable_versionstring
    crates[].descriptionstring
    crates[].homepagestring
    crates[].documentationstring
    crates[].repositorystring
    crates[].linksobject
    crates[].links.version_downloadsstring
    crates[].links.versionsstring
    crates[].links.ownersstring
    crates[].links.owner_teamstring
    crates[].links.owner_userstring
    crates[].links.reverse_dependenciesstring
    crates[].exact_matchboolean
    crates[].trustpub_onlyboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • Get User GET /get_user

    User profile page: the user and the crates they own.

    Parameters and response fields for GET /get_user
    Request parameters
    NameType / locationRequiredDescription
    loginstring / queryNoGitHub login of the user, e.g. dtolnay
    sortstring / queryNocrate order: alpha, downloads, recent-downloads, recent-updates, new
    pageinteger / queryNopage number of the crate list, starting at 1
    per_pageinteger / queryNocrates per page (max 100)
    Response fields
    FieldTypeDescription
    userobject
    user.idinteger
    user.loginstring
    user.namestring
    user.avatarstring
    user.urlstring
    user.github_username_matchesboolean
    user.created_atstring
    total_cratesinteger
    pageinteger
    cratesobject[]
    crates[].idstring
    crates[].namestring
    crates[].updated_atstring
    crates[].versionsnull
    crates[].keywordsnull
    crates[].categoriesnull
    crates[].badgesstring[]
    crates[].created_atstring
    crates[].downloadsinteger
    crates[].recent_downloadsinteger
    crates[].default_versionstring
    crates[].num_versionsinteger
    crates[].yankedboolean
    crates[].max_versionstring
    crates[].newest_versionstring
    crates[].max_stable_versionstring
    crates[].descriptionstring
    crates[].homepagenull
    crates[].documentationstring
    crates[].repositorystring
    crates[].linksobject
    crates[].links.version_downloadsstring
    crates[].links.versionsstring
    crates[].links.ownersstring
    crates[].links.owner_teamstring
    crates[].links.owner_userstring
    crates[].links.reverse_dependenciesstring
    crates[].exact_matchboolean
    crates[].trustpub_onlyboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger

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.

ListCSV columns
Search CratesGET /search_cratesid, 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_versionsid, 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_versionid, version_id, crate_id, req, optional, default_features, features, target, kind, downloads
Crate Reverse DependenciesGET /crate_reverse_dependenciescrate, version, req, optional, kind, downloads, description
List CategoriesGET /list_categoriesid, category, slug, description, created_at, crates_cnt
Get CategoryGET /get_categoryid, 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_keywordsid, keyword, created_at, crates_cnt
Get KeywordGET /get_keywordid, 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_teamid, 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_userid, 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
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.

  • 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โ€ฆ