APIs / crates.io / Reverse dependencies
crates.io: Reverse dependencies
Crates that depend on a crate, with the dependent version and its downloads.
GET /v1/crates-io/reverse-dependencies
Parameters
Send parameters in the query string.
| Parameter | Type | Required | Allowed values |
|---|---|---|---|
name | string | Required | Up to 100 characters Crate name. |
page | integer | Optional | Any Results page, from 1. |
per_page | integer | Optional | Any Results per page, 1 to 100. Default 20. |
Example request
crates.io
GET/v1/crates-io/reverse-dependencies?name=serde&per_page=10
{
"success": true,
"data": {
"total": 146477,
"page": 1,
"has_more": true,
"count": 10,
"items": [
{
"crate": "hashbrown",
"version": "0.17.2",
"requirement": "^1.0.220",
"kind": "normal",
"optional": true,
"downloads": 9331455,
"url": "https://crates.io/crates/hashbrown"
},
{
"crate": "bitflags",
"version": "2.13.2",
"requirement": "^1.0.103",
"kind": "dev",
"optional": false,
"downloads": 160359115,
"url": "https://crates.io/crates/bitflags"
},
{
"crate": "rand",
"version": "0.10.4",
"requirement": "^1.0.103",
"kind": "normal",
"optional": true,
"downloads": 11373375,
"url": "https://crates.io/crates/rand"
}
]
},
"meta": {
"request_id": "req_43d44195794b49d99bf8853423740d30",
"credits_charged": 1,
"credits_remaining": 1989
}
}200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.
Run this endpoint in the playground with your own parameters. 1 credit per successful call; failed calls are free.
Response fields
Each item in data.items has these 7 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.
| Field | Type |
|---|---|
crate | string |
version | string |
requirement | string |
kind | string |
optional | boolean |
downloads | integer |
url | url |