Knowledge Base articles API for search and get content


#1

Hi all,

we're currently in a migration process and before Hubspot we were using a service that offered an API to query search strings to find relevant articles and receive the content of those articles to present it directly in our app.

By guessing, I could find a query that I can use for Hubspot Knowledge Base to at least search for relevant articles, but it is not yet documented:
https://api.hubapi.com/contentsearch/v2/search?portalId=<id>&type=KNOWLEDGE_ARTICLE

But the response only returns a list of links to the absolute URL on Hubspot and not the full content of each article. Is there an additional parameter to get the full content?

And also my hope was to get the content of any specific article by using this API query, but it didn't work so far:
https://api.hubapi.com/content/api/v2/knowledge-articles/<articleId>?hapikey=

Those are my questions and any feedback is appreciated.

Best regards,
Stefan


#2

Hi @stefan-myprofitsee,

The Site Search endpoint doesn't yet document the ability to search Knowledge Base articles, but technically it's currently capable of providing Knowledge Base search results. I'm not able to replicate your issue of only receiving absolute URLs though; can you give me an example of the raw response body?

Regarding you other question; there is not article-specific endpoint. The Content Search API is the only way to pull Knowledge Base article search results.