APIs & Integrations

LukeM7
Membro

Posts API: is it possible to filter by tags or keyword?

Hello,
I wanted to know if there's a way to filter the posts in get_blog_posts API function by passing some extra parameter like "tag=TAG_NAME" or "search=SEARCH_KEYWORD"?

Thank you,

0 Avaliação positiva
3 Respostas 3
Derek_Gervais
Alunos da HubSpot
Alunos da HubSpot

Posts API: is it possible to filter by tags or keyword?

Hi @LukeM7,

The 'List blog posts' endpoint doesn't currently support filtering by tags, and it only supports 'search' insomuch as you can include the name parameter along with exact, contains, icontains, and ne parameters to filter by the internal name of the blog post.

0 Avaliação positiva
Luke_David
Membro

Posts API: is it possible to filter by tags or keyword?

Can you elaborate on how you'd structure the url parameter that would restrict the query to contains

0 Avaliação positiva
Luke_David
Membro

Posts API: is it possible to filter by tags or keyword?

User error. I was missing the i in __icontain.