> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retweets

> Retweets エンドポイントを使用すると、投稿を Retweet したり Retweet を取り消したり、投稿を Retweet したユーザーを確認したりでき、また自身の投稿の再投稿も取得できます。retweets を扱う X API v2 スタンダードティアのリファレンス。

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

Retweets エンドポイントを使用すると、投稿を Retweet したり Retweet を取り消したり、投稿を Retweet したユーザーを確認したりでき、また自身の投稿の再投稿も取得できます。

## 概要

<CardGroup cols={2}>
  <Card title="Retweet" icon="retweet">
    ユーザーの代理で投稿を Retweet
  </Card>

  <Card title="Retweet を取り消す" icon="xmark">
    Retweet を取り消す
  </Card>

  <Card title="Retweet したユーザー" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" width="24" height="24" data-path="icons/xds/icon-people.svg">
    投稿を Retweet したユーザーを表示
  </Card>

  <Card title="自身の Repost" icon="repeat">
    自身の投稿の再投稿を取得
  </Card>
</CardGroup>

***

## エンドポイント

### Retweets ルックアップ

| Method | Endpoint                                                      | Description           |
| :----- | :------------------------------------------------------------ | :-------------------- |
| GET    | [`/2/tweets/:id/retweeted_by`](/x-api/posts/get-reposted-by)  | 投稿を Retweet したユーザーを取得 |
| GET    | [`/2/tweets/:id/quote_tweets`](/x-api/posts/get-quoted-posts) | 投稿の引用投稿を取得            |
| GET    | [`/2/users/reposts_of_me`](/x-api/users/get-reposts-of-me)    | 認証ユーザーの投稿の再投稿を取得      |

### Retweet の管理

| Method | Endpoint                                                        | Description   |
| :----- | :-------------------------------------------------------------- | :------------ |
| POST   | [`/2/users/:id/retweets`](/x-api/users/repost-post)             | 投稿を Retweet   |
| DELETE | [`/2/users/:id/retweets/:tweet_id`](/x-api/users/unrepost-post) | Retweet を取り消す |

***

## 例: Retweet したユーザーを取得する

```bash theme={null}
curl "https://api.x.com/2/tweets/1234567890/retweeted_by?\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

## 例: 投稿を Retweet する

```bash theme={null}
curl -X POST "https://api.x.com/2/users/123456789/retweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweet_id": "1234567890"}'
```

***

## はじめる

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 開発者コンソール内の [Project と App](/resources/fundamentals/developer-apps)
  * App の[キーとトークン](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="ルックアップクイックスタート" icon="retweet" href="/x-api/posts/retweets/quickstart/retweets-lookup">
    投稿の Retweet を取得
  </Card>

  <Card title="管理クイックスタート" icon="plus" href="/x-api/posts/retweets/quickstart/manage-retweets">
    Retweet と取り消し
  </Card>

  <Card title="自身の Repost" icon="repeat" href="/x-api/posts/retweets/quickstart/retweets-of-me">
    自身の投稿の再投稿を取得
  </Card>

  <Card title="API リファレンス" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/posts/get-reposted-by" width="24" height="24" data-path="icons/xds/icon-code.svg">
    エンドポイントの完全なドキュメント
  </Card>
</CardGroup>
