Efficiently get all tags through the API

Hi guys, is there an efficient way to get every tag across an entire vault through the API? Currently I check every note for tags and then add the tags to a set, but I feel like this is really inefficient.

Thanks for any suggestions.

1 Like

I couldn’t find any other way, so I get the tags from each file’s metadata and create a set, as you do. Make sure to get the tags from the cache metadata, not parsing the file.

1 Like

app.metadataCache.getTags() seems to be the best way to achieve this. Why it is undocumented is beyond my comprehension.