Hot answers tagged api-v2
5
See the "Safety" heading in the "Custom Filters" doc. The difference between a "safe" (default) filter and an "unsafe" filter, is that the unsafe data might return data that could result in a script injection if the data was directly inserted in an HTML document. (EG: '<script src="PwnYaSucka.com">...')
Some fields are apparently inherently devoid ...
4
To find user_id(s) for a username, use the inname parameter of the /users query.
You will have to repeat this query call for every Stack Exchange site that you are interested in. For example:
/users?inname=Zagorulkin&site=stackoverflow&filter=!6Xcz2tYayQsZ1
/users?inname=Zagorulkin&site=programmers.stackexchange&filter=!6Xcz2tYayQsZ1
If ...
3
The payload seems to be limited to 3000 characters by the Stack Exchange engine itself:
However, the actual field returned by the API may be longer, as the user's 3000, markdown characters are expanded into HTML.
As stated in "Can we have maximum length of string in API help pages?", the API itself enforces no length limits on the data and...
...
3
OK, well, I've pretty much confirmed that A LOT has changed with version 2.0... the new release does not appear to be backwards compatible with version 1.1 at all. Kind of annoying if you ask me. For now I'm going to modify StackWrap4J myself and just copy and paste the modified source code into my app... if anyone is interested in partnering up to extend ...
3
This has been fixed with the latest deploy.
There was a bug introduced in our move to elastic search where min/max was applied after paging results, instead of before. This meant that in any question that would typically have a lot of out-of-range results, the first page would tend to be culled down to nothing.
2
There is an /events route that:
"Returns a stream of events that have occurred on the site."
Greg Hewgill has created a firehose JSON streaming event service which closely mimics the Twitter Streaming API.
He has also created a page to demo the service here: StackHose: live real-time event stream in your browser
2
Stack Exchange's implementation of OAuth 2.0 is modeled after Facebook's.
While I haven't used Scribe, presumably their Facebook example is the relevant.
2
View count is not returned by default (see the list of default fields here). It's excluded in the default filter.
Try adding this: &filter=!9hnGsu7zN
EDIT:
The filters can be generated using the API's filter create method https://api.stackexchange.com/docs/create-filter.
Or manually using the 'default filter [edit]' drop down found on each method's ...
2
No.
Generally speaking, no ids are unique across sites.
There are some situations where they line up (like linked meta user ids to their parent site user ids), or places where an id series is shared within a site (question_id and answer_id won't collide on Stack Overflow, for example); but these are basically implementation details, unless called out in ...
2
/me/associated is the preferred way to turn an access_token into a list of users, it returns the collection of per-site user details that can be quickly fetched. It's basically the user's account tab.
If you need more details about a user on a give site, then turn around and hit /me (or /users/{ids}) on the sites you've discovered via /me/associated.
As ...
2
This isn't possible and isn't likely to be added.
Post history is by a good clip the largest chunk of data in the system. Regularly sorting by it would be prohibitively expensive on the sites themselves, much less in the API.
For queries like this, we have data.stackexchange. Here's a query for the most "revised" post on a site. We also provide data dumps ...
1
No, the API does not provide a method to get the user's question-page, display preferences -- including Favorite or Ignored tags.
Currently, the only way for your app to get these is to browse to the questions list and scrape the tags from the right-hand column.
If your app is running in the user's browser and the user is logged-in, this is a piece of ...
1
"Are any of the fixed size?"
I can't really answer that question directly, but for reference, the dimensions of the images supplied by the API for Stack Overflow are as follows:
Image: Dimensions:
=====================================
logo_url 250x61
icon_url 158x158
favicon_url 16x16
...
1
/questions take's a semi-colon delimited list of tags in the tagged parameter. If tagged is set, questions returned will have all the passed tags (ie. it's an AND operator).
https://api.stackexchange.com/docs/questions#order=desc&sort=votes&tagged=python&filter=default&site=stackoverflow&run=true
^ for example, that query returns all ...
1
Provided you don't do anything "evil" (which basically means leaking user messages to people/apps they haven't authorized), we have no objections to a generic push service.
Yes, the per-minute throttle is for the same request; changing the parameters counts as separate requests. Do note that the 30 requests/second cutoff is by IP (it's a DOS prevention ...
Only top voted, non community-wiki answers of a minimum length are eligible