Language Code

The following API entry points provide the ability to search for records based on the language of post:

  • GET /posts

  • GET /posts/stats

With each of these endpoints, the language_code parameter can be used to filter posts by language:

  • language_code – a list of two letter ISO_639-1 language codes. The codes must be given in all upper case letters.

Valid two letter codes include the following examples:

  • EN – for English

  • ES – for Spanish (Español)

  • PT - for Portuguese (Português)

This is an array parameter which allows multiple options to be added to a list in the same request. The syntax involves appending empty square braces to the parameter before assigning it to one of the desired options. This can be repeated for multiple options. In the following example, only English or Spanish language posts are included in the results.

  • GET /posts?language_code[]=EN&language_code[]=ES

Note that when the language_code parameter is omitted, posts of all languages are included in the results.

Last updated