Here's the situation: I'm investigating a user's behaviour in a couple of chat rooms because I find the overall patterns concerning, and may need to direct some official attention their way discreetly. They haven't spoken there often, and I suspect a high % of their activity will be of interest.

Is there some way I can find the various instances of someone's activity in a room? Either their messages, or the days on which they have spoken, would be useful.

The best I can think of is to open up the Transcript and search it for very common words, but "the" turns up no results, and "you" isn't picking up much. I also tried Google ({username} site:chat.stackexchange.com/transcript/{roomnumber}), but that digs up a lot of false positives, and doesn't turn up incidents I know are there (I was there for them).

  • 2
    If only one could search for the wildcard q=* in http://chat.stackexchange.com/search?q=*&user=<usernum>&room=<roomnum>...
    – Werner
    Commented Feb 4, 2016 at 6:02

2 Answers 2


There is a way to see all messages in all rooms on the same chat server:

  1. Go to the user's chat profile, e.g. this one.
  2. Click the "recent" link:

enter image description here

You will see the last 50 messages by that user, in all rooms, with the room details to the left. 3. Though there is no UI for paging, such paging exists, you'll just have to manually change the URL by appending &page=[page] to see the various pages. E.g. change https://chat.meta.stackexchange.com/users/152515/doppelgreener?tab=recent to https://chat.meta.stackexchange.com/users/152515/doppelgreener?tab=recent&page=2 to see the second page with the next 50 messages, etc.


If you're not afraid of running a userscript from your webbrowser console you can use the following script:

(function () {
    "use strict";

    var room = 721, // http://chat.meta.stackexchange.com/rooms/721/shadows-den
        // Yes, month is zero based... day isn't :(
        date = new Date(2015, 9, 1), // 0 = Jan, 1 = Feb ... 11 = Dec
        enddate = new Date(date.valueOf()),
        userid = 282866, // berserk
        url = ['/chats', room, 'events'].join('/'),
        totalCount = 0,
        MS = 1000, // miliseconds
        baseYear = 1900,
        msgCountMax = 500;

    enddate.setDate(enddate.getDate() + 1);

    function loadEvents(before) {
        // data to post
        var data = {
            mode: 'Messages',
            before: before, // before this message id
            msgCount: msgCountMax, // we never get more ...
            fkey: fkey().fkey
        $.post(url, data).success(function (eve) {
            var i,
                next = true,
            for (i = 0; i < eve.events.length; i = i + 1) {
                event = eve.events[i];
                eventDate = new Date(event.time_stamp * MS);
                // time_stamp is now a real Date
                if (eventDate >= date) {
                    if (event.user_id === userid) {
                        // log all content!
                } else {
                    // we reached our date...
                    // but keep processing....
                    next = false;
            if (next){
        }).fail(function () {

    // get the enddate full chat transscript
        baseYear + enddate.getYear(),
        enddate.getMonth() + 1, /* hate JavaScript*/
        enddate.getDate()].join('/'), function (html) {
        var $messages = $(html).find('.message[id^="message-"]');
        // if those have messages ...
        if ($messages.length > 0) {
            // get the first message id to start loading events before that id
            loadEvents(parseInt($messages[0].id.replace('message-', ''), 10 /* base 10 */));
        } else {
            // 0 messages 
            console.log('total messages: 0');

You simply login on your favorite chat server, find the room number you're interested in (in the example it is room 721), set a start start date and the userid of the user you're investigating. Set the endDate in the enddate.setDate call and your all set to hit enter.

The console.log(event.content); will output all messages from that user in the browser console. You can change the boolean logic preceding that statement to only output lines you're interested in.

Beyond this your next option is writing a transcript scraper so you get all messages in your own database but that is a little bit more work and left for another answerer.

  • This doesn't seem to work anymore. I tried it and it gives me a 500 server error on /chats/[room ID]/events. Commented Mar 5, 2019 at 8:10
  • @SonictheWizardWerehog are you logged in and do you have a valid fkey on the chat page?
    – rene
    Commented Mar 5, 2019 at 8:53
  • @SonictheAnonymousHedgehog does it work when you're logged in and have a valid fkey? Commented Jul 12, 2021 at 7:14
  • Basically run fkey().fkey in the developer console on the tab of the chatroom and that should return a string of hex numbers.
    – rene
    Commented Jul 12, 2021 at 7:20

You must log in to answer this question.

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