How to get GitHub request limit state?

In our scripts, we frequently use the following command:
Preformatted text hub api --paginate -XGET orgs/our_name/actions/runners -f per_page=100

We would like to monitor the number of requests we generate, however, we don’t know how to retrieve the information we need. We tested the following queries:

curl -H “Accept: application/vnd.github.v3+json”
curl -I
curl -I
curl -I

None of them, however, returned results related to the above-mentioned command

Thanks for your help,

Ratelimit information is provided in the headers for every API response, no matter which endpoint you use. Check the header fields with names starting with x-ratelimit. Their meanings are described in the docs:

Thanks. It worked :slight_smile:

1 Like