Can I query over Github Actions history

My boss is asking me questions like:

  • What’s the ratio of failed workflows to successful workflows?
  • Which branches have had the most workflows run?
  • Which branches have had the most workflows fail?
  • How many successful workflows have we had for branch main?
  • How many workflows failed/succeeded in the past month?

Essentially we want to aggregate the list of runs that we can see at https://github.com/org/repo/actions and then query over it. Is there a way of doing that?

Thanks in advance.