Tag Info

Hot answers tagged

6

You don't explicitly need permission, but you must follow certain rules and legal requirements. Refer to Jeff Atwood ♦'s answer to "Etiquette of Screen-scraping Stack Overflow?": We regularly block (IP range ban) unknown scrapers that do not identify themselves and/or have poor behavior patterns. These bans are permanent until someone emails us to make ...


6

You need to pass in a sufficiently large pagesize value, per the documentation: The pagesize parameter for this method is unbounded, in acknowledgement that for many applications repeatedly fetching from /sites would complicate start-up tasks needlessly. Otherwise you'll only get 30 results, the default value for pagesize. Alternatively, you can page ...


5

template.user.js // ==UserScript== // @name Stack Exchange Userscript (Template) // @grant none // @match *://*.stackexchange.com/* // @match *://*.stackoverflow.com/* // @match *://*.superuser.com/* // @match *://*.serverfault.com/* // @match *://*.askubuntu.com/* // @match *://*.stackapps.com/* // @match *://*.mathoverflow.net/* // ==/UserScript== var ...


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


4

No. Currently the users type does not return any private_info and neither does the user_timeline type return any voting information. No other API method allows for detecting a user's vote history except one question at a time. You would have to fetch every single question and test the downvoted and the upvoted properties. If you limited your search ...


4

The API documentation states that the API always returns a compressed response: ...we guarantee that all responses are compressed, either with GZIP or DEFLATE. GZIP is the default. This means that you must send the results from wget to gunzip. Like so: wget -O- <URL> | gunzip > results.json Or, in your specific example: wget -O- ...


3

Nope. Neither the user_timeline object, nor the user object return any flagging information, at all. (as of API version 2.2). The question, answer, and comment objects can return a can_flag boolean, but this does not necessarily indicate that the user has already flagged, and it returns false for a variety of reasons. Flagging history is especially ...


3

You cannot use a standard GET request. You must obtain the access_token and then POST the necessary parameters. The steps are currently: Setup: Register your app. Link it with a post here on Stack Apps that has a legitimate [app] or [script] tag. In most cases you will also tag it with placeholder. In your app: Have the user authorize your app and ...


3

Are they moved to filters? Yes, you need to generate a filter that includes the question.body, question.comments, and question.answers fields. There are shorthand filters (i.e. _bca) that will do this for upgrade compatibility, but their use is discouraged and you're better off just making a filter that contains exactly what you want anyway.


3

See "How do comment @replies work?" and "@Peter works for Péter Török?". Comment replies will often work with unicode. EG: Péter Török can be reached by both @Peter and @Péter. These are the documented rules (Not checked against latest source) for converting user display_name to comment-reply @names: Remove any spaces. Single quotes, dots, dashes and ...


3

http://winterbash2014.stackexchange.com/api/user-hats?userId=29538&host=stackapps.com This returns an array of arrays. Each inner array contains three integers: The Id of the hat The number of times the user has earned this hat, all over the network 1 if the user has earned this hat on this particular site (Stack Apps, in this example); 0 otherwise.


3

Okay, went ahead and banged out a script for this; Happy Christmas! To install, click here (SE Edit Reasoner install at Github). To preview the source, click here (SE Edit Reasoner preview at Github). This userscript requires an engine that supports both @require and the various @granted APIs. It was tested on Firefox + Greasemonkey and Chrome + ...


3

They are one and the same. When the API was first announced (March 31st, 2010), it was temporarily called the "Stack Overflow API" -- even though Jeff said that the API would be "for all the trilogy sites". Two month's later, when stackapps.com and the public beta were announced, the official name was already Stack Exchange API. There is no separate API ...


3

Just set pagesize in the URL, like: https://api.stackexchange.com/2.2/tags?pagesize=10&order=desc&sort=popular&site=stackoverflow


3

