APIs & Integrations

AmandeepSingh
Member

API: How to get Blog-Posts by Language

SOLVE

Hi,

 

I am trying to get the blog-posts using API endpoint  https://api.hubapi.com/content/api/v2/blog-posts?......

This gives me the lists of blog-posts from all the languages. I want to get the posts in a specific Language. I read all the documentation but did not find any endpoint or parameter for this purpose.

 

I have to display the 4 recently published language-specific blogs in a section on different websites like Japanese blogs on a Japanese website and so on.

 

Is there any way to get the blog-posts by Language, using any API endpoint?

0 Upvotes
1 Accepted solution
Mike_Eastwood
Solution
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

API: How to get Blog-Posts by Language

SOLVE

Hi @AmandeepSingh 

 

You can use the new API (Version 3) https://developers.hubspot.com/docs/api/cms/blog-post

 

When you call/cms/v3/blogs/posts you will get a JSON Property for the language:

...
"language": "af",
...

 

The V3 API is in Beta... but that's better than not knowing which language the post is in.

 

Have fun

Mike

 

p.s. thanks for the mention @dennisedson 

View solution in original post

3 Replies 3
Mike_Eastwood
Solution
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

API: How to get Blog-Posts by Language

SOLVE

Hi @AmandeepSingh 

 

You can use the new API (Version 3) https://developers.hubspot.com/docs/api/cms/blog-post

 

When you call/cms/v3/blogs/posts you will get a JSON Property for the language:

...
"language": "af",
...

 

The V3 API is in Beta... but that's better than not knowing which language the post is in.

 

Have fun

Mike

 

p.s. thanks for the mention @dennisedson 

dennisedson
HubSpot Product Team
HubSpot Product Team

API: How to get Blog-Posts by Language

SOLVE
Not sure why I forgot about that beta!
0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

API: How to get Blog-Posts by Language

SOLVE

Hey @AmandeepSingh 

I don't know of a specific parameter you could search for language. 

@Mike_Eastwood , do you know? 

I wonder if looking at the url of each and sorting that way could work 🤔

0 Upvotes