X API のフォロー関連エンドポイントの比較
フォローのルックアップ
| 説明 | Standard v1.1 | X API v2 |
| サポートされている HTTP メソッド | GET | GET |
| ホストドメイン | https://api.x.com | https://api.x.com |
| エンドポイントパス | /1.1/friends/ids.json /1.1/friends/list.json /1.1/followers/ids.json /1.1/followers/list.json | /2/users/:id/following /2/users/:id/followers |
| Authentication | OAuth 1.0a User Context App のみ | OAuth 1.0a User Context OAuth 2.0 Authorization Code with PKCE App のみ |
| デフォルトのリクエストレート制限 | 15 分あたり 15 リクエスト (ユーザーごと) 15 分あたり 15 リクエスト (App ごと) | 15 分あたり 15 リクエスト (ユーザーごと) 15 分あたり 15 リクエスト (App ごと) |
| レスポンスあたりの最大ユーザー数 | GET friends/id および GET followers/id は、ページあたり最大 5000 件のユーザー ID を返します。 GET friends/list および GET followers/list は、ページあたり最大 200 件のユーザーオブジェクトを返します。 | ページあたり最大 1000 件のユーザーオブジェクト |
| ページネーション | トークンは next_cursor フィールドで返され、次のページの結果を取得するために cursor パラメータの値として渡すことができます。 | トークンは next_token フィールドで返され、次のページの結果を取得するために token パラメータの値として渡すことができます。 v2 のペイロードでは previous_token フィールドも返され、前のページの結果を取得するために pagination_token パラメータとともに渡すことができます。 |
| JSON 形式 | Standard v1.1 形式 | X API v2 形式 (v1.1 の形式とは後方互換性がなく、fields および expansions リクエストパラメータによって決定されます) Standard v1.1 形式から X API v2 形式への移行方法の詳細については、データ形式の移行ガイドをご覧ください。 |
| ペイロードで返すフィールドを選択して指定可能 | ✔ | |
| ポストの annotations フィールドをサポート | ✔ | |
| 新しい metrics フィールドのリクエストをサポート | ✔ | |
| conversation_id フィールドをサポート | ✔ | |
| project に関連付けられた developer App の認証情報の使用が必須 | ✔ |
フォローの管理
ユーザーをフォローする
| 説明 | Standard v1.1 | X API v2 |
|---|---|---|
| 対応している HTTP メソッド | POST | POST |
| ホストドメイン | https://api.x.com | https://api.x.com |
| エンドポイントパス | /1.1/friendships/create.json | /2/users/:id/following |
| 認証 | OAuth 1.0a User Context | OAuth 1.0a User Context OAuth 2.0 Authorization Code with PKCE |
| 既定のリクエストレート制限 | 15 分あたり 50 リクエスト | 15 分あたり 50 リクエスト |
| ユーザーごとの 1 日あたりの最大操作回数 | 400 | 400 |
| App ごとの 1 日あたりの最大操作回数 | 1000 | 1000 |
| developer App の認証情報を使用する必要があり、その App が Project に関連付けられていること | ✔️ |
ユーザーのフォローを解除する
| 説明 | Standard v1.1 | X API v2 |
|---|---|---|
| サポートされている HTTP メソッド | POST | DELETE |
| ホストドメイン | https://api.x.com | https://api.x.com |
| エンドポイントパス | /1.1/friendships/destroy.json | /2/users/:source_user_id/following/:target_user_id |
| 認証 | OAuth 1.0a User Context | OAuth 1.0a User Context OAuth 2.0 Authorization Code with PKCE |
| デフォルトのリクエストレート制限 | 15 分あたり 15 回のリクエスト (ユーザーごと) | 15 分あたり 50 回のリクエスト (ユーザーごと) |
| App ごとの 1 日あたりの最大操作回数 | なし | 500 |
| Project に関連付けられた developer App の認証情報の使用が必須 | ✔️ |