Reputation: 499
The GitHub API documentation says that the url
will give all users in the order they signed up, but I only seem to get the first 135.
Any ideas how to get the real full list?
Upvotes: 15
Views: 28494
Reputation: 30217
You can filter on type:user
like this:
https://api.github.com/search/users?q=type:user
See Also: GitHub API get total number of users/organizations
Upvotes: 2
Reputation: 3214
Please use since
parameter in your GET request.
https://api.github.com/users?since=XXX
Probably it's done this way to limit the resources needed to handle such request. Without such limit it's just asking for DoS attack.
Upvotes: 23
Reputation: 28835
Both of the existing answers are 100% correct, but I would advise you to use a wrapper for whatever language you happen to be doing this in. There are plenty of them and there is an official one for ruby (Octokit). Here is a list of all of them.
Upvotes: 2
Reputation: 19839
If you check the response headers for that request Github provides pagination links under the header Links
Link: <https://api.github.com/users?since=135>; rel="next", <https://api.github.com/users{?since}>; rel="first"
I believe since their api v3
Github has been moving towards a hypermedia api.
EDIT
This is beyond the scope of this question but its related. To learn more about hypermedia API and REST. Take a look at these slides by Steve Klabnik
http://steveklabnik.github.com/hypermedia-presentation/#1
Upvotes: 4