I checked docs , there are no endpoints to get total visited days and consecutive days. Is there any way to get them?

  • The closest is the "Legacy Profiles" StackAPP which shows last visited, the Calendar is only available to: the user, moderators, and staff.
    – Rob
    Dec 2, 2022 at 23:42

1 Answer 1


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 succinctly:

It's nobody's business how addicted a user is. To see how active s/he is, check their "activity" tab. Rep tells you long-term activity, the activity tab/rep graph shows short-term activity. I think that's enough for anyone.

We are NOT Facebook. Please don't make us Facebook.

That said, there might be some value in statistics comparing various metrics against days visited. To that end, there is a request to add this information to the Stack Exchange Data Explorer which you should probably support, given your question here.

If you just want days visited and consecutive for yourself, or the logged-in user, you have to resort to screen scraping, for now.

For example, this code will scrape your info, if you are logged into a Stack Exchange page:

var sqlch = $.get (
    "/users/" + StackExchange.options.user.userId + "/?tab=profile",
    function (pageTxt) {
        console.log ( $('#days-visited', pageTxt).text ().trim () );
} );

(Run the code from the browser console.)

You can also get a complete list of all the days you visited with an XHR call like this:

  • Sorry for the question, but where can I find the given YOUR_LOGGED-IN_SESSION_ID?
    – kissu
    Oct 29, 2022 at 16:00
  • The _=xxx param is actually a cache-busting param, so it isn’t really necessary. The session ID is sent as a cookie (acct).
    – cmbuckley
    Jan 6, 2023 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .