Rustdoc JSON

docs.rs builds & hosts the rustdoc JSON output.

This structured version of the documentation can be used for inspecting the docs and types of the crate in a programmatic way.

The JSON file you're downloading might have been built with an older version of rustdoc so you might have to check the format_version attribute to determine how to parse the structure. The rustdoc-types crate helps with this.

We started building rustdoc JSON on 2025-05-23. So any release before that won't have a download available until our rebuilds reached that release.

URLs

The download URLs can be generic or specific, depending on what you need. In case of rebuilds we also keep old format versions around. The endpoints redirect to a download URL on https://static.docs.rs. Until we rebuilt all releases, the redirect target might not exist.

Here some URL examples you can use.

URL Redirects to JSON download of
https://docs.rs/crate/clap/latest/json latest version, default target, latest format-version
https://docs.rs/crate/clap/latest/json/42 latest version, default target, format-version 42
https://docs.rs/crate/clap/~4/json latest v4 via semver, default target, latest format-version
https://docs.rs/crate/clap/latest/i686-pc-windows-msvc/json latest version, windows target, latest format-version