Tag Info

Hot answers tagged

6

Markdown. While you could use HTML (just like you can in posts), each time you use HTML instead of Markdown to format a post, Evan Carroll rapes a little kitten and sticks another needle in his Jeff Atwood voodoo doll.


6

This is what custom filters are for. For example, if you append &filter=!BGRhem4Z)WIti9lP55R*tgr(Jq_fHC to your query, above, you will get results without upvote_count, downvote_count, or owner information. (The first two aren't included by default anyway.) An easy way to create a filter is to use the filter-edit tool, on the appropriate doc page for ...


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


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


5

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.1), 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. ...


4

See the API docs; there is no mention of a WSDL file for the API. Further, WSDL is typically used for old XML and/or SOAP API's. Since the Stack Exchange API is JSON based, it seems unlikely that an official WSDL exists. (The API docs also make no mention of XML or SOAP.)


4

The API allows you to set a pagesize of 0 to 100 (with the exception of the /sites route, which allows larger values), and defaults to a maximum of 30 items in the response. To get all of the items applicable to the API query, you need to check the has_more field to determine if you need to request subsequent pages via the page parameter. This is covered in ...


4

It's a bit of a Catch-22. Work around it by making an app (or script) post for your app (or script), but put "(Placeholder)" in the title and tag it with placeholder. Also, indicate in the post that the app is not yet ready for prime time. This has already been done a few times, for example: "Chatdump - a site monitor (placeholder)" "A small Stack ...


4

You can get data close-enough to "real time" for most practical purposes. See the StackHose app, for example. Read the page about the API's Throttles and Quotas. From that page we can deduce: The maximum, burst, request rate is 30 requests per second, and this risks getting your app shut down. Your app will never be allowed more than 10,000 requests per ...


4

For analyzing large chunks of data, don't use the API. Use the Stack Exchange Data Explorer (SEDE), that's what it's there for. SEDE data lags real-time by 1 to 5 weeks, but that's no big problem for most statistical purposes. For intense "Big data" analysis beyond even SEDE's capabilities, use the quarterly data dumps. (Thanks, Tim Stone, for the ...


3

From the docs for /users/{ids}/reputation (emphasis mine): Gets a subset of the reputation changes for users in {ids}. I think you'll find that the API method you're using is working exactly as designed - it's just not designed to do what you were expecting. Fortunately, /users/{ids}/reputation-history will yield precisely what you're after. ...


3

It's pretty simple, you just append your key to the URL as a parameter. For example, looking for users 1 and 5: http://api.stackexchange.com/2.2/users/1;5?site=stackoverflow&key=YOUR_KEY_HERE So, it looks like your HTTP.call would become: HTTP.call ( "GET", urlString, {params:{site:"stackoverflow", key:"YOUR_KEY_HERE"}}, function ...


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

Stack Exchange supports the width attribute; see "What HTML tags are allowed on Stack Exchange sites?". The answer to that question emphatically states: You must enter the tags exactly as shown. Any deviation from this list—adding extra spaces, using single quote or no quotes, etc.—means the tag will be stripped. and: The attribute order is ...


3

If you already have a token, then you can use the /me/associated network route to get the associated site for the authorized user. There's a similar route that takes a network account ID and does not require an active access token.


3

Currently the API does not let you get "featured" questions (questions that have bounties) using or logic with the tag parameters. That is, you cannot search for questions that: Have a bounty AND (have Tag-A OR Tag-B) It might make sense to add a hasbounty parameter to the /search/advanced path. Workaround: In the meantime, since the number of featured ...


3

No, Area51 isn't in the API; it's different enough from the Q&A sites that it'd have to have a rather different one anyway. There are currently no plans to make an Area51 API either.


3

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


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


2

The page where you can find the API key for your registered application says that the key doesn't need to be kept secret: [The key] is not considered a secret, and may be safely embed [sic] in client side code or distributed binaries. Abuse is typically an issue for the end-user, so you shouldn't be concerned about it beyond recognizing backoff ...


2

The fix for me was unchecking "Enable Client Side OAuth Flow"


2

HTTP GET $.get("https://api.stackexchange.com/2.1/posts/144890/comments/add?site=meta.stackoverflow&key=ArbQjyecuJQ((&access_token=2YVSaccesstokenomg))&body=Another%20API%20test", console.log) {"error_name": "no_method", "error_message": "this method cannot be called this way", "error_id": 404} HTTP POST ...


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

Reference: Stack Exchange API Authentication Looking for a beginner's tutorial to using the API Yeah the registration form now says, "Website URL is required". So, if you don't have your own website: Enter stackexchange.com as the Application Website. Enter stackexchange.com as the OAuth Domain. This will allow you to use ...


2

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


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

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

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


1

Unfortunately, Unicoins seem to have been retired for now, and the current revision of the API (2.2) does not support anything even remotely currency-related, unless you count Bitcoin Stack Exchange. (We can still dream about the inclusion of Unicoins in 2.3 or 3.0, though.)



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