> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 検索演算子

> このページでは、Search API エンドポイントのクエリを組み立てる際に利用可能な演算子の完全な一覧を提供します。integrate を扱う X API v2 スタンダードティアのリファレンス。

このページでは、Search API エンドポイントの[クエリを組み立てる](/x-api/posts/search/integrate/build-a-query)際に利用可能な演算子の完全な一覧を提供します。

## 概要

演算子は特定の投稿属性に一致するために使用されます。2 種類あります:

* **Standalone 演算子** — 単独でも、他の演算子と一緒でも使用可能
* **Conjunction-required 演算子** — 少なくとも 1 つの standalone 演算子と一緒に使用する必要あり

***

## キーワードとフレーズ演算子

| Operator         | Type       | Summary                   | Example                             |
| :--------------- | :--------- | :------------------------ | :---------------------------------- |
| `keyword`        | Standalone | 投稿本文内のキーワードに一致(トークン化した一致) | `pepsi OR cola OR "coca cola"`      |
| `emoji`          | Standalone | 投稿本文内の絵文字に一致              | `(😃 OR 😡) 😬`                     |
| `"exact phrase"` | Standalone | 投稿本文内の完全一致フレーズに一致         | `("X API" OR #v2) -"recent search"` |

***

## エンティティ演算子

| Operator | Type       | Summary              | Example                      |
| :------- | :--------- | :------------------- | :--------------------------- |
| `#`      | Standalone | ハッシュタグを含む投稿に一致(完全一致) | `#thankunext #fanart`        |
| `@`      | Standalone | ユーザー名にメンションする投稿に一致   | `(@XDevelopers OR @API) -@X` |
| `$`      | Standalone | cashtag を含む投稿に一致     | `$twtr OR @XDevelopers -$fb` |

***

## ユーザー演算子

| Operator       | Type       | Summary             | Example                        |
| :------------- | :--------- | :------------------ | :----------------------------- |
| `from:`        | Standalone | 特定ユーザーからの投稿に一致      | `from:XDevelopers OR from:API` |
| `to:`          | Standalone | 特定ユーザーへの返信投稿に一致     | `to:XDevelopers OR to:API`     |
| `retweets_of:` | Standalone | 特定ユーザーの Retweet に一致 | `retweets_of:twitterdev`       |

***

## URL 演算子

| Operator | Type       | Summary                                           | Example                               |
| :------- | :--------- | :------------------------------------------------ | :------------------------------------ |
| `url:`   | Standalone | URL のトークン化した一致(`url` または `expanded_url` フィールドに一致) | `url:"https://developer.twitter.com"` |

***

## コンテキストとエンティティ演算子

| Operator           | Type       | Summary                                   | Example                               |
| :----------------- | :--------- | :---------------------------------------- | :------------------------------------ |
| `context:`         | Standalone | 特定の domain/entity ペアを持つ投稿に一致              | `context:10.799022225751871488`       |
| `entity:`          | Standalone | 特定の entity 文字列値を持つ投稿に一致(recent search のみ) | `entity:"Michael Jordan"`             |
| `conversation_id:` | Standalone | 会話スレッド内の投稿に一致                             | `conversation_id:1334987486343299072` |

***

## リスト演算子

| Operator | Type       | Summary             | Example    |
| :------- | :--------- | :------------------ | :--------- |
| `list:`  | Standalone | 特定のリストのメンバーからの投稿に一致 | `list:123` |

***

## 投稿参照演算子

| Operator                | Type       | Summary               | Example                                    |
| :---------------------- | :--------- | :-------------------- | :----------------------------------------- |
| `in_reply_to_tweet_id:` | Standalone | 特定投稿への返信に一致           | `in_reply_to_tweet_id:1539382664746020864` |
| `retweets_of_tweet_id:` | Standalone | 特定投稿の Retweet に一致     | `retweets_of_tweet_id:1539382664746020864` |
| `quotes_of_tweet_id:`   | Standalone | 特定投稿の Quote Tweet に一致 | `quotes_of_tweet_id:1539382664746020864`   |

***

## 位置情報演算子

| Operator         | Type       | Summary            | Example                                                     |
| :--------------- | :--------- | :----------------- | :---------------------------------------------------------- |
| `place:`         | Standalone | 場所でタグ付けされた投稿に一致    | `place:"new york city" OR place:seattle`                    |
| `place_country:` | Standalone | 国コードを持つ投稿に一致       | `place_country:US OR place_country:MX`                      |
| `point_radius:`  | Standalone | 特定地点からの半径内の投稿に一致   | `point_radius:[2.355128 48.861118 16km]`                    |
| `bounding_box:`  | Standalone | バウンディングボックス内の投稿に一致 | `bounding_box:[-105.301758 39.964069 -105.178505 40.09455]` |

***

## 投稿タイプ演算子

| Operator       | Type                 | Summary            | Example                         |
| :------------- | :------------------- | :----------------- | :------------------------------ |
| `is:retweet`   | Conjunction required | Retweet に一致        | `data @XDevelopers -is:retweet` |
| `is:reply`     | Conjunction required | 返信に一致              | `from:XDevelopers is:reply`     |
| `is:quote`     | Conjunction required | Quote Tweet に一致    | `"sentiment analysis" is:quote` |
| `is:verified`  | Conjunction required | 認証済み作成者の投稿に一致      | `#nowplaying is:verified`       |
| `-is:nullcast` | Conjunction required | プロモーション投稿を除外(必ず否定) | `"mobile games" -is:nullcast`   |

