Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ Return aggregated statistics about the library dataset, such as total counts of
- Method: GET
- Path: `/api/libraries/statistic`

### Notes

The response also includes distribution arrays used for statistic page. Each entry has a `label` and the number of libraries in that bucket:

- `scoreBuckets` - Directory Score ranges from `0-10` through `90-100`, lower bounds are inclusive, upper bounds are exclusive except that the final range includes scores of 100.
- `dependencyBuckets` - dependency counts grouped as `0`, `1-5`, `6-10`, `11-25`, `26-49`, and `50+`.
- `bundleSizeBuckets` - npm package sizes grouped as `<100 kB`, `100-500 kB`, `500 kB-1 MB`, `1-5 MB`, `5-10 MB`, and `10+ MB`, using decimal units.

Libraries without dependency or package-size data are included in an `Unknown` bucket for the corresponding distribution.

### Example

- GET `/api/libraries/statistic`
Expand Down
Loading
Loading