Macros for querying tagged keywords (or variables)

I’m looking for a hybrid between the variable option in a space tool and the page properties macro.

Essentially, we have a very long list of keywords (table names, data partners, core variables in our data set) that get referenced frequently throughout our Wiki space. I’d like to be able to mark them as a keyword, then be able to query them such that all mentions of this keyword will show up in a set output. These keywords are too granular to be used in page labels (plus there would be too many labels in a page that this wouldn’t be efficient).

I like that you can assign a $ in front of a word to make it a variable, and that you have the option to define a list of variables in a space tool. It would be so nice to be able to query for $variables and have an organized way to view excerpts of where they show up. Any ideas or existing macro out there?