CMS Development

BBecker1
Participant

Website Search

SOLVE

Hello,

What I want:

BBecker1_0-1727436785867.png

I have pages, a blog and hubdbs where this content is from.
Is there a hubspot api to search all of these? or do I need to use different APIs to search for each type. What would be a simple solution to create a content page search like this?




0 Upvotes
2 Accepted solutions
Jnix284
Solution
Hall of Famer

Website Search

SOLVE

@BBecker1 the options for API website search are:

Jnix284_0-1727449125520.png

 

This is the legacy documentation for CMS Site Search and the newly updated beta docs for API CMS Site Search - I'm more familiar with the legacy docs so it's easier to find things there, but between the two you should definitely have everything you need to get this built out!


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon

View solution in original post

Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Website Search

SOLVE

Hi @BBecker1 ,

 

You can use the content search API that @Jnix284 shared, you can limit the results on the 'type' param, as Jennifer explained, but it is not possible to use that param for the 'Webinar' and 'Events' results. 

You can however, filter the results based on a pathPrefix. For example:
https://api.hubapi.com/contentsearch/v2/search?portalId=248909&term=Kennis&language=nl&limit=30&offs...

Will only return pages and blog posts in the Dutch language where the URL will start with '/nl/hubspot-development' You could do the same but use pathPrefix with '/webinars' for example.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

2 Replies 2
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Website Search

SOLVE

Hi @BBecker1 ,

 

You can use the content search API that @Jnix284 shared, you can limit the results on the 'type' param, as Jennifer explained, but it is not possible to use that param for the 'Webinar' and 'Events' results. 

You can however, filter the results based on a pathPrefix. For example:
https://api.hubapi.com/contentsearch/v2/search?portalId=248909&term=Kennis&language=nl&limit=30&offs...

Will only return pages and blog posts in the Dutch language where the URL will start with '/nl/hubspot-development' You could do the same but use pathPrefix with '/webinars' for example.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


Jnix284
Solution
Hall of Famer

Website Search

SOLVE

@BBecker1 the options for API website search are:

Jnix284_0-1727449125520.png

 

This is the legacy documentation for CMS Site Search and the newly updated beta docs for API CMS Site Search - I'm more familiar with the legacy docs so it's easier to find things there, but between the two you should definitely have everything you need to get this built out!


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon