メインコンテンツへスキップ
X API は、ポスト、ユーザー、メディアなどを表現する構造化された JSON オブジェクトを返します。このリファレンスでは、各オブジェクトの種類ごとに利用可能なすべてのフィールドを記載しています。

クイックナビゲーション

オブジェクト説明fields パラメータ
Post (Tweet)投稿、返信、リポスト、引用tweet.fields
Userアカウントのプロフィールとメタデータuser.fields
Spaceライブ音声会話space.fields
List厳選されたアカウントのコレクションlist.fields
Media画像、動画、GIFmedia.fields
Poll投票の質問と選択肢poll.fields
Place位置情報および地理データplace.fields
特定のフィールドをリクエストするには fields パラメータ を使用し、関連オブジェクトを含めるには expansions を使用します。

ポスト (ツイート)

ポストは X における中核的なコンテンツ単位です。各ポストオブジェクトには、テキスト、メタデータ、投稿者、メディア、投票などの関連オブジェクトへの参照が含まれます。 デフォルトフィールド: id, text, edit_history_tweet_ids 追加のフィールドを取得するには tweet.fields を、関連オブジェクトを含めるには expansions を使用します。

すべてのポストのフィールド

フィールド値説明利用方法
id (デフォルト) 文字列リクエストしたツイートの一意の識別子。特定のツイートをプログラムから取得するために使用します。
text (デフォルト) 文字列ツイートの実際の UTF-8 テキストです。使用可能な文字の詳細については twitter-text を参照してください。キーワード抽出や感情分析・分類に利用できます。
edit_history_tweet_ids (default)オブジェクトツイートのすべてのバージョンを示す一意の識別子の集合です。編集されていないツイートには ID が 1 つだけ付きます。編集履歴のあるツイートには複数の ID が付きます。この情報を使用して、ツイートの編集履歴を取得します。
articleオブジェクトこのツイートに含まれる Article のメタデータを保持します。Article の本文およびエンティティを取得するために使用します。
attachmentsオブジェクト(存在する場合) このツイートに添付されているメディアの種類を指定します。指定した expansions によって返されるオブジェクトを理解するために利用します。
author_id文字列このツイートを投稿したユーザーの一意の識別子。User オブジェクトをハイドレートしたり、ピアレビュー用データセットを共有したりする際に使用します。
card_uri文字列このツイートに含まれる Card の URI。
community_id文字列このポストが属する Community の一意の識別子。
context_annotations配列ツイートのコンテキスト注釈を保持します。エンティティ認識・抽出やトピック分析に利用できます。
conversation_id文字列会話の起点となるツイート (そのツイートへの直接の返信およびその返信への再返信を含む) のツイート ID。この値を使用して、ツイートから会話全体を再構築します。
created_at日付 (ISO 8601)ツイートが作成された日時。時系列分析や、ツイートがいつ作成されたかを把握するために有用です。
display_text_range配列表示されるテキスト部分の開始インデックスと終了インデックスを含む配列。長い投稿において、デフォルトでどのテキスト部分が表示されるかを把握するのに役立ちます。
edit_controlsオブジェクトツイートがあとどれくらいの時間編集可能か、および残りの編集回数を示します。ツイートが編集可能かどうかを判定するために使用します。
entitiesobjectツイート本文から解析されたエンティティを含みます。詳細は「Twitter Objects」の entities を参照してください。ハッシュタグ、URL、メンションなどに関する追加情報を提供します。
geoobjectジオタグ付きツイートの位置または場所を示します。ジオタグ付きツイートの位置情報を取得するために使用されます。
in_reply_to_user_idstring対象のツイートが返信である場合、このフィールドには元のツイートの投稿者 ID が含まれます。ツイートが別のツイートへの返信かどうかを判定します。
langstringX によって検出された場合の、ツイートの言語です。ツイートを使用言語別に分類します。
non_public_metricsobjectリクエスト時点における、そのツイートに対する非公開のエンゲージメント指標です。ユーザーコンテキストでの認証が必要です。ツイートに対して生成されたインプレッション数の合計を把握します。
note_tweetobject長文ツイート (280文字超) の本文全体を含みます。ツイートの全文を取得します。
organic_metricsobjectリクエスト時点における、そのツイートに対してオーガニックコンテキストで計測されたエンゲージメント指標です。ユーザーコンテキストでの認証が必要です。ツイートのオーガニックエンゲージメントを測定します。
possibly_sensitivebooleanコンテンツがセンシティブと見なされる可能性があるかどうかを示します。特定の種類のコンテンツの流通状況を分析します。
promoted_metricsobjectリクエスト時点における、そのツイートに対してプロモーションコンテキストで計測されたエンゲージメント指標です。ユーザーコンテキストでの認証が必要です。ツイートがプロモーションされた際のエンゲージメントを測定します。
public_metricsobjectリクエスト時点における、そのツイートに対する公開エンゲージメント指標です。ツイートのエンゲージメントを測定します。
referenced_tweetsarrayこのツイートが参照しているツイート (リツイート、引用ツイート、返信など) の一覧です。リツイートなどの会話上の関係性を把握できます。
reply_settingsstring指定されたツイートに誰が返信できるかを示します。指定可能な値は “everyone”、“mentioned_users”、“followers” です。ツイートの会話における返信設定を示します。
withheldobject保留されたコンテンツ に関する詳細情報を含みます。
scopesobjectツイートのスコープ (範囲) に関する詳細を含みます。誰がそのツイートを閲覧できるかを示します。プロモーションツイートに対してのみ返されます。
media_metadata配列ツイートに添付されたメディアに関するメタデータを含みます。ツイートに添付されたメディアの alt_text などの追加メタデータを取得します。
ツイートオブジェクトの取得 サンプルリクエスト 次のリクエストでは、Tweets lookup エンドポイントに対して、ツイートのフィールドを指定してリクエストしています。必ず $BEARER_TOKEN を自分で生成した ベアラートークン に置き換えてください。
curl --request GET 'https://api.x.com/2/tweets?ids=1212092628029698048&tweet.fields=attachments,author_id,context_annotations,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,public_metrics,referenced_tweets,text,withheld&expansions=referenced_tweets.id' --header 'Authorization: Bearer $BEARER_TOKEN'
レスポンス例
{
  "data": [
    {
      "text": "We believe the best future version of our API will come from building it with YOU. Here’s to another great year with everyone who builds on the Twitter platform. We can’t wait to continue working with you in the new year. https://t.co/yvxdK6aOo2",
      "edit_history_tweet_ids": [
        "1212092628029698048"
      ],
      "lang": "en",
      "in_reply_to_user_id": "2244994945",
      "entities": {
        "urls": [
          {
            "start": 222,
            "end": 245,
            "url": "https://t.co/yvxdK6aOo2",
            "expanded_url": "https://x.com/LovesNandos/status/1211797914437259264/photo/1",
            "display_url": "pic.x.com/yvxdK6aOo2",
            "media_key": "16_1211797899316740096"
          }
        ],
        "annotations": [
          {
            "start": 42,
            "end": 44,
            "probability": 0.5359,
            "type": "Other",
            "normalized_text": "API"
          },
          {
            "start": 144,
            "end": 150,
            "probability": 0.9832,
            "type": "Other",
            "normalized_text": "Twitter"
          }
        ]
      },
      "author_id": "2244994945",
      "referenced_tweets": [
        {
          "type": "replied_to",
          "id": "1212092627178287104"
        }
      ],
      "id": "1212092628029698048",
      "public_metrics": {
        "retweet_count": 7,
        "reply_count": 3,
        "like_count": 38,
        "quote_count": 1
      },
      "context_annotations": [
        {
          "domain": {
            "id": "29",
            "name": "Events [Entity Service]",
            "description": "現実世界のイベント。 "
          },
          "entity": {
            "id": "1186637514896920576",
            "name": " New Years Eve"
          }
        },
        {
          "domain": {
            "id": "29",
            "name": "Events [Entity Service]",
            "description": "現実世界のイベント。 "
          },
          "entity": {
            "id": "1206982436287963136",
            "name": "Happy New Year: It’s finally 2020 everywhere!",
            "description": "世界中の人々が新年を迎える際の花火やその他の祝賀イベントをご覧ください。\n写真提供: @GettyImages "
          }
        },
        {
          "domain": {
            "id": "119",
            "name": "Holiday",
            "description": "クリスマスやハロウィンなどの祝祭日"
          },
          "entity": {
            "id": "1186637514896920576",
            "name": " New Years Eve"
          }
        },
        {
          "domain": {
            "id": "119",
            "name": "Holiday",
            "description": "クリスマスやハロウィンなどの祝祭日"
          },
          "entity": {
            "id": "1206982436287963136",
            "name": "Happy New Year: It’s finally 2020 everywhere!",
            "description": "世界中の人々が新年を迎える際の花火やその他の祝賀イベントをご覧ください。\n写真提供: @GettyImages "
          }
        },
        {
          "domain": {
            "id": "30",
            "name": "Entities [Entity Service]",
            "description": "エンティティサービスの最上位ドメイン。エンティティサービス内のすべての項目がこのドメインに含まれます"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "Services"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "131",
            "name": "Unified Twitter Taxonomy",
            "description": "ユーザーの興味関心の分類体系。 "
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "131",
            "name": "Unified Twitter Taxonomy",
            "description": "ユーザーの興味関心の分類体系。 "
          },
          "entity": {
            "id": "847868745150119936",
            "name": "Family & relationships",
            "description": "趣味と関心事"
          }
        },
        {
          "domain": {
            "id": "131",
            "name": "Unified Twitter Taxonomy",
            "description": "ユーザーの興味関心の分類体系。 "
          },
          "entity": {
            "id": "1196446161223028736",
            "name": "Social media"
          }
        },
        {
          "domain": {
            "id": "29",
            "name": "Events [Entity Service]",
            "description": "現実世界のイベント。 "
          },
          "entity": {
            "id": "1206982436287963136",
            "name": "Happy New Year: It’s finally 2020 everywhere!",
            "description": "世界中の人々が新年を迎える際の花火やその他の祝賀イベントをご覧ください。\n写真提供: @GettyImages "
          }
        },
        {
          "domain": {
            "id": "119",
            "name": "Holiday",
            "description": "クリスマスやハロウィンなどの祝祭日"
          },
          "entity": {
            "id": "1206982436287963136",
            "name": "Happy New Year: It’s finally 2020 everywhere!",
            "description": "世界中の人々が新年を迎える際の花火やその他の祝賀イベントをご覧ください。\n写真提供: @GettyImages "
          }
        }
      ],
      "created_at": "2019-12-31T19:26:16.000Z",
      "attachments": {
        "media_keys": [
          "16_1211797899316740096"
        ]
      },
      "possibly_sensitive": false
    }
  ],
  "includes": {
    "tweets": [
      {
        "text": "These launches would not be possible without the feedback you provided along the way, so THANK YOU to everyone who has contributed your time and ideas. Have more feedback? Let us know ⬇️ https://t.co/Vxp4UKnuJ9",
        "edit_history_tweet_ids": [
          "1212092627178287104"
        ],
        "lang": "en",
        "in_reply_to_user_id": "2244994945",
        "entities": {
          "urls": [
            {
              "start": 187,
              "end": 210,
              "url": "https://t.co/Vxp4UKnuJ9",
              "expanded_url": "https://twitterdevfeedback.uservoice.com/forums/921790-twitter-developer-labs",
              "display_url": "twitterdevfeedback.uservoice.com/forums/921790-…",
              "status": 200,
              "title": "フィードバックチャネルの更新情報",
              "description": "私たちは、皆様からの意見やフィードバックを取り入れながら、オープンに開発者プラットフォームを構築しています。過去1年間、皆様やアプリのユーザーから直接お話を伺うことで、皆様が特定してくださったユースケースに対応する開発者向け製品を構築することができました。今後は、この方法を製品開発の標準とし、フィードバックチャネルを統合していきます。皆様のいる場所でお会いするために 本日より、UserVoiceフィードバックチャネルを終了し、より頻繁に直接的なエンゲージメントを行う方向に移行します...",
              "unwound_url": "https://devcommunity.x.com/t/updates-on-our-feedback-channels/169706"
            }
          ]
        },
        "author_id": "2244994945",
        "referenced_tweets": [
          {
            "type": "replied_to",
            "id": "1212092626247110657"
          }
        ],
        "id": "1212092627178287104",
        "public_metrics": {
          "retweet_count": 2,
          "reply_count": 1,
          "like_count": 19,
          "quote_count": 0
        },
        "created_at": "2019-12-31T19:26:16.000Z",
        "possibly_sensitive": false
      }
    ]
  }

User

user オブジェクトには、参照されているユーザーを表す X ユーザーアカウントのメタデータが含まれます。user オブジェクトは、users lookup エンドポイントで返される主要なオブジェクトです。このエンドポイントで追加のユーザーフィールドをリクエストする場合は、user.fields フィールドパラメータを使用します。 user オブジェクトは、子オブジェクトとして Tweet オブジェクト内にも含まれ、expansion によって展開できます。オブジェクトは、デフォルトフィールドのみを含む簡略化されたオブジェクトを取得するために、?expansions=author_id または ?expansions=in_reply_to_user_id で展開可能です。オブジェクトを完全な形にするために追加のフィールドをリクエストする際は、expansions とフィールドパラメータ user.fields を組み合わせて使用してください。  
フィールド名説明使用方法
id (デフォルト)文字列このユーザーの一意の識別子。

"id": "2244994945"
このフィールドを使用すると、特定の X (旧Twitter) ユーザーに関する情報をプログラムから取得できます。
name (デフォルト)文字列ユーザーが自身のプロフィールで設定している名前です。必ずしも実名とは限りません。通常は最大 50 文字ですが、変更される可能性があります。

"name": "Twitter Dev"
username (デフォルト)文字列このユーザーが自身を識別するために使用する Twitter のスクリーンネーム、ハンドル、または別名です。ユーザー名は一意ですが、変更される可能性があります。通常は最大 15 文字ですが、過去のアカウントにはこれより長い名前を持つものも存在する場合があります。

"username": "TwitterDev"
affiliationオブジェクトユーザーの所属に関する詳細情報を含みます。ユーザーのアフィリエイトバッジを取得するために使用できます。
confirmed_email文字列この認証済みユーザーの確認済みメールアドレスです。
connection_status配列認証ユーザーと参照対象のユーザーとの関係 (例: フォロー中、フォローされている、フォローリクエスト送信済み、フォローリクエスト受信済み、ブロック中、ミュート中) のリストを提供します

”connection_status”: [
           “follow_request_received”,
           “follow_request_sent”,
           “blocking”,
           “followed_by”,
           “following”,
           “muting”
]
認証ユーザーと照会対象ユーザーとの接続ステータスを確認するために使用できます。
created_at日付 (ISO 8601)ユーザーアカウントがTwitterで作成された日時 (UTC) 。

"created_at": "2013-12-14T04:35:55.000Z"
そのユーザーがどのくらいの期間 X (旧Twitter) を利用しているかを把握するために使用できます。
description文字列ユーザーが入力している場合、そのユーザーのプロフィールの説明 (bio とも呼ばれます) のテキストです。

"description": "The voice of the X Dev team and your official source for updates, news, and events, related to the X API."
entitiesオブジェクトユーザーのプロフィール説明文内で特別な意味を持つテキストに関する詳細を含みます。

"entities": { <br/>       "url": { <br/>           "urls": [ <br/>               { <br/>                   "start": 0, <br/>                   "end": 23, <br/>                   "url": "https://t.co/3ZX3TNiZCY", <br/>                   "expanded_url": "/content/developer-twitter/en/community", <br/>                   "display_url": "developer.x.com/en/community" <br/>               } <br/>           ] <br/>       }, <br/>       "description": { <br/>           "urls": [ <br/>               { <br/>                   "start": 0, <br/>                   "end": 23, <br/>                   "url": "https://t.co/3ZX3TNiZCY", <br/>                   "expanded_url": "/content/developer-twitter/en/community", <br/>                   "display_url": "developer.x.com/en/community" <br/>               }, <br/>           "hashtags": [ <br/>               { <br/>                   "start": 23, <br/>                   "end": 30, <br/>                   "tag": "DevRel" <br/>               }, <br/>               { <br/>                   "start": 113, <br/>                   "end": 130, <br/>                   "tag": "BlackLivesMatter" <br/>               }, <br/>           "mentions": [ <br/>               { <br/>                   "start": 0, <br/>                   "end": 10, <br/>                   "tag": "TwitterDev" <br/>               }, <br/>           "cashtags": [ <br/>               { <br/>                   "start": 12, <br/>                   "end": 16, <br/>                   "tag": "twtr" <br/>               } <br/>           ] <br/>       } <br/>   }
Entities は、description に含まれる hashtag、URL、user mention、cashtag に関する追加情報を提供する JSON オブジェクトです。詳細については、各 entity のリファレンスを参照してください。

すべての user start インデックスは開始位置を含み、すべての user end インデックスは終了位置を含みません。
is_identity_verifiedブール値ユーザーが本人確認済みかどうかを示します。
location文字列ユーザーが入力している場合、そのユーザーのプロフィールで指定された場所です。これは自由入力の値であるため、必ずしも有効な位置情報を示すとは限りませんが、位置情報クエリを用いた検索時にはあいまいに評価される場合があります。

"location": "127.0.0.1"
most_recent_tweet_id文字列このユーザーの最新のツイートの一意の識別子です。ユーザーの最新のツイートを特定するために使用できます。
parodyブール値このユーザーアカウントにパロディラベルが付与されているかどうかを示します。
pinned_tweet_idstringこのユーザーの固定ツイートの一意の識別子。

"pinned_tweet_id": "1255542774432063488"
ユーザーのプロフィール上部にピン留めされているツイートを特定するために使用できます。ユーザーの使用言語を推定する目的で利用される場合もあります。
profile_banner_urlstringこのユーザーのプロフィールに表示されるプロフィールバナー画像のURL。

"profile_banner_url": "https://pbs.twimg.com/profile_banners/1716450569358098432/1721022977"
このユーザーのプロフィールバナーをダウンロードするために使用できます。
profile_image_urlstringこのユーザーのプロフィールに表示されるプロフィール画像のURL。

"profile_image_url": "https://pbs.twimg.com/profile_images/1267175364003901441/tBZNFAgA_normal.jpg"
このユーザーのプロフィール画像をダウンロードするために使用できます。
protectedbooleanこのユーザーが自分のツイートを非公開にすることを選択しているかどうかを示します (すなわち、このユーザーのツイートが一般に公開されていないかどうかを示します) 。

"protected": false
public_metricsobjectこのユーザーのアクティビティに関する詳細情報を含みます。

"public_metrics": {             "followers_count": 507902,             "following_count": 1863,             "tweet_count": 3561,             "listed_count": 1550         }
X ユーザーのリーチや影響力を推定したり、ユーザーの関心領域の広さや、X 上でのエンゲージメントレベルを定量化するために利用できます。
receives_your_dmbooleanこのユーザーが、認証済みユーザーからの DM を受信できるかどうかを示します。
subscriptionobjectユーザーが認証済みユーザーをサブスクライブしているかどうかに関する詳細を含みます。
subscription_typestring認証済みユーザーが保有している X Premium サブスクリプションの種類を表す文字列です。例: NoneBasicPremiumPremiumPlus。対象ユーザーが認証済みユーザー本人でない場合は、常に None が返されます。
urlstringユーザーのプロフィールに指定されている URL (存在する場合) 。

"url": "https://t.co/3ZX3TNiZCY"
X ユーザーがプロフィール内で指定した URL です。ホームページである場合もありますが、必ずしもそうとは限りません。
verifiedbooleanこのユーザーが Twitter の認証済みユーザーかどうかを示します。

"verified": true
この X ユーザーが認証済みアカウントかどうかを示します。認証済みアカウントであることで、公的関心のあるアカウントが真正であることを他のユーザーに示すことができます。
verified_followers_countstringユーザーの認証済みフォロワー数を表す文字列です。
verified_typestringユーザーが持つ認証の種別を表す文字列です。例: “blue”、“business”、“government”
withheldobject該当する場合、withheld content の差し止めに関する詳細を含みます。
ユーザーオブジェクトの取得 リクエスト例 次のリクエストでは、users lookup エンドポイントを使用してユーザーオブジェクトのフィールドをリクエストします。$BEARER_TOKEN は、ご自身で生成した ベアラートークン に必ず置き換えてください。
  curl --request GET 'https://api.x.com/2/users?
  ids=2244994945&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld&expansions=pinned_tweet_id'
  --header 'Authorization: Bearer $BEARER_TOKEN'
  }
レスポンス例
    "data": [
        {
            "id": "2244994945",
            "name": "Twitter Dev",
            "username": "TwitterDev",
            "location": "127.0.0.1",
            "entities": {
                "url": {
                    "urls": [
                        {
                            "start": 0,
                            "end": 23,
                            "url": "https://t.co/3ZX3TNiZCY",
                            "expanded_url": "/content/developer-twitter/en/community",
                            "display_url": "developer.x.com/en/community"
                        }
                    ]
                },
                "description": {
                    "hashtags": [
                        {
                            "start": 23,
                            "end": 30,
                            "tag": "DevRel"
                        },
                        {
                            "start": 113,
                            "end": 130,
                            "tag": "BlackLivesMatter"
                        }
                    ]
                }
            },
            "verified": true,
            "description": "The voice of Twitter's #DevRel team, and your official source for updates, news, & events about Twitter's API. \n\n#BlackLivesMatter",
            "url": "https://t.co/3ZX3TNiZCY",
            "profile_image_url": "https://pbs.twimg.com/profile_images/1267175364003901441/tBZNFAgA_normal.jpg",
            "protected": false,
            "pinned_tweet_id": "1255542774432063488",
            "created_at": "2013-12-14T04:35:55.000Z"
        }
    ],
    "includes": {
        "tweets": [
            {
                "id": "1255542774432063488",
                "text": "この前例のない時代において、Twitterで起こっていることは、世界がパンデミックをよりよく理解し、対応するのに役立ちます。\n\n資格のある開発者と研究者がリアルタイムで公開会話を研究できるよう、無料のCOVID-19ストリームエンドポイントを開始します。https://t.co/BPqMcQzhId"
            }
        ]
    }
}

Space

Space では、ライブ音声会話を通じて表現や交流を行うことができます。Space データディクショナリには Space に関する関連メタデータが含まれており、その詳細はすべてリアルタイムで更新されます。 User オブジェクトは user リソースで取得・展開できます。これらのオブジェクトは、host_idscreator_idspeaker_idsmentioned_user_ids のいずれか少なくとも 1 つを expansions クエリパラメータに追加することで、expansion の対象として指定できます。 ツイートとは異なり、Space は一時的なものであり、終了後、または作成者によってキャンセルされた場合は利用できなくなります。アプリケーションが Space データを扱う際には、常に最新の情報を返し、プラットフォーム上で利用できなくなったデータを削除する責任があります。Spaces lookup endpoints を利用すると、ユーザーの期待や意図を尊重できているかを確認するのに役立ちます。
Field ValueTypeDescriptionHow it can be used
id (default)stringリクエストされた Space の一意の識別子。
"id": "1zqKVXPQhvZJB"
レスポンスで返される Space を一意に識別します。
state (default)stringSpace が開始済みか、開始予定か、終了済みかを示します。
"state": "live"
ライブ中または予約済みの Space をフィルターします。
created_atdate (ISO 8601)この Space の作成時刻。
"created_at": "2021-07-04T23:12:08.000Z"
Space がいつ作成されたかを把握し、時刻でソートします。
creator_idstringSpace の作成者の一意の識別子。
"creator_id": "2244994945"
ended_atdate (ISO 8601)該当する場合、この Space が終了した時刻。
"ended_at": "2021-07-04T00:11:44.000Z"
ライブ Space がいつ終了したかを把握し、実行時間を算出します。
host_idsarraySpace ホストの一意の識別子。
"host_ids": ["2244994945", "6253282"]
User オブジェクトを展開し、エンゲージメントを把握します。
langstring検出された場合、Space の言語。
"lang": "en"
言語別に Space を分類します。
is_ticketedbooleanこの Space がチケット制かどうかを示します。
"is_ticketed": false
関心度の高いコンテンツとして強調表示します。
invited_user_idsarrayスピーカーとして招待されたユーザー ID のリスト。
"invited_user_ids": ["2244994945", "6253282"]
User オブジェクトを展開し、エンゲージメントを把握します。
participant_countintegerホストおよびスピーカーを含む、Space 内のユーザー数。
"participant_count": 420
エンゲージメントを把握し、レポートを作成します。
subscriber_countintegerSpace にリマインダーを設定したユーザー数。
"subscriber_count": 36
イベントへの関心度を把握します。
scheduled_startdate (ISO 8601)Space の予定開始時刻。
"scheduled_start": "2021-07-14T08:00:00.000Z"
カレンダー通知と連携します。
speaker_idsarrayいずれかの時点で話したユーザーのリスト。
"speaker_ids": ["2244994945", "6253282"]
User オブジェクトを展開し、エンゲージメントを把握します。
started_atdate (ISO 8601)Space の実際の開始時刻。
"started_at": "2021-07-14T08:00:12.000Z"
Space の開始時刻を把握します。
titlestringSpace のタイトル。
"title": "Say hello to the Space data object!"
キーワード、ハッシュタグ、メンションを把握します。
topic_idsarraySpace 作成者が選択したトピックの ID。
"topic_ids": ["2244994945", "6253282"]
キーワード、ハッシュタグ、メンションを把握します。
updated_atdate (ISO 8601)Space メタデータの最終更新時刻。
"updated_at": "2021-07-11T14:44:44.000Z"
情報を最新の状態に保ちます。
Retrieving a Space Object Sample Request 次のリクエストでは、Spaces lookup endpoint で Space のフィールドをリクエストしています。必ず $BEARER_TOKEN を、ご自身で生成したベアラートークンに置き換えてください。
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?space.fields=created_at,creator_id,created_athost_ids,lang,is_ticketed,invited_user_ids,participant_count,scheduled_start,speaker_ids,started_at,state,title,updated_at&expansions=creator_id,host_ids,invited_user_ids,speaker_ids" --header "Authorization: Bearer $BEARER_TOKEN"
** レスポンス例 **
{
  "data": {
    "id": "1zqKVXPQhvZJB",
    "state": "live",
    "created_at": "2021-07-04T23:12:08.000Z",
    "host_ids": [
      "2244994945",
      "6253282"
    ],
    "lang": "en",
    "is_ticketed": false,
    "invited_user_ids": [
      "2244994945",
      "6253282"
    ],
    "participant_count": 420,
    "scheduled_start": "2021-07-14T08:00:00.000Z",
    "speaker_ids": [
      "2244994945",
      "6253282"
    ],
    "started_at": "2021-07-14T08:00:12.000Z",
    "title": "Say hello to the Space data object!",
    "updated_at": "2021-07-11T14:44:44.000Z"
  },
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "name": "Twitter Dev",
        "username": "TwitterDev"
      },
      {
        "id": "6253282",
        "name": "Twitter API",
        "username": "TwitterAPI"
      }
    ]
  }
}

リスト

リストオブジェクトには、参照されているリストを説明する Twitter Lists のメタデータが含まれます。List オブジェクトは、List ルックアップエンドポイントで返される主オブジェクトです。このエンドポイントで追加の List フィールドを要求する場合は、list.fields パラメータグループを使用します。 List オブジェクトが他のデータオブジェクトの子要素として返されることはありません。ただし、User オブジェクトは user リソースで取得および展開できます。これらのオブジェクトは、expansions クエリパラメータに owner_id を追加することで展開して取得できます。主要な List オブジェクトを補完するために追加フィールドを要求する際は、この展開と list.fields フィールドパラメータを組み合わせて使用し、展開オブジェクトを補完するには user.fields を使用します。
Field ValueTypeDescriptionHow it can be used
id (default)stringこのリストの一意の識別子。
"id": "2244994945"
特定のリストに関する情報をプログラムから取得するために使用します。
name (default)stringリスト作成時に指定されたリストの名前。
"name": "Twitter Lists"
created_atdate (ISO 8601)リストが作成された UTC 日時。
"created_at": "2013-12-14T04:35:55.000Z"
リストが X 上にいつ作成されたか、どのくらい前から存在しているかを判断できます。
descriptionstringリストの内容についてユーザーに伝えるための簡潔な説明。
"description": "People that are active members of the Bay area cycling community on Twitter."
follower_countintegerこのリストをフォローしているユーザー数。
"follower_count": 198
member_countintegerこのリストに含まれているメンバー数。
"member_count": 60
privatebooleanリストが非公開かどうかを示します。
"private": false
owner_idstringこのリストのオーナーの一意の識別子。
"owner_id": "1255542774432063488"
このユーザーが他に所有しているリストの特定や、User オブジェクトの展開に使用できます。
User オブジェクトの取得 サンプルリクエスト 次のリクエストでは、List lookup by ID エンドポイントでユーザーに関するフィールドを要求しています。$BEARER_TOKEN は、生成済みの ベアラートークン に置き換えてください。
curl --request GET 'https://api.x.com/2/lists/1355797419175383040?list.fields=created_at,description,private,follower_count,member_count,owner_id&expansions=owner_id' --header 'Authorization: Bearer $BEARER_TOKEN'
** レスポンス例**
{
  "data": {
    "name": "Twitter Comms",
    "member_count": 60,
    "id": "1355797419175383040",
    "private": false,
    "description": "",
    "follower_count": 198,
    "owner_id": "257366942",
    "created_at": "2021-01-31T08:37:48.000Z"
  },
  "includes": {
    "users": [
      {
        "created_at": "2011-02-25T07:51:26.000Z",
        "name": "Ashleigh Hay 🤸🏼‍♀️",
        "id": "257366942",
        "username": "shleighhay",
        "verified": false
      }
    ]
  }
}

メディア

メディアとは、ツイートに添付された画像、GIF、または動画を指します。media オブジェクトはどのエンドポイントでも主オブジェクトではありませんが、ツイートオブジェクト内に含まれており、参照・展開できます。オブジェクトは ?expansions=attachments.media_keys を指定することで展開可能で、デフォルトフィールドのみを含む簡略化されたオブジェクトを取得できます。オブジェクトを補完するために追加フィールドをリクエストする場合は、media.fields フィールドパラメータと組み合わせてこの expansions を使用します。
フィールド値説明利用方法
media_key (default)string展開されたメディアコンテンツの一意の識別子。
"media_key": "13_1263145212760805376"
メディアをプログラムから取得するために使用できます
type (default)stringコンテンツの種類 (animated_gif, photo, video)。
"type": "video"
メディアが写真、GIF、動画のどれであるかを分類します
urlstringTwitter 上のメディアファイルへの直接 URL。写真の場合に URL フィールドを含む media オブジェクトが返されます
duration_msintegertype が video の場合に利用可能。動画の長さ (ミリ秒) 。
"duration_ms": 46947
heightintegerこのコンテンツの高さ (ピクセル) 。
"height": 1080
non_public_metricsobjectリクエスト時点における、メディアコンテンツの非公開エンゲージメント指標。ユーザーコンテキスト認証が必要です。
"non_public_metrics": { "playback_0_count": 1561, "playback_100_count": 116, "playback_25_count": 559, "playback_50_count": 305, "playback_75_count": 183,}
動画エンゲージメントを把握します。ユーザーが動画の各 4 分の 1 区間までどれだけ再生したかを確認できます。
organic_metricsobjectリクエスト時点における、オーガニックコンテキストで計測されたメディアコンテンツのエンゲージメント指標。ユーザーコンテキスト認証が必要です。
"organic_metrics": { "playback_0_count": 1561, "playback_100_count": 116, "playback_25_count": 559, "playback_50_count": 305, "playback_75_count": 183, "view_count": 629}
オーガニックなメディアエンゲージメントを把握します。
preview_image_urlstringこのコンテンツの静的なプレースホルダープレビューへの URL。
"preview_image_url": "https://pbs.twimg.com/media/EYeX7akWsAIP1_1.jpg"
promoted_metricsobjectリクエスト時点における、プロモーションコンテキストで計測されたメディアコンテンツのエンゲージメント指標。ユーザーコンテキスト認証が必要です。
"promoted_metrics": { "playback_0_count": 259, "playback_100_count": 15, "playback_25_count": 113, "playback_50_count": 57, "playback_75_count": 25, "view_count": 124}
ツイートがプロモーションされた際のメディアエンゲージメントを把握します。
public_metricsobjectリクエスト時点における、メディアコンテンツの公開エンゲージメント指標。
"public_metrics": { "view_count": 6865141}
ツイートに添付された動画の総再生回数を把握します。
widthintegerこのコンテンツの幅 (ピクセル) 。
"width": 1920
alt_textstringアクセシビリティを有効化・支援するための画像の説明。最大 1000 文字まで設定できます。現時点では Alt テキストは画像にのみ追加できます。
"alt_text": "Rugged hills along the Na Pali coast on the island of Kauai"
視覚障害のあるユーザーなどに備えて、画像の内容を文章で説明するために使用できます。
variantsarray各 media オブジェクトは、解像度やフォーマットの異なる複数の表示・再生バリアントを持つ場合があります。
"variants": [{ "bit_rate": 632000, "content_type": "video/mp4", "url": "https://video.twimg.com/ext_tw_video/1527322141724532740/pu/vid/320x568/lnBaR2hCqE-R_90a.mp4?tag=12"}]
メディアオブジェクトの取得 サンプルリクエスト 次のリクエストでは、Tweet lookup エンドポイントで、Tweet に添付されている media オブジェクトのフィールドを取得しています。media は Tweet の子オブジェクトであるため、attachment.media_keys の展開を指定する必要があります。$BEARER_TOKEN は、必ずご自身で生成した ベアラートークン に置き換えてください。
curl --request GET 'https://api.x.com/2/tweets?ids=1263145271946551300&expansions=attachments.media_keys&media.fields=duration_ms,height,media_key,preview_image_url,public_metrics,type,url,width,alt_text' --header 'Authorization: Bearer $BEARER_TOKEN'
{
  "data": [
    {
      "text": "テスト中、テスト中...\n\nまさにあなたが望む相手と会話する新しい方法です。世界的に少数から始めていますので、実際の動作を見るために👀を光らせておいてください。https://t.co/pV53mvjAVT",
      "id": "1263145271946551300",
      "attachments": {
        "media_keys": [
          "13_1263145212760805376"
        ]
      }
    }
  ],
  "includes": {
    "media": [
      {
        "duration_ms": 46947,
        "type": "video",
        "height": 1080,
        "media_key": "13_1263145212760805376",
        "public_metrics": {
          "view_count": 6909260
        },
        "preview_image_url": "https://pbs.twimg.com/media/EYeX7akWsAIP1_1.jpg",
        "width": 1920
      }
    ]
  }
}

