This is something I'd need as well.
I'll add another example:
We moved our knowledge base to xenForo, where we have created community for our customers. We would use search posts API for searching our knowledgebase articles and community posts in our Discord-bot.