> For the complete documentation index, see [llms.txt](https://docs.junkipedia.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.junkipedia.org/es/material-de-referencia/api/parametros-de-la-cadena-de-consulta/codigos-de-idioma.md).

# Códigos de idioma

Los siguientes puntos de entrada de la API permiten buscar registros según el idioma de la publicación:

* GET /posts
* GET /posts/stats

En cada uno de estos endpoints, el parámetro **language\_code** se puede utilizar para filtrar publicaciones por idioma:

* **language\_code –** una lista de códigos de idioma de dos letras según el estándar [ISO\_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). Los códigos deben proporcionarse en letras mayúsculas.

Ejemplos de códigos de dos letras válidos incluyen los siguientes:

* EN – para inglés (English)
* ES – para español (Español)
* PT – para portugués (Português)

Este parámetro es de tipo array, lo que permite incluir múltiples opciones en la misma solicitud. La sintaxis consiste en agregar corchetes vacíos al parámetro antes de asignarlo a una de las opciones deseadas. Esto se puede repetir para incluir múltiples idiomas. En el siguiente ejemplo, solo se incluirán publicaciones en inglés o español en los resultados:

* GET /posts?language\_code\[]=EN\&language\_code\[]=ES

Cabe señalar que si se omite el parámetro **language\_code**, se incluirán publicaciones de todos los idiomas en los resultados.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.junkipedia.org/es/material-de-referencia/api/parametros-de-la-cadena-de-consulta/codigos-de-idioma.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
