Workaround on Blog list filtering


#1

Hi team! We were going over the documentation https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts

And we confirmed that filtering by topic_id is not supported. Do we have a workaround?

End goal is for customers to see certain blog posts.

Thanks!


#2

Hi @Walter_Cervantes,

What exactly is the end goal? Are they hoping to display only posts from a certain topic? They might be able to use the topic RSS feed for their specific blog topic:


#3

Thank very much for your help this is exactly what i required, precisely that my friend, “display only posts from a certain topic” thats what i want to achieve.

What you just said is great help! much appreciate it i was having issues with the API since the people i work for decided to add all posts in within one unique blog, so right now im rebasing JSON max char limit, i really needed a way to either filter the blogs by topic or in such a case another format just like XML :smiley: having this filtered will make my life easy!!!

One last question, is there a way to list all of the different blog tags? via same url with path /rssxml/ ?


#4

Hi @Jonathan_Barquero,

That’s correct, the following format can be applied to any topic:
http://blog.example.com/topic/:name-of-tag/rss.xml


#5

Sorry i meant what url should i use to list all of my tags? (not to get posts/articles that belongs to a certain topic/tag i understood that part and actually just finished the integration so thanks again this really made my life easy, have no idea)


#6

Hi @Jonathan_Barquero,

The RSS feed for your blog (all topics) is the blog root URL with /rss.xml appended to the end. e.g. http://blog.example.com/rss.xml


#7

i’m new to hubspot’s developer community. we recently signed up for hubspot. our blog is hosted on hubspot but our site is hosted separately. i’m trying to make a server-side api call to pull hubspot blogs that are tagged as “featured” and show them on our website’s homepage. (side note: our blog already has a tag called ‘featured’ and blogs have that tag appropriately applied)

if i understand this thread correctly, i will have to:
1.) get the rss.xml feed for my tag:
http://blog.kwaddle.com/tag/featured/rss.xml

this gives me link, title, description, tags, author and publish date for posts, but not the featured image. so then, how do i get the featured image for a post using the rss feed method?

ideally, i should be able to:

1.) use the topics api to get the topic_id for the ‘featured’ tag:
https://api.hubapi.com/blogs/v3/topics?hapikey=[my-hapikey]&name__icontains=featured

2.) query the blog post api and pass in a tag id:
https://api.hubapi.com/content/api/v2/blog-posts?hapikey=[my-hapikey]&topic_ids=[my_tags_topic_id]

do you have any estimates when the api will be fixed? any other workarounds that you can suggest?


#8

Hi @devenh,

The featured image should be included in the RSS feed as an img tag with the class hs-featured-image. It's not currently possible to pull blog posts based on the topic via the blog posts API.