Poll

ツイートに含まれる投票 (Poll) は、いずれのエンドポイントでもプライマリオブジェクトではありませんが、ツイートオブジェクト内で取得および展開することができます。このオブジェクトは、?expansions=attachments.poll_ids を指定することで、デフォルトフィールドのみを含む簡略化されたオブジェクトとして展開可能です。オブジェクトを完全な形で取得するために追加のフィールドをリクエストする場合は、expansions とフィールドパラメータ poll.fields を組み合わせて使用してください。
フィールド値Type説明
id (default)string展開された投票オブジェクトの一意の識別子。
{"id": "1199786642791452673"}
options (default)array参照される投票の各選択肢を表すオブジェクトを含みます。
{"options": [ { "position": 1, "label": "“C Sharp”", "votes": 795 }, { "position": 2, "label": "“C Hashtag”", "votes": 156 } ]}
duration_minutesintegerこの投票の合計期間を指定します。
{"duration_minutes": 1440}
end_datetimedate (ISO 8601)この投票の終了日時を指定します。
{"end_datetime": "2019-11-28T20:26:41.000Z"}
voting_statusstringこの投票がまだ有効で投票受付中か、すでに投票が締め切られているかを示します。
{"voting_status": "closed"}
投票オブジェクトの取得 サンプルリクエスト 次のリクエストでは、Tweets lookup エンドポイントでツイートに添付された投票オブジェクトのフィールドをリクエストしています。poll はツイートの子オブジェクトであるため、attachments.poll_id の expansion が必須です。$BEARER_TOKEN はご自身で生成した Bearer Token に必ず置き換えてください。
curl --request GET 'https://api.x.com/2/tweets?ids=1199786642791452673&expansions=attachments.poll_ids&poll.fields=duration_minutes,end_datetime,id,options,voting_status' --header 'Authorization: Bearer $BEARER_TOKEN'
レスポンス例
{
  "data": [
    {
      "text": "C#",
      "id": "1199786642791452673",
      "attachments": {
        "poll_ids": [
          "1199786642468413448"
        ]
      }
    }
  ],
  "includes": {
    "polls": [
      {
        "id": "1199786642468413448",
        "voting_status": "closed",
        "duration_minutes": 1440,
        "options": [
          {
            "position": 1,
            "label": "“C Sharp”",
            "votes": 795
          },
          {
            "position": 2,
            "label": "“C Hashtag”",
            "votes": 156
          }
        ],
        "end_datetime": "2019-11-28T20:26:41.000Z"
      }
    ]
  }
}

Place

ツイートにタグ付けされた場所は、どのエンドポイントにおいてもプライマリオブジェクトではありませんが、ツイートリソース内で取得および展開できます。オブジェクトは ?expansions=geo.place_id を使用して、デフォルトフィールドのみを含む省略版のオブジェクトとして展開可能です。オブジェクトを補完する追加フィールドをリクエストする場合は、フィールド用パラメータ place.fields を expansions と併用してください。
Field valueTypeDescriptionHow it can be used
full_name (default)stringより詳細な形式の場所名。ツイートを特定の場所名で分類する
"full_name": "Manhattan, NY"
id (default)stringツイートに関心地点としてタグ付けされている場合の、その展開された場所の一意の識別子。プログラムで場所を取得するために使用
"id": "01a9a39529b27f36"
contained_withinarray参照されている場所を内包する既知の場所の識別子を返します。
countrystringこの場所が属する国の正式名称。ツイートを国名で分類する
"country": "United States"
country_codestringこの場所が属する国の ISO Alpha-2 国コード。ツイートを国コードで分類する
"country_code": "US"
geoobjectGeoJSON 形式の場所の詳細を含みます。
`json
”geo”:
“type”: “Feature”,
“bbox”: [
-74.026675,
40.683935,
-73.910408,
40.877483
],
“properties”:
}
`
namestringこの場所の短い名前。ツイートを特定の場所名で分類する
"name": "Manhattan"
place_typestringこの場所情報が表す情報の特定の種類 (都市名やポイント・オブ・インタレストなど) を指定します。ツイートを特定の種類の場所で分類する
"place_type": "city"
place オブジェクトの取得 サンプルリクエスト 次のリクエストでは、Tweets lookup エンドポイント上のツイートに付随する place オブジェクトのフィールドをリクエストしています。place はツイートの子オブジェクトであるため、geo.place_id の expansion パラメータが必須です。必ず $BEARER_TOKEN を、自身で生成した ベアラートークン に置き換えてください。
curl --request GET 'https://api.x.com/2/tweets?ids=1136048014974423040&expansions=geo.place_id&place.fields=contained_within,country,country_code,full_name,geo,id,name,place_type' --header 'Authorization: Bearer $BEARER_TOKEN'
レスポンス例
{
  "data": [
    {
      "text": "新しいTwitter Developer Labsプログラムのライブデモを共有しています。DevRelチームのメンバー@jessicagarsonが主導します #TapIntoTwitter https://t.co/ghv7f4dW5M",
      "id": "1136048014974423040",
      "geo": {
        "place_id": "01a9a39529b27f36"
      }
    }
  ],
  "includes": {
    "places": [
      {
        "geo": {
          "type": "Feature",
          "bbox": [
            -74.026675,
            40.683935,
            -73.910408,
            40.877483
          ],
          "properties": {}
        },
        "country_code": "US",
        "name": "Manhattan",
        "id": "01a9a39529b27f36",
        "place_type": "city",
        "country": "United States",
        "full_name": "Manhattan, NY"
      }
    ]
  }
}

ダイレクトメッセージイベント

ダイレクトメッセージ (DM) の会話は、イベントの集合で構成されています。X API v2 は現在、MessageCreate、ParticipantsJoin、ParticipantsLeave の 3 種類のイベントタイプをサポートしています。 DM イベントオブジェクトは Direct Message lookup エンドポイントから返され、Manage Direct Messages エンドポイントでダイレクトメッセージが正常に作成されると、MessageCreate イベントが生成されます。 DM イベントをリクエストする際には、デフォルトで 3 つのイベントオブジェクト属性、つまりフィールドが含まれます: id、event_type、text です。追加のイベントフィールドを取得するには、fields パラメータ dm_event.fields を使用して、他のフィールドを指定します。利用可能なその他のイベントフィールドには、次のものが含まれます: dm_conversation_id、created_at、sender_id、attachments、participant_ids、referenced_tweets。 これらのフィールドのいくつかは、ダイレクトメッセージイベントに関連する他の X オブジェクトの ID を提供します:
  • sender_id - メッセージを送信した、あるいはグループ会話に参加者を招待したアカウントの ID
  • partricipants_ids - アカウント ID の配列。ParticipantsJoin および ParticipantsLeave イベントでは、この配列にはイベントを作成したアカウントの ID が 1 件だけ含まれます
  • attachments - 送信者によって X にアップロードされたコンテンツのメディア ID を提供します
  • referenced_tweets - text フィールド内でツイート URL が検出された場合、そのツイートの ID がレスポンスに含まれます
sender_id、participant_ids、referenced_tweets.id、attachments.media_keys の expansions を使用して、これらの X オブジェクト ID を展開することができます。
Field valueTypeDescriptionHow it can be used
id (default)stringイベントの一意の識別子。

“id”: “1050118621198921728”
v1.1 エンドポイントで利用可能な、特定の会話イベントをプログラムで取得するために使用します。
event_type (default)stringイベントの種類を表します。現在、次の 3 種類がサポートされています: 

* MessageCreate

* ParticipantsJoin

* ParticipantsLeave


“event_type”: “MessageCreate”
会話の履歴を取得する際にメッセージが作成されたタイミングや、グループ会話の場合は参加者が参加・退出したタイミングを把握するために使用します。すべての GET メソッドは、event_type= クエリパラメータを使用して特定のイベント種別でフィルタリングすることをサポートしています。
text (default)stringダイレクトメッセージの実際の UTF-8 テキスト。 

“text”: “Hello, just you!”
チャットボットでは、メッセージ内容を解析し自動応答を決定するために使用できます。会話検索機能の構築にも利用できます。
entitiesobjectダイレクトメッセージのテキストから抽出された entities。ハッシュタグ、URL、メンションなどに関する追加情報を提供します。
sender_idstringイベントを作成したユーザーの ID。レスポンス内でこのオブジェクトを展開するには、expansion として sender_id を含め、関心のある User オブジェクト属性を指定するために user.fields クエリパラメータを使用します。

“sender_id”: “906948460078698496”
MessageCreate または ParticipantsJoin イベントを作成したユーザーの User オブジェクトを取得するために使用します。
participant_idsarray (of strings)グループ会話に参加・退出する参加者の ID。新しいグループ会話を作成する際にも使用されます。レスポンス内でこのオブジェクトを展開するには、expansion として participant_ids を含め、関心のある User オブジェクト属性を指定するために user.fields クエリパラメータを使用します。

“participant_ids”: [

     “906948460078698496”

]
グループ会話に参加・退出する参加者の User オブジェクトを取得するために使用します。
dm_conversation_idstringイベントが属している会話の一意の識別子。

“dm_conversation_id”: “1584988213961031680”
会話からイベントをプログラムで取得し、その会話にダイレクトメッセージを追加するために使用します。
created_atdate (ISO 8601)このイベントの作成時刻 (UTC)。

“created_at”: “2019-06-04T23:12:08.000Z”
ダイレクトメッセージが作成されたタイミング、または会話参加者が参加・退出したタイミングを把握するために使用できます。
referenced_tweetsarrayダイレクトメッセージのテキスト内で言及されているツイートの ID。レスポンス内でこのオブジェクトを展開するには、expansion として referenced_tweets.id を含め、関心のある Tweet オブジェクト属性を指定するために tweet.fields クエリパラメータを使用します。

“referenced_tweets”: [

   

“id”: “1578868150510456833”

   

]
ダイレクトメッセージがツイートを参照している場合、これらの ID を使用してそのツイートの詳細を取得できます。
attachmentsobjectメディアが添付されたダイレクトメッセージについて、アップロードされたコンテンツ (写真、動画、GIF) の media key を提供します。レスポンス内でこのオブジェクトを展開するには、expansion として attachments.media_keys を含め、関心のあるメディアオブジェクト属性を指定するために media.fields クエリパラメータを使用します。現在、添付できるメディアオブジェクトは 1 つのみがサポートされています。 

“attachments”:

    “media_keys”: [

        “3_1136048009270239232”

    ]

ダイレクトメッセージに添付されているメディアオブジェクトを把握するために使用します。
ダイレクトメッセージイベントオブジェクトの取得 サンプルリクエスト この例では、1 対 1 の会話に関連付けられたイベントを取得するリクエストを作成します。このリクエストは、基本的なダイレクトメッセージイベントのフィールドに加え、参照されているツイートおよびその作成者に関する追加フィールドを返します。次の内容を要求するクエリを構築してみましょう。
  • 作成されたタイミングや、どの会話 (dm_conversation) に属しているかといった、基本的なイベント属性。
  • ダイレクトメッセージを送信したアカウントの ID と説明。
  • 参照されているツイートのテキストと、その投稿日時。
  • 参照されているツイート作成者のアカウント ID と説明。
