これが一番近そうhttps://github.com/mastodon/mastodon/blob/main/app/controllers/admin/trends/tags_controller.rb
Mastodonは、オープンなウェブプロトコルを採用した、自由でオープンソースなソーシャルネットワークです。電子メールのような分散型の仕組みを採っています。