Sign up ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

This was requested in 1 and declined because of a missing authentication method.

Now that authentication is in place, is there a way to retrieve the favorited tags of a user (myself)?

share|improve this question
I'd like to use this feature too – David Caunt Nov 17 '12 at 15:48
Yep. I would be nice feature to have – Aurélien Thieriot Jan 21 '14 at 23:03

1 Answer 1

After all these years, it looks like this will never get implemented. However, it's not too hard to get the information via page scraping.

  1. From a browser or scraper that is logged in as the user, fetch the site's question page. (EG:

  2. Parse the #interestingTags > nodes.

For example, this javascript will work in the browser console while logged in to and browsing any Stack Exchange page:

var favTagNodes = $('<div><a class="post-tag">** Error loading favorite tags. **</a></div>') 
.load ("/questions #interestingTags>", function (response, status, xhr) {
    var favoriteTags    = favTagNodes.find ("").map ( function () {
        return this.textContent;
    } )
    .get ();

    console.log ("favoriteTags: ", favoriteTags);
} );

  1. It can be made into a bookmarklet, or userscript, or browser extension.

  2. It even works cross-domain when using GM_xmlhttpRequest and a full URL.

  3. Be sure to cache the results for at least an hour to avoid excessive scrapes of the page and possible banning. See also: Etiquette of Screen-scraping Stack Overflow?.

share|improve this answer

You must log in to answer this question.

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