If you intend to use this API, please add your website to the list below and set your client's user-agent
request header to match.
If you forget to set a user-agent
, you will likely be blocked.
Current websites using this API:
- https://badgen.net
- https://cnpmjs.org
- https://npm.taobao.org
- https://bestofjs.org
- https://socket.dev
- picocolors-size-benchmark
- v1:
GET /api.json
- v2:
GET /v2/api.json
You can use the npm package name and version (cached for up to one week):
https://packagephobia.com/[email protected]
Or just the npm package name, which will automatically use the latest version (cached for thirty seconds):
https://packagephobia.com/api.json?p=satori
This caching is done using a
Cache-Control
header, seeserver.ts
.
{
"publishSize":3686131,
"installSize":8724612
}
{
"name": "satori",
"version": "0.4.3",
"publish": {
"bytes": 3686131,
"files": 19,
"pretty": "3.52 MB",
"color": "#007EC6"
},
"install": {
"bytes": 8724612,
"files": 297,
"pretty": "8.32 MB",
"color": "#DFB317"
}
}