これらの属性を返すには、リクエストクエリに次の内容を含めます。 ?dm_event.fields=id,sender_id,text,created_at,dm_conversation_id&expansions=sender_id,referenced_tweets.id&tweet.fields=created_at,text,author_id&user.fields=description
      curl --request GET 'https://api.x.com/2/dm_conversations/with/:participant_id/dm_events?tweet.fields=created_at,text,author_id&user.fields=description&expansions=sender_id,participant_ids,referenced_tweets.id&dm_event.fields=id,sender_id,text,participant_ids,created_at,'
    --header 'Authorization: Bearer $BEARER_TOKEN'
必ず $BEARER_TOKEN を自分で生成したベアラートークンに置き換えてください。 レスポンス例
      {
	"data": [{
			"id": "1585047616894574596",
			"sender_id": "944480690",
			"text": "Hello, just you!",
			"created_at": "2022-10-25T23:16:15.000Z",
			"event_type": "MessageCreate",
			"dm_conversation_id": "944480690-906948460078698496"
		},
		{
			"id": "1581048670673260549",
			"sender_id": "944480690",
			"text": "Simple Tweet link: https://t.co/IYFbRIdXHg",
			"referenced_tweets": [{
				"id": "1578900353814519810"
			}],
			"created_at": "2022-10-14T22:25:52.000Z",
			"event_type": "MessageCreate",
			"dm_conversation_id": "944480690-906948460078698496"
		},
		{
			"id": "1580705121553420292",
			"sender_id": "944480690",
			"text": "Adding a new 1-to-1 Direct Message.",
			"created_at": "2022-10-13T23:40:43.000Z",
			"event_type": "MessageCreate",
			"dm_conversation_id": "944480690-906948460078698496"
		}
	],
	"includes": {
		"users": [{
				"name": "API Demos",
				"description": "Hosting TwitterDev integrations... @TwitterDev #DevRel",
				"id": "944480690",
				"username": "FloodSocial"
			},
			{
				"name": "the SnowBot",
				"description": "Home of the @TwitterDev SnowBot... Serving snow reports, snow photos, and snow research links... Chatbot is currently being remodeled for Twitter APIv2.",
				"id": "906948460078698496",
				"username": "SnowBotDev"
			}
		],
		"tweets": [{
				"text": "コロラド水年の新年の挨拶をみんなにしなかったことを少し悪く思っています…\n\nコロラドの友人や同僚の皆さん、新旧問わず、水年おめでとうございます… \n\nこれが豊かな水年になりますように、ただしあまり豊かすぎないように…",
				"id": "1578900353814519810",
				"created_at": "2022-10-09T00:09:13.000Z",
				"author_id": "944480690",
				"edit_history_tweet_ids": [
					"1578900353814519810"
				]
			}
		]
	},
	"meta": {
		"result_count": 3,
		"next_token": "18LAA581J5II7LA00C00ZZZZ",
		"previous_token": "1BLC45G1H8CAL5DG0G00ZZZZ"
	}
}

コミュニティ

コミュニティは、X ユーザーがつながり、共有し、自分が最も関心のある議論により近づくための専用スペースです。 コミュニティ内の投稿は X 上の誰でも閲覧できますが、実際にやり取りしたり議論に参加できるのは、そのコミュニティ内の他のメンバーのみです。 Community オブジェクトには、コミュニティに関する関連メタデータが含まれます。
Field valueTypeDescription
created_atdate (ISO 8601)コミュニティが作成された時刻。
idstringコミュニティの一意の識別子。
namestringコミュニティの名前。
descriptionstringコミュニティの説明文。指定されている場合のみ含まれます。
accessstringコミュニティのアクセスレベル。

次のいずれかです:
- Public
- Closed
join_policystringコミュニティへの参加ポリシー。

次のいずれかです:
- Open
- RestrictedJoinRequestsDisabled
- RestrictedJoinRequestsRequireAdminApproval
- RestrictedJoinRequestsRequireModeratorApproval
- SuperFollowRequired
member_countintegerコミュニティに参加しているメンバーの数。
Community オブジェクトの取得 サンプルリクエスト 次のリクエストでは、指定したキーワードに基づいてコミュニティのリストを検索しつつ、特定のフィールドをリクエストしています。必ず、$BEARER_TOKEN を自分で生成した ベアラートークン に置き換えてください。
curl --location 'https://api.x.com/2/communities/search?query=anime&amp;community.fields=access,created_at,description,id,join_policy,member_count,name' --header 'Authorization: $BEARER_TOKEN'
レスポンス例
{
  "data": [
    {
      "id": "Q29tbXVuaXR5OjE3NTg3NDc4MTc2NDI3MDA5MjI=",
      "description": "Welcome to the Anime Community! Where anime fans gather to share their favorite shows and discuss everything anime-related.",
      "join_policy": "Open",
      "access": "Public",
      "member_count": 39915,
      "name": "Anime Community",
      "created_at": "2024-02-17T06:58:50.000Z"
    },
    {
      "id": "Q29tbXVuaXR5OjE1MDY3OTM5NTMxMDYwNDI4OTE=",
      "description": "Join and text about anime 🥰",
      "join_policy": "Open",
      "access": "Public",
      "member_count": 26019,
      "name": "Anime World 🌸",
      "created_at": "2022-03-24T00:44:07.000Z"
    },
    {
      "id": "Q29tbXVuaXR5OjE0OTY3NzYyMTU5Mzk1MzQ4NDk=",
      "description": "For all anime lovers and creators!",
      "join_policy": "Open",
      "access": "Public",
      "member_count": 5612,
      "name": "Anime",
      "created_at": "2022-02-24T09:17:13.000Z"
    }
  ],
  "meta": {
    "next_token": "7140dibdnow9c7btw481s8m561gat797rboud5r80xvzm"
  }
}

フィールドとexpansionsの使い方

デフォルトでは、fieldsexpansions パラメータ、fields を使用せずにリクエストを行うと、X API v2 のデータオブジェクトにはごく少数のデフォルトフィールドのみが含まれます。このガイドでは、レスポンスで追加のオブジェクトやフィールドを受け取れるように、リクエストで fieldsexpansions のクエリパラメータを使用する方法を説明します。 このガイドでは、次のツイートのスクリーンショットに含まれる複数のフィールドをリクエストしていきます。   この画像には、@X が投稿したツイートのスクリーンショットが含まれています。ツイート本文、ユーザー名、投稿日と時刻、ソース、および公開メトリクスが表示されています。動画も含まれています。 スクリーンショットでわかるように、このツイートにはツイートの投稿者、ツイートのメトリクス、作成タイムスタンプ、動画、動画の再生回数など、いくつかの情報が表示されています。また、スクリーンショットには表示されていませんが、リクエスト可能なデータもいくつか存在します。  API へのリクエストを行うと、デフォルトのレスポンスはシンプルで、デフォルトのツイートフィールド (idtext) のみが含まれます。また、利用しているエンドポイントが返すプライマリオブジェクトのみが取得され、そのプライマリオブジェクトに関連する付随データオブジェクトは含まれません。 このシンプルさと fields および expansions パラメータを組み合わせることで、利用目的に応じて必要なフィールドだけをリクエストできるようになります。   

追加のフィールドとオブジェクトのリクエスト

まず、ツイートIDとGET /tweetsエンドポイントを使用して、ツイートオブジェクトをリクエストします。 リクエスト:
curl --request GET --url 'https://api.x.com/2/tweets?ids=1260294888811347969' \
  --header 'Authorization: Bearer $BEARER_TOKEN'
レスポンス:
{
    "data": [
        {
            "id": "1260294888811347969",
            "text": "あなたのツイートに関するツイートを見逃さないで。\n\niOSで、コメント付きリツイートがまとめて見られるようになりました。https://t.co/oanjZfzC6y"
        }
    ]
}
以下のステップバイステップガイドでは、スクリーンショットに表示されている追加データの取得方法を説明します。
  1. オブジェクトモデルを参照するか、各エンドポイントのAPIリファレンスページに記載されたフィールド一覧を確認し、追加でリクエストしたいフィールドを特定します。 この場合、次の追加フィールドを指定します: attachments、author_id、created_at、public_metrics。
  2. 上記のフィールドを値として使用し、カンマ区切りのリストで tweet.fields クエリパラメータを指定します: ?tweet.fields=attachments,author_id,created_at,public_metrics
  3. 先ほど行った GET /tweets リクエストにクエリパラメータを追加します。
リクエスト: curl --request GET --url 'https://api.x.com/2/tweets?ids=1260294888811347969&tweet.fields=attachments,author_id,created_at,public_metrics' \ --header 'Authorization: Bearer $BEARER_TOKEN' レスポンス:
{
    "data": [
        {
            "id": "1260294888811347969",
            "text": "あなたのツイートに関するツイートを見逃さないで。\n\niOSで、コメント付きリツイートを1か所で確認できるようになりました。https://t.co/oanjZfzC6y",
            "author_id": "783214",
            "public_metrics": {
                "retweet_count": 5219,
                "reply_count": 1828,
                "like_count": 17141,
                "quote_count": 3255
            },
            "attachments": {
                "media_keys": [
                    "13_1260294804770041858"
                ]
            },
            "created_at": "2020-05-12T19:44:51.000Z"
        }
    ]
}
  1. 次に、ツイートに含まれている動画に関連するフィールドをリクエストします。これには、expansions パラメータの値として attachments.media_keys を指定し、リクエストに追加します。
?expansions=attachments.media_keys リクエスト:
curl --request GET --url 'https://api.x.com/2/tweets?ids=1260294888811347969&tweet.fields=attachments,author_id,created_at,public_metrics&expansions=attachments.media_keys' \
  --header 'Authorization: Bearer $BEARER_TOKEN'
レスポンス。メディアオブジェクトは includes オブジェクトで表されます:
{
    "data": [
        {
            "id": "1260294888811347969",
            "text": "あなたのツイートに関するツイートを見逃さないように。\n\niOSでは、コメント付きリツイートを1か所で確認できるようになりました。https://t.co/oanjZfzC6y",
            "public_metrics": {
                "retweet_count": 5219,
                "reply_count": 1828,
                "like_count": 17141,
                "quote_count": 3255
            },
            "created_at": "2020-05-12T19:44:51.000Z",
            "attachments": {
                "media_keys": [
                    "13_1260294804770041858"
                ]
            },
            "author_id": "783214"
        }
    ],
    "includes": {
        "media": [
            {
                "media_key": "13_1260294804770041858",
                "type": "video"
            }
        ]
    }
}
  1. 最後に、動画の再生回数と長さをリクエストします。これらはデフォルトフィールドではないため、明示的にリクエストする必要があります。リクエストに media.fields パラメータを使用し、カンマ区切りの値として public_metricsduration_ms を指定してください。
?media.fields=public_metrics,duration_ms リクエスト:   curl --request GET --url 'https://api.x.com/2/tweets?ids=1260294888811347969&tweet.fields=attachments,author_id,created_at,public_metrics&expansions=attachments.media_keys&media.fields=duration_ms,public_metrics' --header 'Authorization: Bearer $BEARER_TOKEN' このリクエストのレスポンスには、ツイートのスクリーンショットに表示されているデータがすべて含まれます。
  {
    "data": [
        {
            "id": "1260294888811347969",
            "text": "あなたのツイートに関するツイートをお見逃しなく。\n\niOSで、コメント付きリツイートを一か所で確認できるようになりました。https://t.co/oanjZfzC6y",
            "author_id": "783214",
            "public_metrics": {
                "retweet_count": 5219,
                "reply_count": 1828,
                "like_count": 17141,
                "quote_count": 3255
            },
            "created_at": "2020-05-12T19:44:51.000Z",
            "attachments": {
                "media_keys": [
                    "13_1260294804770041858"
                ]
            }
        }
    ],
    "includes": {
        "media": [
            {
                "duration_ms": 36503,
                "media_key": "13_1260294804770041858",
                "public_metrics": {
                    "view_count": 1534703
                },
                "type": "video"
            }
        ]
    }
}
この例では、合計で次のパラメータを指定しています。
  • ids=1260294888811347969
  • tweet.fields=attachments,author_id,created_at,public_metrics
  • expansions=attachments.media_keys
  • media.fields=public_metrics,duration_ms  
