Tag Info

Hot answers tagged

16

Purposefully not shown. The potential for abuse is way too high.


13

You'll need to quote that URL. wget 'http://api.stackexchange.com/2.0...&site=stackoverflow' ^ ^ (And note that the payload is gzip-compressed.)


11

There is no tutorial for the API, nor is there likely to be one -- at least officially. There is a "Hello World" introduction. To use the current API (version 2.2), you really only need to know/do: How to make an HTTP GET request, in the language of your choice. There are also various user-supplied libraries in .net, PHP, Python, etc. to help with this. ...


10

All api results are gzipped. So what you are looking at is a gzipped binary blob. Simply decompress using a gzip implementation in R.


9

I agree that there needs to be a way to discover API endpoints. Especially with the brave new world of SE 2.0 potentially leading to an ever increasing number of API-ified sites out there. However, there isn't a good place to shove this functionality just yet. Currently, we only have two places it could go: ...


8

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


7

You are getting the GZipped stream of the response content. Use DownloadData instead of DownloadString and uncompress the stream before passing it to the JSON deserializer (or whatever you plan to use). Alternatively, you can use the StackOverflow.Net library.


7

You need to encode the # character (to %23) http://api.stackoverflow.com/1.0/questions?title=true&tagged=c%23


7

They have been very clear that version 1 of the API will be read only and they will be revisiting the POST type features (like adding new questions and answers) for the next version of the API. You can post and vote for the features you would like to see in the next version here. You can also view any feature requests which have been deferred to some future ...


6

Oy, that was an annoying one. Subtle, as the bug only happened when you're not logged in but would be automatically logged in when you visit stackexchange.com. The actual root cause was just over-encoding a url.


6

http://stackauth.com/1.0/sites will get you information about all the sites.


6

This isn't an answer, just an agreement with the original poster (though I might have couched my feelings in slightly less confrontational language). The API is beginning to feel rather like abandonware. My reasoning… Since the competition winners were announced, the API's not even been mentioned on the blog We've had no official word on updates and ...


6

AFAIK StackExchange network uses gravatars. Hence you can get their profile picture from their email address (check the gravatar site for details).


5

Every response from the API can be cached for up to a minute, so making the same request multiple times in that time-frame typically won't return different results. We make note of this in the throttle documentation: While not strictly a throttle, the Stack Exchange employs heavy caching and as such no application should make semantically identical ...


5

You can fetch live data for one. The data explorer uses data that is up to a month old.


5

Update Ok, I see from comments that you are using phone7 - the story is slightly different than mainstream silverlight as there is ONLY ClientHttp stack and you will need to manually decompress, as you have found out. I use Silverlight.SharpZipLib for this purpose. Good luck. Here is a method that will work in Silverlight and Phone 7. You can use it for ...


5

Since the competition winners were announced, the API's not even been mentioned on the blog There is an entire site dedicated to applications on our API -- and you are on it! I refer people here all the time when they are looking for functionality we don't offer. Apps and wrappers have had no publicity or support from the SE team See above. ...


5

Not like this? http://api.stackoverflow.com/1.1/tags?pagesize=100&page=1 http://api.stackoverflow.com/1.1/tags?pagesize=100&page=2 ....


5

This is important if you want to be able to build an app that supports all available sites. Right now there are only a few, but eventually the list will grow and simply adding entries by hand will become too difficult. There also was a similar request for discovering what versions of the API are available. The tricky part is that the methods would not ...


5

Read the blog entry about it http://blog.stackoverflow.com/2010/01/what-would-a-stack-overflow-api-look-like/


5

"Agile" API releases are a really bad idea, frankly. The StackOverflow code base undergoes rapid iteration already, just watch the build numbers. On average we deploy at least once a day. Oftentimes these are just bug fixes, but a non-trivial amount of the time we're introducing new features or revising existing ones. To take one feature for example: ...


5

v1 of the API lacks user auth, so such restrictions are unenforceable. We'd have to deny it to everyone (and arguably, a large percentage of the end-users of the API are going to be over that rep limit) which, to me, would be kind of overkill.


5

The unofficial Winterbash inbox API If you have any user's account_id then the hats information is just one call away. And the call is http://winterbash2014.stackexchange.com/api/inbox?accountId=<account_id> For example, hats information about me can be retrieved via http://winterbash2014.stackexchange.com/api/inbox?accountId=4996787 But here ...


5

Yes, that bug is annoying, especially since specifying a todate that's before the fromdate returns a valid result set, EG: { "items": [], "has_more": false, "quota_max": 10000, "quota_remaining": 9995 } -- rather than an error. Having the dates be equal is theoretically possible. Having negative time is impossible (in this context). However, ...


5

I don't believe that that route accepts POST requests (as it's non-actionable), so you should have better luck sending a GET request instead. Routes that require auth tokens necessitate HTTPS, but still expect GET for read requests, and POST for writes.


5

First of all, version 1.1 of the API has been deprecated for quite some time now. Users are strongly encouraged to move their applications over to version 2.1. The URL for retrieving information about a question looks something like this: http://api.stackexchange.com/2.1/questions/ question_id ?site= site_name For example, to retrieve information ...


4

The date is Unix Epoch time, which is the number of seconds since 1/1/1970. The "time zone" is UTC, which is nearly equivalent to GMT. You can convert from UTC to local time in javascript using the method outlined here. Here are the functions I use to convert back and forth (code is C#): public static DateTime ConvertFromUnixTimestamp(double timestamp) { ...


4

All responses from the API are compressed. You can specify the compression scheme (gzip or deflate) in the Accept-Encoding header. If you don't specify, one will be chosen for you. We used to throw up an error when a non-compressed request was received, but a frustrating number of proxies don't pass Accept-Encoding through properly; so instead we silently ...


4

No, not in version 1. User authentication (and the actions that go along with it, like voting and posting), might well turn up in version 2.



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