APIs & Integrations

AmandeepSingh
Membre

API: How to get Blog-Posts by Language

Résolue

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 Votes
1 Solution acceptée
Mike_Eastwood
Solution
Expert reconnu | Partenaire solutions Gold
Expert reconnu | Partenaire solutions Gold

API: How to get Blog-Posts by Language

Résolue

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 

Voir la solution dans l'envoi d'origine

3 Réponses
Mike_Eastwood
Solution
Expert reconnu | Partenaire solutions Gold
Expert reconnu | Partenaire solutions Gold

API: How to get Blog-Posts by Language

Résolue

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
Équipe de développement de HubSpot
Équipe de développement de HubSpot

API: How to get Blog-Posts by Language

Résolue
Not sure why I forgot about that beta!
0 Votes
dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

API: How to get Blog-Posts by Language

Résolue

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 Votes