これらを組み合わせると、最終的なクエリ文字列は次のようになります。
?ids=1260294888811347969&tweet.fields=attachments,author\_id,created\_at,public\_metrics&expansions=attachments.media\_keys&media.fields=public\_metrics,duration\_ms

X API v2 のペイロード例

ツイート

{
  "data": [
    {
      "conversation_id": "1304102743196356610",
      "id": "1307025659294674945",
      "possibly_sensitive": false,
      "public_metrics": {
        "retweet_count": 11,
        "reply_count": 2,
        "like_count": 70,
        "quote_count": 1
      },
      "entities": {
        "urls": [
          {
            "start": 74,
            "end": 97,
            "url": "https://t.co/oeF3ZHeKQQ",
            "expanded_url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5",
            "display_url": "dev.to/twitterdev/und…",
            "images": [
              {
                "url": "https://pbs.twimg.com/news_img/1317156296982867969/2uLfv-Bh?format=jpg&name=orig",
                "width": 1128,
                "height": 600
              },
              {
                "url": "https://pbs.twimg.com/news_img/1317156296982867969/2uLfv-Bh?format=jpg&name=150x150",
                "width": 150,
                "height": 150
              }
            ],
            "status": 200,
            "title": "Understanding the new Tweet payload in the X API v2",
            "description": "X recently announced the new X API v2, rebuilt from the ground up to deliver new features...",
            "unwound_url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5"
          }
        ]
      },
      "text": "Here’s an article that highlights the updates in the new Tweet payload v2 https://t.co/oeF3ZHeKQQ",
      "in_reply_to_user_id": "2244994945",
      "created_at": "2020-09-18T18:36:15.000Z",
      "author_id": "2244994945",
      "referenced_tweets": [
        {
          "type": "replied_to",
          "id": "1304102743196356610"
        }
      ],
      "lang": "en",
      "source": "Twitter Web App"
    }
  ],
  "includes": {
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "id": "2244994945",
        "verified": true,
        "location": "127.0.0.1",
        "description": "The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.",
        "pinned_tweet_id": "1293593516040269825",
        "username": "TwitterDev",
        "public_metrics": {
          "followers_count": 513961,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "name": "Twitter Dev",
        "url": "https://t.co/3ZX3TNiZCY",
        "protected": false
      }
    ],
    "tweets": [
      {
        "conversation_id": "1304102743196356610",
        "id": "1304102743196356610",
        "possibly_sensitive": false,
        "public_metrics": {
          "retweet_count": 31,
          "reply_count": 12,
          "like_count": 104,
          "quote_count": 4
        },
        "entities": {
          "mentions": [
            {
              "start": 146,
              "end": 158,
              "username": "suhemparack"
            }
          ],
          "urls": [
            {
              "start": 237,
              "end": 260,
              "url": "https://t.co/CjneyMpgCq",
              "expanded_url": "https://x.com/TwitterDev/status/1304102743196356610/video/1",
              "display_url": "pic.x.com/CjneyMpgCq"
            }
          ],
          "hashtags": [
            {
              "start": 8,
              "end": 19,
              "tag": "TwitterAPI"
            }
          ]
        },
        "attachments": {
          "media_keys": [
            "13_1303848070984024065"
          ]
        },
        "text": "新しい#TwitterAPIには、ツイートペイロードへのいくつかの改善が含まれています。主な違いは何か気になりますよね🧐\n\nこの動画では、@SuhemParackがv1.1のツイートペイロードと、v2エンドポイントで取得できる内容を比較しています。https://t.co/CjneyMpgCq",
        "created_at": "2020-09-10T17:01:37.000Z",
        "author_id": "2244994945",
        "lang": "en",
        "source": "Twitter Media Studio"
      }
    ]
  }
}

返信ツイート

{
  "data": [
    {
      "lang": "en",
      "conversation_id": "1296887091901718529",
      "text": "See how @PennMedCDH are using Twitter data to understand the COVID-19 health crisis 📊\n\nhttps://t.co/1tdA8uDWes",
      "referenced_tweets": [
        {
          "type": "replied_to",
          "id": "1296887091901718529"
        }
      ],
      "possibly_sensitive": false,
      "entities": {
        "annotations": [
          {
            "start": 30,
            "end": 36,
            "probability": 0.6318,
            "type": "Product",
            "normalized_text": "Twitter"
          }
        ],
        "mentions": [
          {
            "start": 8,
            "end": 19,
            "username": "PennMedCDH"
          }
        ],
        "urls": [
          {
            "start": 87,
            "end": 110,
            "url": "https://t.co/1tdA8uDWes",
            "expanded_url": "https://developer.x.com/en/use-cases/success-stories/penn",
            "display_url": "developer.x.com/en/use-cases/s…",
            "status": 200,
            "title": "Penn Medicine Center for Digital Health",
            "description": "Penn Med Center for Digital Healthは、感情分析、報告された症状、州別データ、COVID-19アウトブレイクに関する国境データを詳細に示すチャートを含むCOVID-19 Twitterマップを作成しました。さらに、Penn Med With Youイニシアチブでは、Twitterからの地域別集計情報を活用してウェブサイトとテキストメッセージサービスに情報を提供しています。このサービスは、関連性が高くタイムリーなリソースを配信するためにこの情報を使用しています。",
            "unwound_url": "https://developer.x.com/en/use-cases/success-stories/penn"
          }
        ]
      },
      "id": "1296887316556980230",
      "public_metrics": {
        "retweet_count": 9,
        "reply_count": 3,
        "like_count": 26,
        "quote_count": 2
      },
      "author_id": "2244994945",
      "in_reply_to_user_id": "2244994945",
      "context_annotations": [
        {
          "domain": {
            "id": "46",
            "name": "Brand Category",
            "description": "Categories within Brand Verticals that narrow down the scope of Brands"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "Services"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "Brands and Companies"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "123",
            "name": "Ongoing News Story",
            "description": "Ongoing News Stories like 'Brexit'"
          },
          "entity": {
            "id": "1220701888179359745",
            "name": "COVID-19"
          }
        }
      ],
      "source": "Twitter Web App",
      "created_at": "2020-08-21T19:10:05.000Z"
    }
  ],
  "includes": {
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "id": "2244994945",
        "protected": false,
        "username": "TwitterDev",
        "verified": true,
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "description": "The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.",
        "pinned_tweet_id": "1293593516040269825",
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "location": "127.0.0.1",
        "name": "Twitter Dev",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "url": "https://t.co/3ZX3TNiZCY"
      },
      {
        "created_at": "2013-07-23T16:58:03.000Z",
        "id": "1615654896",
        "protected": false,
        "username": "PennMedCDH",
        "verified": false,
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/7eS9RuwIb9",
                "expanded_url": "http://centerfordigitalhealth.upenn.edu/",
                "display_url": "centerfordigitalhealth.upenn.edu"
              }
            ]
          },
          "description": {
            "mentions": [
              {
                "start": 0,
                "end": 13,
                "username": "PennMedicine"
              }
            ]
          }
        },
        "description": "@PennMedicine's Center for Digital Health advances science by researching the implications of the advancement of digital health technology in health care.",
        "public_metrics": {
          "followers_count": 1348,
          "following_count": 455,
          "tweet_count": 1288,
          "listed_count": 92
        },
        "location": "Philadelphia, PA",
        "name": "Penn Med CDH",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1067488849725726723/MoO3FQ44_normal.jpg",
        "url": "https://t.co/7eS9RuwIb9"
      }
    ],
    "tweets": [
      {
        "lang": "en",
        "conversation_id": "1296887091901718529",
        "text": "Dr. @RainaMerchant and her team at the Penn Medicine CDH are helping build the future of health care.\n\nThe team is using insights from social data in many different ways — ranging from uncovering risk factors to shedding light on public sentiment. 🔎",
        "possibly_sensitive": false,
        "entities": {
          "annotations": [
            {
              "start": 39,
              "end": 55,
              "probability": 0.8274,
              "type": "Organization",
              "normalized_text": "Penn Medicine CDH"
            }
          ],
          "mentions": [
            {
              "start": 4,
              "end": 18,
              "username": "RainaMerchant"
            }
          ]
        },
        "id": "1296887091901718529",
        "public_metrics": {
          "retweet_count": 9,
          "reply_count": 7,
          "like_count": 32,
          "quote_count": 0
        },
        "author_id": "2244994945",
        "source": "Twitter Web App",
        "created_at": "2020-08-21T19:09:12.000Z"
      }
    ]
  }
}

拡張ツイート

{
  "data": [
    {
      "conversation_id": "1296121314218897408",
      "id": "1296121314218897408",
      "possibly_sensitive": false,
      "public_metrics": {
        "retweet_count": 54,
        "reply_count": 9,
        "like_count": 172,
        "quote_count": 23
      },
      "entities": {
        "urls": [
          {
            "start": 192,
            "end": 215,
            "url": "https://t.co/khXhTurm9x",
            "expanded_url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996",
            "display_url": "devcommunity.com/t/hide-replies…",
            "images": [
              {
                "url": "https://pbs.twimg.com/news_img/1296121315514957825/3CI24hSI?format=png&name=orig",
                "width": 400,
                "height": 400
              },
              {
                "url": "https://pbs.twimg.com/news_img/1296121315514957825/3CI24hSI?format=png&name=150x150",
                "width": 150,
                "height": 150
              }
            ],
            "status": 200,
            "title": "新しいTwitter APIで返信の非表示機能が利用可能に",
            "description": "本日、新しいTwitter APIにおける返信の非表示エンドポイントの一般提供を発表いたします。返信の非表示エンドポイントを使用すると、ユーザーが自分のツイートへの返信を非表示または再表示できるツールを構築できます。ユーザーが返信を管理する理由は様々で、不適切、気を散らす、誤解を招くコメントへの注目を減らしたり、会話をより魅力的にしたりすることが含まれます。このエンドポイントを通じて、Xのユーザーがより迅速かつ効率的に返信を非表示または再表示できるツールを構築できます...",
            "unwound_url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996"
          }
        ],
        "hashtags": [
          {
            "start": 178,
            "end": 189,
            "tag": "TwitterAPI"
          }
        ]
      },
      "text": "The hide replies endpoint is launching today! \n\nDevelopers can hide replies to Tweets - a crucial way developers can help improve the health of the public conversation using the #TwitterAPI.\n\nhttps://t.co/khXhTurm9x",
      "created_at": "2020-08-19T16:26:16.000Z",
      "context_annotations": [
        {
          "domain": {
            "id": "65",
            "name": "Interests and Hobbies Vertical",
            "description": "Top level interests and hobbies groupings, like Food or Travel"
          },
          "entity": {
            "id": "848920371311001600",
            "name": "Technology",
            "description": "Technology and computing"
          }
        },
        {
          "domain": {
            "id": "66",
            "name": "Interests and Hobbies Category",
            "description": "A grouping of interests and hobbies entities, like Novelty Food or Destinations"
          },
          "entity": {
            "id": "848921413196984320",
            "name": "Computer programming",
            "description": "Computer programming"
          }
        }
      ],
      "author_id": "2244994945",
      "lang": "en",
      "source": "Twitter Web App"
    }
  ],
  "includes": {
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "id": "2244994945",
        "verified": true,
        "location": "127.0.0.1",
        "description": "The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.",
        "pinned_tweet_id": "1293593516040269825",
        "username": "TwitterDev",
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "name": "Twitter Dev",
        "url": "https://t.co/3ZX3TNiZCY",
        "protected": false
      }
    ]
  }
}

