4

I want to be able to grab the download numbers from a Github Packages through the API.

For instance, if you look on the Homebrew packages page for sqlite, you'll see there's a number to the right of the page it says "9.52m downloads". I want to be able to get that number through an API call. Looking at the packages API reference (https://docs.github.com/en/rest/reference/packages) there doesn't seem to be a way to access the download numbers. There's the "download url" but calling that returns nothing. I could always directly scrape the number from the URL, but it feels like this is something that should be workable through the API, but I know Github packages are relatively new so it might not be in yet. Thanks for any info anyone can provide on this matter.

Maxrimus
  • 41
  • 1
  • 1
    it seems it was possible using GraphQL api within `statistics` field. But docker packages are no longer listed in the GraphQL api since 21/06/2021 ([here](https://docs.github.com/en/github-ae@latest/graphql/overview/breaking-changes#changes-scheduled-for-2021-06-21)) – Bertrand Martel Jul 19 '21 at 16:35

0 Answers0