# How to Search Tweets by Language

To search tweets in one language on X, add lang: and the two-letter language code to your query, for example football lang:es for posts in Spanish.

[![apidojo](/blog/authors/apidojo.png)**Apidojo** *15+ years of experience in data retrieval.*](/blog/authors/apidojo/)

**7 October 2026** Published

**2 min** Read

![Cover card reading 'How to Search Tweets by Language on X'](/blog/covers/search-by-language.png)

**To search tweets in one language on X, add `lang:` and the two-letter language code to your query, for example `football lang:es` for posts in Spanish.** X detects each post’s language automatically. You can also pick a language from the dropdown in the Advanced search form.

Language filters are essential for regional research and for cutting noise from global topics. `lang:` sits with the word operators in the [Twitter advanced search operators](/blog/twitter-search/advanced-search-operators/) reference. This guide is one of the techniques in [how to search tweets by keyword](/blog/twitter-search/search-tweets-by-keyword/).

## How Do You Filter X Search by Language?

**You filter X search by language by adding `lang:` with an ISO language code, or by choosing a language under Words in the Advanced search form.** X’s advanced search lets you search posts in a specific language ([X Help Center](https://help.x.com/en/using-x/x-advanced-search)). Listed below are the 3 steps.

1.  **Type** your keyword and the language code: `elections lang:de`.
2.  **Press** Enter.
3.  **Open** **Latest** for every match.

## Common X Language Codes

**X uses two-letter ISO 639-1 codes for most languages.** Listed below are 12 common ones.

| Language | Code | Example |
| --- | --- | --- |
| English | en | ai lang:en |
| Spanish | es | ia lang:es |
| Portuguese | pt | futebol lang:pt |
| French | fr | élection lang:fr |
| German | de | wahl lang:de |
| Italian | it | calcio lang:it |
| Turkish | tr | deprem lang:tr |
| Arabic | ar | كرة lang:ar |
| Japanese | ja | 地震 lang:ja |
| Korean | ko | 축구 lang:ko |
| Hindi | hi | क्रिकेट lang:hi |
| Indonesian | in | banjir lang:in |

Indonesian uses `in` on X rather than the ISO code `id` ([twitter-advanced-search reference](https://github.com/igorbrigadir/twitter-advanced-search)).

## What Are X’s Special Language Codes?

**X has special language codes for posts with no detectable language, such as posts that contain only hashtags, links or media.** Listed below are the 7 special codes (twitter-advanced-search reference).

| Code | Finds posts that contain |
| --- | --- |
| lang:und | Text in an undetermined language |
| lang:qam | Only mentions |
| lang:qct | Only cashtags |
| lang:qht | Only hashtags |
| lang:qme | Only media links |
| lang:qst | Very short text |
| lang:zxx | Only media or a link card, with no text |

## How Do You Search Several Languages at Once?

**To search several languages, group the codes with uppercase OR: `topic (lang:es OR lang:pt)`.** To exclude a language, negate it: `topic -lang:en`. OR searches are covered in [how to search multiple keywords on X with OR](/blog/twitter-search/search-multiple-keywords-or/).

## Why Does a Language Filter Miss Posts?

**A language filter misses posts because X detects language automatically, and short or mixed-language posts are often classified wrongly or as undetermined.** Add `OR lang:und` to catch unclassified posts, or search a keyword that only appears in the target language.

## How to Collect Posts in One Language With apidojo

**apidojo’s [Tweet Scraper V2](https://apify.com/apidojo/tweet-scraper) on Apify has a `tweetLanguage` input that applies the language filter for you, so a dataset contains posts in one language only.** The actor documents this with a keyword example in English (Apify).

```
{
  "searchTerms": ["artificial intelligence"],
  "tweetLanguage": "es",
  "sort": "Latest"
}
```

It costs $0.40 per 1,000 tweets. Language-filtered datasets are covered in [how to collect tweets for sentiment analysis](/blog/twitter-scraping/sentiment-analysis-dataset/), and the full product is the [apidojo Twitter Scraper](/scrapers/twitter-scraper/).

## The scrapers behind this

-   [Tweet Scraper V2 Tweets from searches, profiles, Lists and URLs; 49–64 tweets/sec; minimum 50 per query $0.40 / 1K tweets](/scrapers/twitter-scraper/)

## Questions people ask

### Does lang: use the author's language setting?

No, `lang:` uses the language X detects in the post itself.

### Can you search by country instead of language?

Not reliably; location operators return few posts. Language plus local keywords works better.

### What is the code for Chinese?

`lang:zh` covers Chinese posts.

## More on keyword search

-   [How to Search Tweets by Keyword on X (2026) How X matches keywords, and the operators for exact phrases, OR, exclusions, hashtags, cashtags, domains and languages.](/blog/twitter-search/search-tweets-by-keyword/)
-   [How to Search Tweets by Exact Phrase on X Put words in quotes to find posts with an exact phrase, use wildcards, combine phrases with OR and fix phrase searches that fail.](/blog/twitter-search/exact-phrase-search/)
-   [How to Search Multiple Keywords on X With OR Use uppercase OR and parentheses to search several keywords, synonyms, hashtags or accounts at once on X, with examples.](/blog/twitter-search/search-multiple-keywords-or/)
-   [How to Exclude Words From Twitter Search Remove words, phrases, hashtags, accounts, replies and reposts from X search with the minus sign, and fix exclusions that fail.](/blog/twitter-search/exclude-words/)
-   [How to Search Tweets by Hashtag on X Search any hashtag on X by date, account, language or popularity, find hashtag-only posts and collect hashtag data.](/blog/twitter-search/search-by-hashtag/)
-   [How to Search Tweets by Cashtag ($TSLA, $BTC) Search stock and crypto tickers on X with cashtags, filter out promotional spam and collect ticker posts for analysis.](/blog/twitter-search/search-by-cashtag/)
-   [How to Search Tweets Linking to a Website Use url: to find every post that links to a domain or article, see who shares your content and track competitor links.](/blog/twitter-search/search-by-url-domain/)
-   [Search Tweets by Likes, Reposts and Replies (min\_faves) Use min\_faves:, min\_retweets: and min\_replies: to find tweets above or below any engagement level, with worked examples.](/blog/twitter-search/search-by-engagement/)
-   [How to Find Viral Tweets About Any Topic Find viral tweets on any topic with like floors, repost filters and date windows, plus recipes for videos, threads and links.](/blog/twitter-search/find-viral-tweets/)
-   [Search Only Tweets With Images, Videos or Links The 9 X media filters for images, videos, links and news, how to combine them, and how to remove media from search results.](/blog/twitter-search/media-filters/)

![apidojo](/blog/authors/apidojo.png)

## [Apidojo](/blog/authors/apidojo/)

15+ years of experience in data retrieval.

API Dojo is always ready for you. With 15+ years of experience, data acquisition has never been that easy. Cheapest prices with high availability.

-   🏯 15+ years of experience in data retrieval.
-   💰 Cheapest prices, qualified data.
-   ⚙️ High availability, extreme maintenance.
-   🐉 Hyper communicative, excellent support.

-   [apify.com](https://apify.com/apidojo)
-   [x.com](https://x.com/apidojo_)
-   [github.com](https://github.com/apidojo-io)
