Building Custom Search Experiences on the Hubspot CMS

Published on: March 04, 2024

Building great user experiences into your website is a mission critical component for any organization that is looking to attract and convert customers on their website. This is more important then ever now as migrating traffic from search engines and paid channels has become more difficult and expensive. These "engaging" experiences can be things like: unique page layouts, interactive tools or custom search experiences, just to name a few. 

Search is what I wanted to discuss today, and how you can build custom search experiences into your Hubspot CMS website using the Hubspot Search API.

Our team recently utilized the Hubspot Search API to build out a custom blog search for our client SilcoTek. Typically blogs are navigated by searching through tags, or topics to find the content that you might be interested in. However, we wanted to create a more custom search experience for our users by allowing them to search by name for any post, while right on the page. 

The Hubspot Search API allows you to search by a GroupID -- so we could limit our search to only the blog content that we were interested in, eliminating any other search results like landing pages and website pages. From there we used the Javascript fetch API to hit the endpoint and retrieve the new blog data and push it back onto the page. 

The advantage of using the Hubspot Search api, it is allows you to tune the search results to exactly the content that you want returned. You can adjust you call for things like: content type, language, domain and content length. Additionally, by building "in-page" search the user doesn't get redirected away from the page. So they have a better more consistent experience while reading the blog. 

In addition to the CMS search api, Hubspot has some other api's that you can use to build custom search experiences into your website like the HubDB api. This would allow you to search a specific database and return the results. The power of these API's are really endless and there is so much that you can do with them to create engaging experiences for your end users. 

To learn how we could help your organization build websites, landing pages or blogs on the Hubspot CMS reach out to us, we would love to learn more about your next project. 

 

 

 

 

 

Blog Authors:

Contact Our Team