***

## コンテンツタイプ演算子

| Operator         | Type                 | Summary                 | Example                              |
| :--------------- | :------------------- | :---------------------- | :----------------------------------- |
| `has:hashtags`   | Conjunction required | ハッシュタグを含む投稿に一致          | `from:XDevelopers -has:hashtags`     |
| `has:cashtags`   | Conjunction required | cashtag を含む投稿に一致        | `#stonks has:cashtags`               |
| `has:links`      | Conjunction required | リンクを含む投稿に一致             | `from:XDevelopers has:links`         |
| `has:mentions`   | Conjunction required | メンションを含む投稿に一致           | `#nowplaying has:mentions`           |
| `has:media`      | Conjunction required | メディア(写真、GIF、動画)を含む投稿に一致 | `(kittens OR puppies) has:media`     |
| `has:images`     | Conjunction required | 画像を含む投稿に一致              | `#meme has:images`                   |
| `has:video_link` | Conjunction required | ネイティブの X 動画を含む投稿に一致     | `#icebucketchallenge has:video_link` |
| `has:geo`        | Conjunction required | 位置情報データを持つ投稿に一致         | `recommend #paris has:geo`           |

***

## 言語演算子

| Operator | Type                 | Summary            | Example                    |
| :------- | :------------------- | :----------------- | :------------------------- |
| `lang:`  | Conjunction required | 特定の言語として分類された投稿に一致 | `recommend #paris lang:en` |

***

## 論理演算子

| Operator    | Summary        | Example                    |
| :---------- | :------------- | :------------------------- |
| `OR`        | 式間の論理和         | `cat OR dog`               |
| Space (AND) | 式間の論理積         | `cat dog`(両方必須)            |
| `()`        | 複雑な式のためのグルーピング | `(cat OR dog) -is:retweet` |
| `-`         | 否定 / 除外        | `cat -grumpy`              |

***

## サポートされている言語

`lang:` 演算子は以下の BCP 47 言語コードをサポートします:

| Language  | Code | Language   | Code | Language            | Code    |
| :-------- | :--- | :--------- | :--- | :------------------ | :------ |
| Amharic   | `am` | Greek      | `el` | Portuguese          | `pt`    |
| Arabic    | `ar` | Gujarati   | `gu` | Romanian            | `ro`    |
| Armenian  | `hy` | Hebrew     | `iw` | Russian             | `ru`    |
| Basque    | `eu` | Hindi      | `hi` | Serbian             | `sr`    |
| Bengali   | `bn` | Hungarian  | `hu` | Simplified Chinese  | `zh-CN` |
| Bulgarian | `bg` | Indonesian | `in` | Slovak              | `sk`    |
| Catalan   | `ca` | Italian    | `it` | Slovenian           | `sl`    |
| Croatian  | `hr` | Japanese   | `ja` | Spanish             | `es`    |
| Czech     | `cs` | Kannada    | `kn` | Swedish             | `sv`    |
| Danish    | `da` | Korean     | `ko` | Tamil               | `ta`    |
| Dutch     | `nl` | Latvian    | `lv` | Telugu              | `te`    |
| English   | `en` | Lithuanian | `lt` | Thai                | `th`    |
| Estonian  | `et` | Malayalam  | `ml` | Traditional Chinese | `zh-TW` |
| Finnish   | `fi` | Marathi    | `mr` | Turkish             | `tr`    |
| French    | `fr` | Norwegian  | `no` | Ukrainian           | `uk`    |
| German    | `de` | Persian    | `fa` | Urdu                | `ur`    |
| Georgian  | `ka` | Polish     | `pl` | Vietnamese          | `vi`    |

***

## クエリの制限

| Access level | Recent search | Full-archive search |
| :----------- | :------------ | :------------------ |
| Self-serve   | 512 文字        | 1,024 文字            |
| Enterprise   | 4,096 文字      | 4,096 文字            |

***

## 次のステップ

<CardGroup cols={2}>
  <Card title="クエリを組み立てる" icon="https://mintcdn.com/x-preview/szd6PKNMlRQoyyAo/icons/xds/icon-filter.svg?fit=max&auto=format&n=szd6PKNMlRQoyyAo&q=85&s=5d59aff402c1f2aeae0e9e44bb23400e" href="/x-api/posts/search/integrate/build-a-query" width="24" height="24" data-path="icons/xds/icon-filter.svg">
    クエリ構文とベストプラクティスを学ぶ
  </Card>

  <Card title="Search の紹介" icon="https://mintcdn.com/x-preview/cfyQtgCdwk8p69aa/icons/xds/icon-search.svg?fit=max&auto=format&n=cfyQtgCdwk8p69aa&q=85&s=8c11ad89387b7c09ced1553d5c232834" href="/x-api/posts/search/introduction" width="24" height="24" data-path="icons/xds/icon-search.svg">
    Search を始める
  </Card>

  <Card title="Query Builder ツール" icon="wrench" href="https://developer.x.com/apitools/query?query=">
    クエリをインタラクティブに構築・テスト
  </Card>
</CardGroup>
