Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

7

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


6

Most routes that take an ID, including the /users route, will accept multiple values separated by semicolons. For example, a query like /users/1%3B22656?site=stackoverflow will give you results for both user 1 and user 22656. You can combine up to 100 ids in this fashion.


6

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


6

You cannot get the days visited, nor consecutive, information for a user because that is private information(Poster is SE representative). Stack Exchange is supposed to be about the content, not the people. And knowing people's (more detailed) visit history is a social metric, not an on-topic bit of information. In a similar question, one power-user put it ...


5

By "bio" you mean the about me field, right? ... Any path that returns a user object will return the about_me property, but this is not returned by default. You have to use a filter that has about_me enabled. For example, here is a query to get your "About me" on stackapps: users-by-ids#ids=8109&filter=!.2mo6GlnpFPFeBKnaz&site=stackapps An easy ...


5

You can use /users/{ids}/associated Try it for your network account Returns all of a user's associated accounts, given their account_ids in {ids}. {ids} can contain up to 100 semicolon delimited ids, to find ids programatically look for account_id on user objects. You can filter the network_users returned by this method with the types parameter....


4

Your stated problem is considerably easier than the question you linked. You can use the /users/{ids}/answers route to get what you want -- with a little work. The trick is to use a filter that returns the answers.tags property. In your case, if you really just want totals, and for one user at a time, you can use the filter: !GeF-5u(cSumXA . The ...


4

The API does not provide any method to determine a user's email address and it is unlikely to do so in the future. This would be a risk to both the user's privacy and his/her trust in Stack Exchange. And, a pressing need for this information has yet to be demonstrated, regarding the API. Note that Stack Exchange refuses to even provide the user's email hash ...


4

Use the /users/{ids} route to get account_id. Then pass the account_id to /users/{ids}/associated. Note that account_id is exactly the kind of information that should be heavily cached by your script/app. (Hint, hint; wink, wink; nudge, nudge. (^_^) ) For example: /2.2/users/10349?site=superuser&filter=!T6o*9deY.2ZD3-(n4f Returns: { "account_id": ...


3

You need to use a filter that returns those properties. The default filter does not. Also, the API is at version 2.2. You should use that unless you've a very good reason not to. So try, for example: http://api.stackexchange.com/2.2/users/55075?site=stackoverflow&filter=!G*ky*lRuarbDJTpnwEtY-a05oz Or: http://api.stackexchange.com/2.2/users/55075?...


3

Liking it so far. Here are some ideas. No idea how practical they are. I'd really like a page which could tell me the latest activity of all my favourite users, maybe with a clever filter to remove the uninteresting stuff (badges, edits, accepts). My browser just popped up a window for a fraction of a second. Please tell me that wasn't you... Note that ...


3

This is very costly to do in the API and currently impossible for many combinations of tag and date (because it would require more than the 10,000 allowed API calls per day). I'll write more about that tomorrow (11/11 or 11/12 UTC). Meanwhile, perhaps a SEDE query will work? The query: Top Answerers, by your tags and your date range takes your date range ...


3

Updated thanks to comments by Brock Adams and user43888. There are two methods to achieve this: Method 1: inefficient, but future-proof as it only depends on the SE API. Query the SE API for all Meta.SE users, in groups of 100 (maximum allowed ID) Get an access token and an API key, to be able to run the above call nearly 4000 times (equivalent to the ...


3

It's not possible (short of fetching all users and filtering yourself). The API simply does not offer that query. For alternatives, see the Data Explorer (SEDE): https://meta.stackexchange.com/q/253728/295232


3

This is not the most educated answer, but through trial and error I have found a way to get the information I'm needing for my project. However, the biggest downside to this method seems to be the throttles that are in place. Websites like Codepen can easily exceed this, especially if you're using a debug window and a live/full screen view side by side for ...


2

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


2

Hear! Hear! I want to study what makes a good answer on SO. I started by querying complete web pages (questions with all comments, answers, and their comments) for questions with some minimum score (such as 5) for a number of fixed tags A,B,C created in some time period (say, one full week two months ago). This can be done well with \search and a filter ...


2

You need to pass your request key as well. I'm not sure what you're using that isn't giving you the error message back, but if you had captured it you would have seen it said something like: { "error_id":405, "error_name":"key_required"," error_message":"`key` is required when `access_token` is passed." }


2

StackAnywhere has so far not attempted solve this problem. A similar issue exists for question lists. In fact it's more likely to be an issue here because when the list is sorted by date, new questions can push others down the list resulting in duplicate entries. It's an open issue in the StackAnywhere bug tracker at the moment.


2

You get it from the users route, like I told you in your last question. You can't use the Id from the stackexchange website. But in version 2.0 of the API you will highly likely be able to again.


2

As a sort of quick experiment, I slapped together a regex scraping of a single user's accounts page on SE.com and have put it up on the test deployment of se-flair: http://test.se-flair.appspot.com/SEaccounts/[assoc-id]/ The return is, at the moment, a JSON object with the display name, the gravatar URL, and an array of sites, where each site has the ...


2

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


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

That is not URL encoding, that is HTML entity encoding. By default, the API returns "safe" values; see the filters doc: Any string returned as a result of an API call with a safe filter will be inline-able into HTML without script-injection concerns. That is to say, no additional sanitizing (encoding, HTML tag stripping, etc.) will be necessary on ...


2

Actually, the API does this already, and I'd prefer this method over using my email address. In fact, the reason for the Stack Exchange API is so that our apps don't have to rely on third parties that may break, change their APIs, misuse our data, or go away. Additionally, if your app doesn't need access to sending me emails, then I'd just prefer you not ...


2

You can't as of now. It doesn't exist in the API. Here's a feature request I made - please upvote that for higher chances of getting this added! :)


2

Until the feature request is approved (unlikely, and a similar request has no developer love either), you can get this number in one of 3 ways: You can get slightly stale data with this SEDE query (Not mine, and may not reflect SE's algorithm as of 2018). Note that it uses your Stack Exchange account number (4337810 for the OP) -- which you can get by ...


2

Alas, no. The API currently does not have any easy way to track a user's edits. You can see what returns edit information by scrolling to the bottom of the revision object, documentation page. Currently, it says: Methods That Return This Type     posts/{ids}/revisions     revisions/{ids} Such cross-references are on every ...


2

You don't use shallow_user; several routes (can) return it. If you want the reputation for a user, you would typically use the /users/{ids} route. EG:           /2.2/users/2765346?site=stackoverflow If you just want the reputation and not a lot of other stuff use a filter. EG:           /2.2/users/2765346?...


2

This is probably a variation of this bug and a variation or repeat of this bug that was partially fixed (once upon a time). Anyway, the timeline does show all your events as can be seen with this query:     /2.2/users/4751173/timeline?fromdate=1563667200&site=stackoverflow where 1563667200 is midnight on July 21st, 2019. The problem is that ...


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