APIs & Integrations

jmgelogo
Member

Site Search Issue: Filtering Search

SOLVE

Hello,

I need some help on filtering the results of Site Search API, I'm using this API: /contentsearch/v2/search by using ajax call.
The issue I'm dealing with it has too many results. Even the content of the header, top navigation text, etc, are also included on the results. Is there a way we could limit the search only on the actual content?

Any help is much appreciated. Thanks.
JM

0 Upvotes
1 Accepted solution
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Site Search Issue: Filtering Search

SOLVE

Hi @jmgelogo, you should try using a few of the filters as outlined here: https://developers.hubspot.com/docs/methods/content/search-for-content. A few filter parameters to consider to increase performance:

  • Limit -- limits the number of results returned.
  • Minimum Score -- Specifies the minimum score threshold to return a given result. This parameter is intentionally set low by default in order to return many results.
  • Length -- Can be set to LONG or SHORT . Setting this parameter to SHORT will return a short highlight of the meta description. Setting this parameter to LONG will build the snippet based on the html/content of the page.

Hope this helps answer your question!

View solution in original post

0 Upvotes
2 Replies 2
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Site Search Issue: Filtering Search

SOLVE

Hi @jmgelogo, you should try using a few of the filters as outlined here: https://developers.hubspot.com/docs/methods/content/search-for-content. A few filter parameters to consider to increase performance:

  • Limit -- limits the number of results returned.
  • Minimum Score -- Specifies the minimum score threshold to return a given result. This parameter is intentionally set low by default in order to return many results.
  • Length -- Can be set to LONG or SHORT . Setting this parameter to SHORT will return a short highlight of the meta description. Setting this parameter to LONG will build the snippet based on the html/content of the page.

Hope this helps answer your question!

0 Upvotes
jmgelogo
Member

Site Search Issue: Filtering Search

SOLVE

Thanks @Connor_Barley!

0 Upvotes