crates.io website screenshot

crates.io

crates.io is the official package registry for the Rust programming language, operated by the crates.io team under the Rust Foundation with infrastructure support from Amazon Web Services and Fastly. It exposes a Web API at /api/v1 used by Cargo and the website for search, publishing, yanking, and owner management, plus a sparse HTTP index at index.crates.io that has been Cargo's default registry protocol since Rust 1.70 (June 2023). The legacy git index is still mirrored. Every published version is checksummed with SHA-256 and companion documentation is auto-built on docs.rs. The crates.io source code is dual-licensed under Apache-2.0 and MIT and runs on Rust (axum, diesel) with a SvelteKit frontend.

2 APIs 14 Features
RustPackage RegistryCratesCargoOpen SourceDeveloper ToolsRust Foundation

APIs

crates.io Web API

The crates.io Web API exposes the endpoints used by Cargo and the crates.io website to search the registry, fetch crate and version metadata, publish new versions, yank and unya...

crates.io Sparse Index

The crates.io sparse index at https://index.crates.io serves the registry config document plus per-crate newline-delimited JSON metadata files over HTTP, replacing the legacy gi...

Collections

Features

Centralized package registry for the Rust programming language operated by the crates.io team under the Rust Foundation
Web API at https://crates.io/api/v1 for search, crate detail, version detail, download redirect, publish, yank, unyank, and owner management
Sparse HTTP index at https://index.crates.io (default for Cargo since Rust 1.70) — replaces the legacy git index for the vast majority of fetches
Legacy git index at https://github.com/rust-lang/crates.io-index still mirrored for source replacement and offline scenarios
SHA-256 checksums published per version for tamper-evident downloads
Index format v2 with features2 map for namespaced and weak-dep features
Per-crate keywords, categories, and reverse-dependency listings on the website
Authentication via per-user API tokens scoped to publish, yank, and owner-management permissions
Trusted Publishing flow via crates-io-auth-action exchanging GitHub Actions OIDC tokens for short-lived publish tokens
Open source under Apache-2.0 and MIT — backend in Rust (axum + diesel), frontend in SvelteKit/TypeScript
Infrastructure sponsored by Amazon Web Services (file hosting) and Fastly (CDN)
Status page at status.crates.io reporting crates.io and docs.rs uptime
Companion documentation host docs.rs auto-builds and serves docs for every published crate version
No paid plans — operated as a public good of the Rust ecosystem

Semantic Vocabularies

Crates Io Context

0 classes · 8 properties

JSON-LD

API Governance Rules

crates.io API Rules

7 rules · 1 errors 3 warnings 1 info

SPECTRAL

JSON Structure

Crates Io Crate Structure

0 properties

JSON STRUCTURE

Example Payloads

Crates Io Config Example

2 fields

EXAMPLE

Crates Io Get Crate Example

2 fields

EXAMPLE

Crates Io Search Example

2 fields

EXAMPLE

Resources

🌐
Portal
Portal
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🚀
GettingStarted
GettingStarted
👥
GitHubOrganization
GitHubOrganization
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
💻
SourceCode
SourceCode
🔧
Tools
Tools
👥
GitHubOrganization
GitHubOrganization
🔧
Tools
Tools
🔧
Tools
Tools
🔧
Tools
Tools
🟢
StatusPage
StatusPage
📰
Blog
Blog
📄
ChangeLog
ChangeLog
🔗
Documentation
Documentation
🔗
SecurityPolicy
SecurityPolicy
💻
CodeOfConduct
CodeOfConduct
🔗
License
License
🔗
License
License
💬
Support
Support
🔗
Forums
Forums
🔗
Forums
Forums
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Documentation
Documentation
🔗
Sponsor
Sponsor
🔗
Sponsor
Sponsor
🔗
Sponsor
Sponsor

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: crates.io Web API
  version: v1
request:
  auth:
    type: apikey
    key: Authorization
    value: '{{Authorization}}'
    placement: header
items:
- info:
    name: Crates
    type: folder
  items:
  - info:
      name: Search Crates
      type: http
    http:
      method: GET
      url: https://crates.io/api/v1/crates
      params:
      - name: q
        value: ''
        type: query
        description: The search query string.
      - name: per_page
        value: ''
        type: query
        description: Number of results per page (1-100, default 10).
      - name: page
        value: ''
        type: query
        description: Page number to return.
      - name: sort
        value: ''
        type: query
        description: Sort order (alpha, downloads, recent-downloads, recent-updates, new).
    docs: 'Search the crates.io registry for crates by query string. Returns a paginated list of matching crates with summary
      metadata. No authentication required.

      '
  - info:
      name: Publish A New Crate Version
      type: http
    http:
      method: PUT
      url: https://crates.io/api/v1/crates/new
    docs: 'Publish a new crate or crate version. The request body is a binary envelope containing a 32-bit little-endian length,
      the JSON metadata, a 32-bit little-endian length, and the .crate tarball.

      '
  - info:
      name: Get Crate Details
      type: http
    http:
      method: GET
      url: https://crates.io/api/v1/crates/:crate
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
    docs: Retrieve full metadata for a single crate including versions, owners, and keywords.
- info:
    name: Versions
    type: folder
  items:
  - info:
      name: Get Crate Version
      type: http
    http:
      method: GET
      url: https://crates.io/api/v1/crates/:crate/:version
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      - name: version
        value: ''
        type: path
        description: The semver version of the crate (e.g. 1.0.0).
    docs: Retrieve metadata for a specific version of a crate.
  - info:
      name: Download Crate Tarball
      type: http
    http:
      method: GET
      url: https://crates.io/api/v1/crates/:crate/:version/download
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      - name: version
        value: ''
        type: path
        description: The semver version of the crate (e.g. 1.0.0).
    docs: 'Returns a redirect to the .crate tarball stored in the crates.io S3 bucket. This is the canonical download URL
      used by Cargo.

      '
  - info:
      name: Yank A Crate Version
      type: http
    http:
      method: DELETE
      url: https://crates.io/api/v1/crates/:crate/:version/yank
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      - name: version
        value: ''
        type: path
        description: The semver version of the crate (e.g. 1.0.0).
    docs: 'Mark a specific crate version as yanked so that it is no longer selected as a fresh dependency. Existing Cargo.lock
      files continue to resolve against yanked versions.

      '
  - info:
      name: Unyank A Crate Version
      type: http
    http:
      method: PUT
      url: https://crates.io/api/v1/crates/:crate/:version/unyank
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      - name: version
        value: ''
        type: path
        description: The semver version of the crate (e.g. 1.0.0).
    docs: Restore a previously yanked version of a crate.
- info:
    name: Owners
    type: folder
  items:
  - info:
      name: List Crate Owners
      type: http
    http:
      method: GET
      url: https://crates.io/api/v1/crates/:crate/owners
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
    docs: Returns the list of users and teams that own a crate.
  - info:
      name: Add Crate Owner
      type: http
    http:
      method: PUT
      url: https://crates.io/api/v1/crates/:crate/owners
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      body:
        type: json
        data: '{}'
    docs: Invite a user or team as an owner of the crate.
  - info:
      name: Remove Crate Owner
      type: http
    http:
      method: DELETE
      url: https://crates.io/api/v1/crates/:crate/owners
      params:
      - name: crate
        value: ''
        type: path
        description: The crate name (e.g. serde, tokio, rand).
      body:
        type: json
        data: '{}'
    docs: Remove a user or team from the owners of the crate.
bundled: true