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

# X API v2 の Volume streams (1% サンプルと Decahose)

> X API v2 の 1% sampled stream と 10% Decahose volume stream エンドポイントで、リアルタイムにサンプル投稿をストリーミングし、トレンド、センチメント、イベントを追跡します。

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>;
};

* 1% sampled stream。
* 10% sampled stream。一般に「Decahose」と呼ばれます。

これらは大量のデータを配信するため「volume streams」と呼ばれます。1% stream であっても、毎秒数十件の投稿を発行することがあります。これらのストリームで、トレンドの識別と追跡、全体的なセンチメントの監視、グローバルイベントの監視などが行えます。

これらのストリーミングエンドポイントは、永続 HTTP GET 接続を通じて [Post オブジェクト](/x-api/fundamentals/data-dictionary/reference#tweet) を配信し、[OAuth 2.0 App-Only](/resources/fundamentals/authentication#oauth-2-0) 認証を使用します。Essential アクセスでは、同時 1 接続を持てます。すべてのアクセスレベルで、接続リクエストは 15 分ウィンドウあたり最大 50 回まで実行できます。

これらの volume stream エンドポイントは編集された投稿をサポートします。エンドポイントは編集履歴(Post ID の配列を含む)と共に編集された投稿を配信します。編集履歴のない投稿では、この配列は単一の ID を保持します。編集された投稿では、この配列は編集順を反映して昇順に並んだ複数の ID を含み、最新バージョンが配列の最後の位置になります。投稿の編集のしくみについては [Post edits fundamentals](/x-api/fundamentals/edit-posts) ページを参照してください。

*これらの API を使用するには、まず当社の Enterprise セールスチームでアカウントを設定する必要があります。*

<Note>
  **アカウントセットアップ**

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

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)。
  * [Project](/resources/fundamentals/developer-apps) 内の[開発者 App](/resources/fundamentals/developer-apps) のキーとトークンによる認証。

  X API v2 エンドポイントへのアクセス取得の詳細は、[はじめにガイド](/x-api/getting-started/getting-access)を参照してください。
</Note>

<div class="flex space-x-2">
  <Button href="/x-api/posts/volume-streams/quickstart">
    クイックスタート
  </Button>

  <Button href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    サンプルコード
  </Button>

  <Button href="https://www.postman.com/xapidevelopers/x-api-public-workspace/collection/34902927-2efc5689-99c6-4ab6-8091-996f35c2fd80">
    Postman で実行
  </Button>

  <Button href="https://developer.x.com/apitools/api?endpoint=/2/tweets/sample/stream&method=get">
    API Explorer で試す
  </Button>
</div>

***

## Streaming の基礎

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