There's no one way. Here's a recipe you can use: Make a proper app post here on StackApps. See How to list your application/library/wrapper/script here. Look for posts on Meta Stack Overflow (MSO) and/or on Meta Stack Exchange (MSE) where your app might make part of a good answer. If you find such posts, make proper answer(s) to them -- linking both to the ...


3

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.


3

I've made a userscript to do this. Get it at Github. It gets the latest 5 questions posted on the per-site meta of the current site and adds a diamond to the topbar. It is red if there are new questions, and white if there aren't. It decides whether you've seen the questions by saving the latest question via GM_setValue - if the latest question via the ...


3

It's pretty easy to get the bibtex, just send a GET request formatted like so: http://mathoverflow.net/posts/{POST NUMBER}/citation For example, for this Math Overflow question, you can get the bibtex for the question and top 2 answers with: mathoverflow.net/posts/105922/citation (Question) mathoverflow.net/posts/105930/citation (Answer 1) ...


2

Since now 1.1 is deprecated the following url is to be used to get the reputation score: /2.2/users/{id}?order=desc&sort=reputation&site=stackoverflow See the docs for /users/{ids}/reputation.


2

Here is a one for css too: // ==UserScript== // @name changeMe // @namespace http://use.your.homepage/ // @version 0.1 // @description addSomethingUseful // @match http*://*.stackoverflow.com/* // @match http*://*.serverfault.com/* // @match http*://*.superuser.com/* // @match http*://*.stackexchange.com/* // @match ...


2

No, you cannot do this anymore via the API. API self-documentation was intentionally dropped after API version 1.1. Your only recourse is to scrape the doc pages at api.stackexchange.com/docs.


2

Your value for channelUrl is nominally correct. If I set up my XAMPP server, via httpd.conf to use port 8000, then this HTML page works perfectly fine for me: <!DOCTYPE html> <html><head> <title>StackApps SDK auth test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ...


2

accept_rate is the internally tracked value of the user's Accept Rate. This is roughly a measure of how many of the user's questions have answers and where one of the answers was accepted by the user. For the actual details of how it's calculated, read the blog post announcing accept rate. In a nutshell: The user must have 4 or more questions. Only ...


2

The tags URL parameter accepts a space-delimited set of tags to prefill in the form. As an example, check the link in the last question of the Data Explorer FAQ which has a URL like: http://meta.stackexchange.com/questions/ask?tags=data-explorer


2

No, the API only allows you to connect to existing Stack Exchange sites, and Stack Exchange no longer sells private sites. Looks like you want one of the clones listed on Meta. Since it's not clear which, if any, of those clones offer an API, there is another approach... If you submit your site through the Area 51 proposal process and it goes to beta, ...


2

I'm detecting which page we are using the StackExchange object: The property StackExchange.options.routeName can be (among other values): Questions/Show (/questions/POST-ID) Questions/List (/questions) Questions/ListByTag (/questions/tagged/TAG-NAME) So, to run a script only when viewing an individual post: var userscript = function($) { if( ( ...


2

Yes, calls to /access-tokens/{accessTokens} use API quota. You can see that by repeatedly running /2.2/access-tokens/XBWL0stf*YIOCl7WpJHqYA)) for example. With each call, the quota_remaining value will decrease. However, there is no reason that the token check has to use the same key as your main app. The token check and your main app would then use ...


2

It would be simpler and more precise if you made users provide their ID number instead (for example, yours is 1637442 on Stack Overflow). Then you'd merely use the /users/{ids}/questions route to get the questions. If you really must have access by username, then: First do a search using the inname parameter of the /users route. It is recommended that ...


2

While this is not available I don't think SE can do much to prevent it. I don't have any easily readable code to give you code example, but the theory is following: The upload request To upload images to Stack Exchange, you must send following POST request to http://__HOST__/upload/image: fkey: we'll talk about this token later source: web/computer ...


2

It does return all the answers, but they're paged - by default you'll only get 30 at a time. You'll likely want to increase pagesize to 100, and then add the additional code necessary to make subsequent requests if has_more is set on the response wrapper. So, for example, your first request would be like ...



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