Tag Info

Hot answers tagged

5

As long as has_more is set to true there is more data available. You can get this data by increasing the page parameter in your request subsequently and running new request with that changed page parameter. The next url for your example would then be ...


3

When I go this page in Google Chrome (6.0), it is actually nicely formated. Sure it is still in JSON format, but it is indented and all that fun stuff. It might just be me though. After spending so much time using print_r() in PHP, I can easily read formats in plain text.


3

Here is the relevant section of code from stack.PHP. $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_ENCODING,'gzip'); // Needed by API curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $data = curl_exec($ch);


2

JsonView is the one I use in Firefox, and when they are ajax requests I look in Firebug at the "Net" tab and it will actually convert the response of JSON requests to an object that you can look at.


1

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 ...


1

Not that this will solve you're main problem, but that actually isn't part of the API. If you go to api.stackexchange.com you kind information on how to get the data "raw", in JSON format. Sadly however the API doesn't let you get reputation changes for multiple days at once, so you're still stuck with making lots of GET requests. (I'm curious how you ...


1

I'll probably just wait until the Chrome beta channel hits version 6.0 to get the pretty formatting that Chacha102 mentioned, but if anyone else is interested I did find that the Pretty JSON Chrome Extension works so long as you add a ?.json or &.json to the end of the URL. Between that and the View source trick that adrianbanks mentioned I think I can ...


1

Since OP has asked about fetching new questions, I can tell about that. /search works fine if you have two or three tags. But if you have a dozen, you'll get recent questions with delay of 5-15 minutes (as OP noted in the comments). Also, min/max parameters become terribly imprecise: you can get a post 10 minutes before min or miss post 10 minutes after it. ...


1

/search has atagged parameter with OR semantics. The # of returns is capped, and the results are very heavily cached. Things get tricky when somebody asks for everything tagged c# or java, and then the API is stuck trying to shove back 200k questions (optionally with answers and comments); thus the heavy constraints on OR'ing tags.


1

gzuncompress is for ZLIB not GZIP. The two algorithms are related, but not identical. gzuncompress isn't strictly guaranteed to decompress all ZLIB streams actually, its just guaranteed to decode the results of gzcompress. Which is honestly really weird. The appropriate function is gzdecode. If that's not available, http_inflate should also work.



Only top voted, non community-wiki answers of a minimum length are eligible