APIs & Integrations

AmandeepSingh
Membro

API: How to get Blog-Posts by Language

resolver

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 Avaliação positiva
1 Solução aceita
Mike_Eastwood
Solução
Especialista reconhecido(a) | Parceiro Ouro
Especialista reconhecido(a) | Parceiro Ouro

API: How to get Blog-Posts by Language

resolver

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 

Exibir solução no post original

3 Respostas 3
Mike_Eastwood
Solução
Especialista reconhecido(a) | Parceiro Ouro
Especialista reconhecido(a) | Parceiro Ouro

API: How to get Blog-Posts by Language

resolver

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
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

API: How to get Blog-Posts by Language

resolver
Not sure why I forgot about that beta!
0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

API: How to get Blog-Posts by Language

resolver

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 Avaliação positiva