0

Playing around with the Github API, I see that there is a limit of 5,000 requests an hour. Is there a way to increase this? (Not the main question)

When I hit the /users/:username/events endpoint, I get back an array of events. The ones that are PushEvent have an array called commits. Each commit has its own endpoint that I can hit to pull more data.

This racks up requests super quickly and I was wondering if there was a better way to do this.

Thanks!

Syn
  • 938
  • 1
  • 10
  • 21

1 Answers1

2

This limit is in place to prevent a single user from using too many resources, so it's not likely that it will be raised. If you want to make one request for multiple events, you can do that with the v4 GraphQL API. Note that the API limits are different for the v4 API and are scored based on points, but it's possible that you may be able to structure your query so as to be more efficient and allow you more data to be fetched.

This answer explains how you can write a GraphQL query to inquire about multiple objects with one request.

There may be alternative ways to get the information you want. For example, if you want to know about push events as they happen instead of after the fact, you may be able to set up a webhook, which isn't rate limited.

bk2204
  • 64,793
  • 6
  • 84
  • 100