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

# Likes Streams

> Likes Streams エンドポイントは、永続的な HTTP GET 接続を介してリアルタイムの like イベントを配信します。stream をカバーする X API v2 standard tier のリファレンスです。

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

Likes Streams エンドポイントは、永続的な HTTP GET 接続を介してリアルタイムの like イベントを配信します。これらのストリームは X 全体の like アクティビティにアクセスでき、エンゲージメントのパターンを追跡し、コンテンツのパフォーマンスをモニタリングし、いいねの挙動を大規模に分析することを可能にします。

利用可能なストリームは 2 種類あります。

* **All Likes stream** — 公開されているすべての like イベントをリアルタイムで配信します（firehose）。
* **Sampled Likes stream** — 公開されている like イベントの 10% サンプルを配信します。

これらのストリーミングエンドポイントは [OAuth 2.0 App-Only](/resources/fundamentals/authentication#oauth-2-0) 認証を使用します。

*これらの API を使用するには、まずエンタープライズセールスチームとアカウントを開設する必要があります。*

<Note>
  **アカウントの設定**

  これらのエンドポイントにアクセスするには、以下が必要です。

  * 承認済みの [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)。
  * [Project](/resources/fundamentals/developer-apps) 内にある [developer App](/resources/fundamentals/developer-apps) のキーとトークンを使用した認証。

  X API v2 エンドポイントへのアクセス取得については、[getting started guide](/x-api/getting-started/getting-access) をご覧ください。
</Note>

***

## エンドポイント

| Method | Endpoint                                                         | Description                   |
| :----- | :--------------------------------------------------------------- | :---------------------------- |
| GET    | [`/2/likes/firehose/stream`](/x-api/stream/stream-all-likes)     | すべての like イベントをリアルタイムでストリーミング |
| GET    | [`/2/likes/sample10/stream`](/x-api/stream/stream-sampled-likes) | like イベントの 10% サンプルをストリーミング   |

***

## ストリーミングの基礎

<CardGroup cols={2}>
  <Card title="ストリーミングデータの利用" icon="stream" href="/x-api/fundamentals/consuming-streaming-data">
    ストリーミングクライアントのベストプラクティス
  </Card>

  <Card title="切断の処理" icon="plug" href="/x-api/fundamentals/handling-disconnections">
    グレースフルに再接続
  </Card>

  <Card title="大容量キャパシティ" icon="gauge-high" href="/x-api/fundamentals/high-volume-capacity">
    高スループットに対応
  </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>