メディア付きツイート

{
  "data": [
    {
      "lang": "en",
      "conversation_id": "1293593516040269825",
      "text": "It’s finally here! 🥁 Say hello to the new #TwitterAPI.\n\nWe’re rebuilding the X API v2 from the ground up to better serve our developer community. And today’s launch is only the beginning.\n\nhttps://t.co/32VrwpGaJw https://t.co/KaFSbjWUA8",
      "attachments": {
        "media_keys": [
          "7_1293565706408038401"
        ]
      },
      "possibly_sensitive": false,
      "entities": {
        "annotations": [
          {
            "start": 78,
            "end": 88,
            "probability": 0.4381,
            "type": "Product",
            "normalized_text": "Twitter API"
          }
        ],
        "hashtags": [
          {
            "start": 42,
            "end": 53,
            "tag": "TwitterAPI"
          }
        ],
        "urls": [
          {
            "start": 195,
            "end": 218,
            "url": "https://t.co/32VrwpGaJw",
            "expanded_url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html",
            "display_url": "blog.x.com/developer/en_u…",
            "images": [
              {
                "url": "https://pbs.twimg.com/news_img/1336475659279818754/_cmRh7QE?format=jpg&name=orig",
                "width": 1200,
                "height": 627
              },
              {
                "url": "https://pbs.twimg.com/news_img/1336475659279818754/_cmRh7QE?format=jpg&name=150x150",
                "width": 150,
                "height": 150
              }
            ],
            "status": 200,
            "title": "Introducing a new and improved X API",
            "description": "Introducing the new X API - rebuilt from the ground up to deliver new features faster so developers can help the world connect to the public conversation happening on Twitter.",
            "unwound_url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html"
          },
          {
            "start": 219,
            "end": 242,
            "url": "https://t.co/KaFSbjWUA8",
            "expanded_url": "https://x.com/TwitterDev/status/1293593516040269825/video/1",
            "display_url": "pic.x.com/KaFSbjWUA8"
          }
        ]
      },
      "id": "1293593516040269825",
      "public_metrics": {
        "retweet_count": 958,
        "reply_count": 171,
        "like_count": 2848,
        "quote_count": 333
      },
      "author_id": "2244994945",
      "context_annotations": [
        {
          "domain": {
            "id": "46",
            "name": "Brand Category",
            "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリー"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "サービス"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "65",
            "name": "Interests and Hobbies Vertical",
            "description": "食品や旅行などのトップレベルの興味・趣味のグループ"
          },
          "entity": {
            "id": "848920371311001600",
            "name": "テクノロジー",
            "description": "テクノロジーとコンピューティング"
          }
        },
        {
          "domain": {
            "id": "66",
            "name": "Interests and Hobbies Category",
            "description": "新奇な食品や目的地などの興味・趣味エンティティのグループ"
          },
          "entity": {
            "id": "848921413196984320",
            "name": "コンピュータープログラミング",
            "description": "コンピュータープログラミング"
          }
        }
      ],
      "source": "Twitter Web App",
      "created_at": "2020-08-12T17:01:42.000Z"
    }
  ],
  "includes": {
    "media": [
      {
        "height": 720,
        "duration_ms": 34875,
        "media_key": "7_1293565706408038401",
        "type": "video",
        "preview_image_url": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
        "public_metrics": {
          "view_count": 279438
        },
        "width": 1280
      }
    ],
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "id": "2244994945",
        "protected": false,
        "username": "TwitterDev",
        "verified": true,
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "description": "#TwitterDevチームの公式アカウントであり、#TwitterAPIに関するアップデート、ニュース、イベントの公式情報源です。",
        "pinned_tweet_id": "1293593516040269825",
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "location": "127.0.0.1",
        "name": "Twitter Dev",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "url": "https://t.co/3ZX3TNiZCY"
      }
    ]
  }
}`


### Retweet

      `{
  "data": [
    {
      "public_metrics": {
        "retweet_count": 19,
        "reply_count": 0,
        "like_count": 0,
        "quote_count": 0
      },
      "conversation_id": "1229851574555508737",
      "id": "1229851574555508737",
      "entities": {
        "annotations": [
          {
            "start": 28,
            "end": 38,
            "probability": 0.261,
            "type": "Product",
            "normalized_text": "Alexa Skill"
          },
          {
            "start": 44,
            "end": 50,
            "probability": 0.7332,
            "type": "Product",
            "normalized_text": "Twitter"
          }
        ],
        "mentions": [
          {
            "start": 3,
            "end": 15,
            "username": "suhemparack"
          }
        ]
      },
      "text": "RT @suhemparack: I built an Alexa Skill for Twitter using APL that allows you to view Tweets and Trends on the echo show!\n\nCheck it out her…",
      "created_at": "2020-02-18T19:33:59.000Z",
      "possibly_sensitive": false,
      "author_id": "2244994945",
      "referenced_tweets": [
        {
          "type": "retweeted",
          "id": "1229843515603144704"
        }
      ],
      "context_annotations": [
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10026792024",
            "name": "Amazon"
          }
        },
        {
          "domain": {
            "id": "48",
            "name": "Product",
            "description": "ブランドが作成した製品。例: Ford Explorer、Apple iPhone。"
          },
          "entity": {
            "id": "968221983803494400",
            "name": "Amazon - Alexa",
            "description": "Alexa"
          }
        },
        {
          "domain": {
            "id": "46",
            "name": "Brand Category",
            "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリ"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "Services"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        }
      ],
      "source": "Twitter Web App",
      "lang": "en"
    }
  ],
  "includes": {
    "users": [
      {
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "username": "TwitterDev",
        "name": "Twitter Dev",
        "location": "127.0.0.1",
        "url": "https://t.co/3ZX3TNiZCY",
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "id": "2244994945",
        "description": "The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.",
        "verified": true,
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "pinned_tweet_id": "1293593516040269825",
        "created_at": "2013-12-14T04:35:55.000Z",
        "protected": false
      },
      {
        "profile_image_url": "https://pbs.twimg.com/profile_images/1230703695051935747/TbQKe91L_normal.jpg",
        "username": "suhemparack",
        "name": "Suhem Parack",
        "location": "Seattle, WA",
        "url": "https://t.co/8IkCzClPCz",
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/8IkCzClPCz",
                "expanded_url": "https://developer.x.com",
                "display_url": "developer.x.com"
              }
            ]
          },
          "description": {
            "mentions": [
              {
                "start": 42,
                "end": 50,
                "username": "Twitter"
              }
            ]
          }
        },
        "id": "857699969263964161",
        "description": "Developer Relations for Academic Research @Twitter. Talk to me about research with Twitter data. Previously: Amazon Alexa. Views are my own",
        "verified": false,
        "public_metrics": {
          "followers_count": 738,
          "following_count": 512,
          "tweet_count": 460,
          "listed_count": 12
        },
        "pinned_tweet_id": "1296498078233571329",
        "created_at": "2017-04-27T20:56:22.000Z",
        "protected": false
      }
    ],
    "tweets": [
      {
        "public_metrics": {
          "retweet_count": 19,
          "reply_count": 1,
          "like_count": 71,
          "quote_count": 6
        },
        "conversation_id": "1229843515603144704",
        "id": "1229843515603144704",
        "entities": {
          "annotations": [
            {
              "start": 11,
              "end": 21,
              "probability": 0.3342,
              "type": "Product",
              "normalized_text": "Alexa Skill"
            },
            {
              "start": 27,
              "end": 33,
              "probability": 0.6727,
              "type": "Product",
              "normalized_text": "Twitter"
            }
          ],
          "urls": [
            {
              "start": 127,
              "end": 150,
              "url": "https://t.co/l5J8wq748G",
              "expanded_url": "https://dev.to/twitterdev/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0",
              "display_url": "dev.to/twitterdev/bui…",
              "status": 200,
              "unwound_url": "https://dev.to/twitterdev/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0"
            }
          ]
        },
        "text": "I built an Alexa Skill for Twitter using APL that allows you to view Tweets and Trends on the echo show!\n\nCheck it out here 👇\n\nhttps://t.co/l5J8wq748G",
        "created_at": "2020-02-18T19:01:58.000Z",
        "possibly_sensitive": false,
        "author_id": "857699969263964161",
        "context_annotations": [
          {
            "domain": {
              "id": "47",
              "name": "Brand",
              "description": "ブランドと企業"
            },
            "entity": {
              "id": "10026792024",
              "name": "Amazon"
            }
          },
          {
            "domain": {
              "id": "48",
              "name": "Product",
              "description": "ブランドが作成した製品。例: Ford Explorer、Apple iPhone。"
            },
            "entity": {
              "id": "968221983803494400",
              "name": "Amazon - Alexa",
              "description": "Alexa"
            }
          },
          {
            "domain": {
              "id": "46",
              "name": "Brand Category",
              "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリ"
            },
            "entity": {
              "id": "781974596752842752",
              "name": "Services"
            }
          },
          {
            "domain": {
              "id": "47",
              "name": "Brand",
              "description": "ブランドと企業"
            },
            "entity": {
              "id": "10045225402",
              "name": "Twitter"
            }
          }
        ],
        "source": "Twitter Web App",
        "lang": "en"
      }
    ]
  }
}`


### Quote Tweet

      `{
  "data": [
    {
      "lang": "en",
      "conversation_id": "1328399838128467969",
      "text": "予定通り、以下で参照されているLabs v2エンドポイントは廃止されました。X API v2に関してご質問やサポートが必要な場合は、フォーラムでお知らせください! https://t.co/JaxttUMmjX",
      "referenced_tweets": [
        {
          "type": "quoted",
          "id": "1327011423252144128"
        }
      ],
      "possibly_sensitive": false,
      "entities": {
        "annotations": [
          {
            "start": 151,
            "end": 157,
            "probability": 0.8115,
            "type": "Product",
            "normalized_text": "Twitter"
          }
        ],
        "urls": [
          {
            "start": 167,
            "end": 190,
            "url": "https://t.co/JaxttUMmjX",
            "expanded_url": "https://x.com/TwitterDev/status/1327011423252144128",
            "display_url": "twitter.com/TwitterDev/sta…"
          }
        ]
      },
      "id": "1328399838128467969",
      "public_metrics": {
        "retweet_count": 7,
        "reply_count": 4,
        "like_count": 29,
        "quote_count": 1
      },
      "author_id": "2244994945",
      "context_annotations": [
        {
          "domain": {
            "id": "46",
            "name": "Brand Category",
            "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリ"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "サービス"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "Brand",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "65",
            "name": "Interests and Hobbies Vertical",
            "description": "食べ物や旅行などのトップレベルの興味・趣味のグループ"
          },
          "entity": {
            "id": "848920371311001600",
            "name": "テクノロジー",
            "description": "テクノロジーとコンピューティング"
          }
        },
        {
          "domain": {
            "id": "66",
            "name": "Interests and Hobbies Category",
            "description": "新奇な食べ物や目的地などの興味・趣味エンティティのグループ"
          },
          "entity": {
            "id": "848921413196984320",
            "name": "コンピュータプログラミング",
            "description": "コンピュータプログラミング"
          }
        }
      ],
      "source": "Twitter Web App",
      "created_at": "2020-11-16T18:09:36.000Z"
    }
  ],
  "includes": {
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "id": "2244994945",
        "protected": false,
        "username": "TwitterDev",
        "verified": true,
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "description": "#TwitterDevチームの声であり、#TwitterAPIに関連するアップデート、ニュース、イベントの公式情報源です。",
        "pinned_tweet_id": "1293593516040269825",
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "location": "127.0.0.1",
        "name": "Twitter Dev",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "url": "https://t.co/3ZX3TNiZCY"
      }
    ],
    "tweets": [
      {
        "lang": "en",
        "conversation_id": "1327011423252144128",
        "text": "👋 Twitter Developer Labs v2の返信を非表示と最近の検索は、次の月曜日11月16日に廃止されることをお知らせします!v2 #TwitterAPIで現在利用可能な新しい返信を非表示と最近の検索エンドポイントへの移行をお勧めします。詳細: https://t.co/r6z6CI7kEy",
        "possibly_sensitive": false,
        "entities": {
          "annotations": [
            {
              "start": 26,
              "end": 50,
              "probability": 0.4387,
              "type": "Product",
              "normalized_text": "Twitter Developer Labs v2"
            }
          ],
          "hashtags": [
            {
              "start": 228,
              "end": 239,
              "tag": "TwitterAPI"
            }
          ],
          "urls": [
            {
              "start": 250,
              "end": 273,
              "url": "https://t.co/r6z6CI7kEy",
              "expanded_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
              "display_url": "devcommunity.com/t/retiring-lab…",
              "images": [
                {
                  "url": "https://pbs.twimg.com/news_img/1327011425240313856/PkurOyu1?format=jpg&name=orig",
                  "width": 1200,
                  "height": 630
                },
                {
                  "url": "https://pbs.twimg.com/news_img/1327011425240313856/PkurOyu1?format=jpg&name=150x150",
                  "width": 150,
                  "height": 150
                }
              ],
              "status": 200,
              "title": "Labs v2の最近の検索と返信を非表示の廃止",
              "description": "アーリーアクセスと返信を非表示のアナウンスでお伝えした通り、以下のTwitter Developer Labs v2エンドポイントは11月16日に廃止されます。Labs v2最近の検索 Labs v2返信を非表示 呼び出された場合、これらのエンドポイントはHTTP 410ステータスで応答し、データを返しません。Labsからのフィードバックに基づき、対応する機能をX API v2に組み込みました。関連ドキュメントは以下のリンクからご覧いただけます。まだの方はこちらからv2アクセスに登録してください...",
              "unwound_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795"
            }
          ]
        },
        "id": "1327011423252144128",
        "public_metrics": {
          "retweet_count": 8,
          "reply_count": 2,
          "like_count": 33,
          "quote_count": 4
        },
        "author_id": "2244994945",
        "context_annotations": [
          {
            "domain": {
              "id": "46",
              "name": "Brand Category",
              "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリ"
            },
            "entity": {
              "id": "781974596752842752",
              "name": "サービス"
            }
          },
          {
            "domain": {
              "id": "47",
              "name": "Brand",
              "description": "ブランドと企業"
            },
            "entity": {
              "id": "10045225402",
              "name": "Twitter"
            }
          },
          {
            "domain": {
              "id": "65",
              "name": "Interests and Hobbies Vertical",
              "description": "食べ物や旅行などのトップレベルの興味・趣味のグループ"
            },
            "entity": {
              "id": "848920371311001600",
              "name": "Technology",
              "description": "Technology and computing"
            }
          },
          {
            "domain": {
              "id": "66",
              "name": "Interests and Hobbies Category",
              "description": "新奇な食べ物や目的地などの興味・趣味エンティティのグループ"
            },
            "entity": {
              "id": "848921413196984320",
              "name": "Computer programming",
              "description": "Computer programming"
            }
          }
        ],
        "source": "Twitter Web App",
        "created_at": "2020-11-12T22:12:32.000Z"
      }
    ]
  }
}

