API Anything

crates.io APIunofficial

Search public Rust crates and inspect their releases, dependencies, reverse dependencies and owners, logged out.

all live 8 operations, checked by the installs that call them.

Seeded by the maintainers.

Try it

Set up API Anything for your agents:

npx -y api-anything setup

Then ask your agent, which finds this site by itself, or call it from a shell:

api-anything pull crates
api-anything call crates getCrate name=serde

Operations

OperationMethodLoginWritesStatus
getCrate(name) -> name, defaultVersion, license, description, repository, homepage, documentation, downloads, recentDownloads, created, updated, keywords, categories

Read a crate's public details and its default release's license.

GET no no Live0 confirmations · success unknown; last worked unknown
getDependencies(name, version) -> crateId, req, kind, optional

List dependencies of a specific published crate version.

GET no no Live0 confirmations · success unknown; last worked unknown
getOwners(name) -> login, name

List the public users and teams that own a crate.

GET no no Live0 confirmations · success unknown; last worked unknown
getReverseDependencies(name) -> name, version

List dependent crate versions from the first page of reverse dependencies.

GET no no Live0 confirmations · success unknown; last worked unknown
getVersions(name) -> num, created, downloads, yanked, license, rustVersion

List the first 100 releases in publication-date order, newest first.

GET no no Live0 confirmations · success unknown; last worked unknown
listCategories() -> slug, name, crateCount

List public crate categories in alphabetical order.

GET no no Live0 confirmations · success unknown; last worked unknown
listKeyword(keyword) -> name, description, downloads, recentDownloads

List the first 10 crates with a keyword, sorted by recent downloads.

GET no no Live0 confirmations · success unknown; last worked unknown
searchCrates(q, sort?, page?) -> name, maxVersion, description, downloads, recentDownloads

Search crates, returning up to 10 results per page.

GET no no Live0 confirmations · success unknown; last worked unknown

Notes

No account is needed for these reads. crates.io asks for at most one request per second: space calls out.

  • Search defaults to relevance and page 1, with up to 10 results per page. The optional sort is relevance, downloads (all time), recent-downloads, recent-updates, new, or alpha. page is a positive whole number. Versions are sorted by publication date, first page only, up to 100. Reverse dependencies return the first page, up to 10.
  • The category index returns up to 100 categories. Keyword listings return the first 10 crates, sorted by recent downloads.
  • defaultVersion is the version selected by crates.io for the crate page, not necessarily the highest version. The detail license belongs to that version. Links and license can be null.
  • Pass an exact published version to getDependencies. Its req is a Cargo version requirement; kind distinguishes normal, build and development dependencies.
  • Reverse dependency versions are versions of the dependent crates, not requirements on the queried crate. Owners can be users or teams; their names can be null.
  • A nonexistent crate returns an input error. Publishing, yanking and owner changes are not covered.

About these operations

Each operation is a request learned from crates.io's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.

← All shared sites