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


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:


You must log in to answer this question.

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