> ## 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.

# Powerstream オペレーター

> このページでは、[Powerstream] のルール作成時に利用可能なオペレーターの完全なリストを提供します。X API v2 standard tier の powerstream に関するリファレンスです。

このページでは、[Powerstream](/x-api/powerstream/introduction) のルール作成時に利用可能なオペレーターの完全なリストを提供します。

## 概要

Powerstream は、キーワードとメタデータに基づいて Post をフィルタリングするために、オペレーターを含むブールクエリを使用します。ルールは最大 2,048 文字まで、最大 1,000 個のルールを持つことができます。

***

## ユーザーオペレーター

| Operator       | 概要                  | 例                                    |
| :------------- | :------------------ | :----------------------------------- |
| `from:`        | 特定のユーザーからの Post に一致 | `from:xdevelopers` または `from:123456` |
| `to:`          | 特定のユーザー宛の Post に一致  | `to:jvaleski`                        |
| `retweets_of:` | 特定のユーザーのリポストに一致     | `retweets_of:xdevelopers`            |

***

## コンテンツオペレーター

| Operator        | 概要                          | 例                                         |
| :-------------- | :-------------------------- | :---------------------------------------- |
| `contains:`     | 特定のテキスト/キーワードを含む Post に一致   | `contains:hello` または `contains:-2345.432` |
| `url_contains:` | 特定のテキストを含む URL を持つ Post に一致 | `url_contains:"com/willplayforfood"`      |
| `lang:`         | 特定の言語の Post に一致             | `lang:en`                                 |

***

## エンティティオペレーター

| Operator | 概要                         | 例                                     |
| :------- | :------------------------- | :------------------------------------ |
| `has:`   | 特定のエンティティを含む Post に一致      | `has:images`、`has:geo`、`has:mentions` |
| `is:`    | 特定のタイプまたはプロパティを持つ Post に一致 | `is:retweet`、`is:reply`               |

### 利用可能な `has:` オプション

* `has:mentions` — 別のユーザーにメンションする Post
* `has:geo` — 位置情報データを持つ Post
* `has:links` — リンクを含む Post
* `has:media` — メディアを含む Post
* `has:lang` — 検出された言語を持つ Post
* `has:symbols` — キャッシュタグを含む Post
* `has:images` — 画像を含む Post
* `has:videos` — 動画を含む Post

### 利用可能な `is:` オプション

* `is:retweet` — リツイート
* `is:reply` — 他の Post への返信

***

## ロケーションオペレーター

| Operator        | 概要                         | 例                                                                                           |
| :-------------- | :------------------------- | :------------------------------------------------------------------------------------------ |
| `place:`        | 特定の場所からの Post に一致          | `place:"Belmont Central"` または `place:02763fa2a7611cf3`                                      |
| `bounding_box:` | 地理的なバウンディングボックス内の Post に一致 | `bounding_box:[-112.424083 42.355283 -112.409111 42.792311]`                                |
| `point_radius:` | ポイントの半径内の Post に一致         | `point_radius:[-111.464973 46.371179 25mi]` または `point_radius:[-111.464973 46.371179 15km]` |

***

## ユーザープロフィールオペレーター

| Operator    | 概要                          | 例                      |
| :---------- | :-------------------------- | :--------------------- |
| `bio:`      | 特定の bio 内容を持つユーザーの Post に一致 | `bio:"data scientist"` |
| `bio_name:` | bio に特定の名前を持つユーザーの Post に一致 | `bio_name:PhD`         |

***

## Post リファレンスオペレーター

| Operator                 | 概要                | 例                                           |
| :----------------------- | :---------------- | :------------------------------------------ |
| `retweets_of_status_id:` | 特定の Post のリポストに一致 | `retweets_of_status_id:1234567890123456789` |
| `in_reply_to_status_id:` | 特定の Post への返信に一致  | `in_reply_to_status_id:1234567890123456789` |

***

## 特殊構文オペレーター

| Operator   | 概要           | 例                |
| :--------- | :----------- | :--------------- |
| `@`        | メンションオペレーター  | `@username`      |
| `"phrase"` | 完全一致のフレーズに一致 | `"exact phrase"` |

***

## 論理オペレーター

| Operator  | 概要          | 例                                    |
| :-------- | :---------- | :----------------------------------- |
| `OR`      | 式間の論理 OR    | `x OR facebook`                      |
| Space/AND | 式間の論理 AND   | `x facebook` (両方の用語が存在する必要があります)     |
| `()`      | 複雑な式のグルーピング | `(x OR facebook) iphone`             |
| `-`       | 否定/除外       | `x -facebook` (x を含み facebook を含まない) |

***

## ルールの作成

### 基本例

```
# 特定のユーザーからの Post に一致

from:xdevelopers

# キーワードを含む Post に一致

contains:API contains:developer

# 英語の画像付き Post に一致

has:images lang:en
```

### オペレーターの組み合わせ

```
# @xdevelopers または @api の Post で、リツイートではないもの

(from:xdevelopers OR from:api) -is:retweet

# AI に言及し、画像を含み、リツイートを除く英語の Post

contains:AI has:images -is:retweet lang:en

# 特定の場所から 25 マイル以内の Post

point_radius:[-73.935242 40.730610 25mi] lang:en
```

***

## 次のステップ

<CardGroup cols={2}>
  <Card title="Powerstream のはじめに" icon="bolt" href="/x-api/powerstream/introduction">
    Powerstream を始める
  </Card>

  <Card title="切断の処理" icon="plug" href="/x-api/fundamentals/handling-disconnections">
    ストリーミング切断を処理
  </Card>

  <Card title="リカバリと冗長性" icon="https://mintcdn.com/x-preview/cfyQtgCdwk8p69aa/icons/xds/icon-shield-keyhole.svg?fit=max&auto=format&n=cfyQtgCdwk8p69aa&q=85&s=a0e05514090c8a6af232297bfb9c4055" href="/x-api/fundamentals/recovery-and-redundancy" width="24" height="24" data-path="icons/xds/icon-shield-keyhole.svg">
    失われたデータを復旧
  </Card>
</CardGroup>
