Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I am trying to get the list of all user's in json format (as provided by the api) (using jquery jsonp)

What i found is

pagesize – The number of collection results to display during pagination. Should be between 0 and 100 inclusive. 32-bit signed integer

So 100 is the max i can get with this link

http://api.stackoverflow.com/1.1/users?pagesize=100

How can i get the list in single json(if it's possible).

share|improve this question
2  
Looks like you can't. Pretty sure that's on purpose. you could loop through and make lots of requests, though you'll probably hit a limit there. –  Pheonixblade9 Apr 13 '13 at 0:06
    
Why do you need all our information as JSON, sounds like evil plans in the makin ! Ban him now!!! –  adeneo Apr 13 '13 at 0:16
    
LOL.. No evil plan. Just trying to create analytic's app –  JAVAGeek Apr 13 '13 at 0:20
1  
You would have to make a few hundred individual calls using page and pagesize. You could do it and create your own database... then update it regularly... might be more trouble than its worth though. –  Tim Withers Apr 13 '13 at 3:57
add comment

migrated from stackoverflow.com Apr 19 '13 at 12:39

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

It is impossible to fetch all of Stack Overflow's users in a single API call, or even in a single day (using just the API and one IP address).

There are currently 1,995,355 users on Stack Overflow. Which means that you would need 19,954 API calls to get them all, but your maximum API quota is 10,000 calls per day.

The smart thing to do is to have your app prefilter the user criteria as much as possible and just fetch data on the few users that meet the filter.

But, if you really want all users, then get them from the Data Dump. Alternatively, you might be able to get the usernames from the Data Explorer (SEDE). For example, use this sample query to get this sample CSV file. I haven't tried it for all 2 million users (that would be a 1 or 2 Gig CSV file!), but it might work. ;-)

The SEDE data can be up to a month old, and the Data Dump up to several months old, but use them to get the bulk of the users. Then you can use much smaller API queries to get users added since the last Data Dump update.

See this question for an app that successfully melded the Data Dump and the API.

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .