APIs & Integrations

AmandeepSingh
メンバー

API: How to get Blog-Posts by Language

解決

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 いいね!
1件の承認済みベストアンサー
Mike_Eastwood
解決策
名誉エキスパート | Gold Partner
名誉エキスパート | Gold Partner

API: How to get Blog-Posts by Language

解決

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 

元の投稿で解決策を見る

3件の返信
Mike_Eastwood
解決策
名誉エキスパート | Gold Partner
名誉エキスパート | Gold Partner

API: How to get Blog-Posts by Language

解決

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製品開発チーム
HubSpot製品開発チーム

API: How to get Blog-Posts by Language

解決
Not sure why I forgot about that beta!
0 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

API: How to get Blog-Posts by Language

解決

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 いいね!