TimeStamp of Tag

Can we query the timestamp of attaching a tag to a Topic? Like I want to sort the topics on the time when they were tagged with some tag.

1 Like

It should be possible to get this information with the Data Explorer plugin. The time that a tag was added to a topic can be found from the created_at field of the topic_tags table. You’ll need to join the tags table to be able to find the tag by its name.


Thanks for suggesting plugin, but I need to fetch the information from the API.
I do not see any created_at field for tags when I query any topic information on sending GET request to discourseURL/t/{tid}.json. Can you suggest what I might be doing wrong here?

I don’t think the created_at parameter for tags is available anywhere in the Discourse JSON payload. You could write a Data Explorer query to get a tag’s created_at value and then run the query through the API. There are details about how to to that here: How to run Data Explorer queries with the Discourse API.

1 Like