リツイートされた引用ツイート

{
    "data": [
    {
      "lang": "en",
      "conversation_id": "1225470895902412800",
      "text": "RT @AureliaSpecker: 📣 If you enjoyed the London commute tutorial I wrote in November last year, check out the refactored version that uses…",
      "referenced_tweets": [
        {
          "type": "retweeted",
          "id": "1224709550214873090"
        }
      ],
      "possibly_sensitive": false,
      "entities": {
        "annotations": [
          {
            "start": 42,
            "end": 47,
            "probability": 0.6999,
            "type": "Place",
            "normalized_text": "London"
          }
        ],
        "mentions": [
          {
            "start": 3,
            "end": 18,
            "username": "AureliaSpecker"
          }
        ]
      },
      "id": "1225470895902412800",
      "public_metrics": {
        "retweet_count": 12,
        "reply_count": 0,
        "like_count": 0,
        "quote_count": 0
      },
      "author_id": "2244994945",
      "context_annotations": [
        {
          "domain": {
            "id": "46",
            "name": "ブランドカテゴリ",
            "description": "ブランドバーティカル内でブランドの範囲を絞り込むカテゴリ"
          },
          "entity": {
            "id": "781974596752842752",
            "name": "サービス"
          }
        },
        {
          "domain": {
            "id": "47",
            "name": "ブランド",
            "description": "ブランドと企業"
          },
          "entity": {
            "id": "10045225402",
            "name": "Twitter"
          }
        },
        {
          "domain": {
            "id": "65",
            "name": "興味・趣味バーティカル",
            "description": "食品や旅行などのトップレベルの興味・趣味グループ"
          },
          "entity": {
            "id": "848920371311001600",
            "name": "テクノロジー",
            "description": "テクノロジー and computing"
          }
        },
        {
          "domain": {
            "id": "66",
            "name": "興味・趣味カテゴリ",
            "description": "新奇な食品や旅行先などの興味・趣味エンティティのグループ"
          },
          "entity": {
            "id": "848921413196984320",
            "name": "コンピュータプログラミング",
            "description": "コンピュータプログラミング"
          }
        }
      ],
      "source": "Twitter for iPhone",
      "created_at": "2020-02-06T17:26:44.000Z"
    }
  ],
  "includes": {
    "users": [
      {
        "created_at": "2013-12-14T04:35:55.000Z",
        "id": "2244994945",
        "protected": false,
        "username": "TwitterDev",
        "verified": true,
        "entities": {
          "url": {
            "urls": [
              {
                "start": 0,
                "end": 23,
                "url": "https://t.co/3ZX3TNiZCY",
                "expanded_url": "https://developer.x.com/en/community",
                "display_url": "developer.x.com/en/community"
              }
            ]
          },
          "description": {
            "hashtags": [
              {
                "start": 17,
                "end": 28,
                "tag": "TwitterDev"
              },
              {
                "start": 105,
                "end": 116,
                "tag": "TwitterAPI"
              }
            ]
          }
        },
        "description": "The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.",
        "pinned_tweet_id": "1293593516040269825",
        "public_metrics": {
          "followers_count": 513962,
          "following_count": 2039,
          "tweet_count": 3635,
          "listed_count": 1672
        },
        "location": "127.0.0.1",
        "name": "Twitter Dev",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "url": "https://t.co/3ZX3TNiZCY"
      },
      {
        "created_at": "2013-01-18T23:45:43.000Z",
        "id": "1102321381",
        "protected": false,
        "username": "AureliaSpecker",
        "verified": false,
        "entities": {
          "description": {
            "mentions": [
              {
                "start": 7,
                "end": 17,
                "username": "TwitterUK"
              },
              {
                "start": 86,
                "end": 95,
                "username": "_dormrod"
              }
            ]
          }
        },
        "description": "devrel @TwitterUK • Swiss in London • mother of houseplants • personal hairdresser to @_dormrod",
        "pinned_tweet_id": "1253069421322567681",
        "public_metrics": {
          "followers_count": 1036,
          "following_count": 1330,
          "tweet_count": 855,
          "listed_count": 26
        },
        "location": "London, UK",
        "name": "Aurelia Specker",
        "profile_image_url": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
        "url": ""
      }
    ],
    "tweets": [
      {
        "lang": "en",
        "conversation_id": "1224709550214873090",
        "text": "📣 If you enjoyed the London commute tutorial I wrote in November last year, check out the refactored version that uses Twitter's new search endpoint 🚇 https://t.co/87XIPZmZBJ\n\n#DEVcommunity #Pythontutorial @TwitterDev @TwitterAPI https://t.co/dXrJYvn3hY",
        "referenced_tweets": [
          {
            "type": "quoted",
            "id": "1195000047089389573"
          }
        ],
        "possibly_sensitive": false,
        "entities": {
          "annotations": [
            {
              "start": 22,
              "end": 27,
              "probability": 0.7075,
              "type": "Place",
              "normalized_text": "London"
            },
            {
              "start": 120,
              "end": 126,
              "probability": 0.7355,
              "type": "Product",
              "normalized_text": "Twitter"
            }
          ],
          "mentions": [
            {
              "start": 206,
              "end": 217,
              "username": "TwitterDev"
            },
            {
              "start": 218,
              "end": 229,
              "username": "TwitterAPI"
            }
          ],
          "hashtags": [
            {
              "start": 176,
              "end": 189,
              "tag": "DEVcommunity"
            },
            {
              "start": 190,
              "end": 205,
              "tag": "Pythontutorial"
            }
          ],
          "urls": [
            {
              "start": 151,
              "end": 174,
              "url": "https://t.co/87XIPZmZBJ",
              "expanded_url": "https://bit.ly/2OrnrCC",
              "display_url": "bit.ly/2OrnrCC",
              "status": 200,
              "unwound_url": "https://dev.to/twitterdev/migrate-to-twitter-s-newly-released-labs-recent-search-endpoint-3npe"
            },
            {
              "start": 230,
              "end": 253,
              "url": "https://t.co/dXrJYvn3hY",
              "expanded_url": "https://x.com/AureliaSpecker/status/1195000047089389573",
              "display_url": "twitter.com/AureliaSpecker…"
            }
          ]
        },
        "id": "1224709550214873090",
        "public_metrics": {
          "retweet_count": 12,
          "reply_count": 0,
          "like_count": 43,
          "quote_count": 2
        },
        "author_id": "1102321381",
        "context_annotations": [
          {
            "domain": {
              "id": "46",
              "name": "Brand Category",
              "description": "ブランドの範囲を絞り込むブランドバーティカル内のカテゴリ"
            },
            "entity": {
              "id": "781974596752842752",
              "name": "サービス"
            }
          },
          {
            "domain": {
              "id": "47",
              "name": "Brand",
              "description": "ブランドと企業"
            },
            "entity": {
              "id": "10045225402",
              "name": "Twitter"
            }
          },
          {
            "domain": {
              "id": "65",
              "name": "Interests and Hobbies Vertical",
              "description": "食品や旅行などの最上位レベルの興味・趣味のグループ"
            },
            "entity": {
              "id": "848920371311001600",
              "name": "テクノロジー",
              "description": "テクノロジーとコンピューティング"
            }
          },
          {
            "domain": {
              "id": "66",
              "name": "Interests and Hobbies Category",
              "description": "新奇な食品や旅行先などの興味・趣味エンティティのグループ"
            },
            "entity": {
              "id": "848921413196984320",
              "name": "コンピュータプログラミング",
              "description": "コンピュータプログラミング"
            }
          }
        ],
        "source": "Twitter Web App",
        "created_at": "2020-02-04T15:01:25.000Z"
      }
    ]
  }
}