How to Filter News by Language
Restrict News API results to one or more languages with language.code
Written by Tasha Tatum
June 26, 2026
How to filter news by language
To return news in a specific language, add the language.code parameter to your request with an ISO 639-1 language code, for example language.code=en. You can pass up to three codes separated by commas, and articles in any of those languages are returned (OR logic).
curl "https://api.apitube.io/v1/news/everything?language.code=en&api_key=YOUR_API_KEY"
You can also send the key as a header (X-API-Key: YOUR_API_KEY) instead of the api_key query parameter. If you omit language.code entirely, no language filter is applied and articles in all detected languages are returned.
What is the language.code parameter?
language.code takes one or more ISO 639-1 codes — the two-letter codes like en (English), fr (French), de (German), es (Spanish), ja (Japanese) or zh (Chinese). Each code must be one or two characters long. The value is case-insensitive, so EN and en behave the same way.
One convenience alias exists: us is treated as en. Sending language.code=us returns English articles, which is handy when you map a country code straight into the language field.
How to request a single language
Pass a single code to keep results in one language. This request returns only French articles:
curl "https://api.apitube.io/v1/news/everything?language.code=fr&api_key=YOUR_API_KEY"
Every article in the response carries a language field with its ISO 639-1 code, so you can confirm what you received:
{
"id": 123456789,
"title": "…",
"language": "fr"
}
How to request multiple languages at once
Separate codes with commas to match articles in any of the listed languages. This pulls English, Japanese and German articles in a single call:
curl "https://api.apitube.io/v1/news/everything?language.code=en,ja,de&api_key=YOUR_API_KEY"
The maximum is three languages per request. If you list more than three, only the first three are used — the rest are silently dropped, so keep the list to three meaningful codes.
How to exclude a language with ignore.language.code
To keep everything except certain languages, use ignore.language.code. It follows the same rules — comma-separated, up to three codes. This excludes French articles while returning all other languages:
curl "https://api.apitube.io/v1/news/everything?ignore.language.code=fr&api_key=YOUR_API_KEY"
language.code and ignore.language.code can be combined with other filters. A common pattern is to drop both a country and its language at the same time:
curl "https://api.apitube.io/v1/news/everything?ignore.source.country.code=fr&ignore.language.code=fr&api_key=YOUR_API_KEY"
For more on country filtering, see How to filter news by country and location.
Which endpoints support language filtering?
Language filtering is part of the shared filter chain, so it works on the main search and retrieval endpoints, including /v1/news/everything, /v1/news/top-headlines, /v1/news/story, /v1/news/category, /v1/news/topic, /v1/news/industry and /v1/news/entity. You can also combine it with sorting and source quality, for example to read high-authority business coverage across three languages:
curl "https://api.apitube.io/v1/news/everything?language.code=en,ja,de&source.rank.opr.min=6&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
Common Questions
- What language codes does APITube accept?
- How many languages can I request at once?
- What error do I get for an invalid language code?
- Does language.code translate articles?
What language codes does APITube accept?
APITube accepts ISO 639-1 codes that are one or two characters long, such as en, fr, de or zh. The full set is on the list of supported languages in the documentation. The alias us resolves to en.
How many languages can I request at once?
Up to three per request, in both language.code and ignore.language.code. Codes beyond the third are ignored, so a request like language.code=en,fr,de,es only applies en,fr,de.
What error do I get for an invalid language code?
A code that is empty or longer than two characters returns HTTP 400 with error ER0061 (or ER0063 for the ignore variant). A well-formed code that does not exist in APITube returns HTTP 400 with ER0237 (ER0239 for ignore) and a message like language with code 'xx' not found.
Does language.code translate articles?
No. language.code filters articles by the language they were originally published and detected in — it does not translate text. Translation is a separate capability; see How APITube handles languages and translation for how detection and translation differ.