> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-5e62557c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# パーソナライズドトレンド

> X API v2 の Personalized Trends エンドポイントは、認証済みユーザーの位置情報、興味、アカウントのアクティビティに基づいてパーソナライズされたトレンドトピックを返します。

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

Personalized Trends エンドポイントは、認証済みユーザーの位置情報や興味に基づいてパーソナライズされたトレンドトピックを返します。

## 概要

<CardGroup cols={2}>
  <Card title="パーソナライズ" icon="https://mintcdn.com/x-preview-mintlify-5e62557c/dxXIRy5tzOESXfjK/icons/xds/icon-person.svg?fit=max&auto=format&n=dxXIRy5tzOESXfjK&q=85&s=b9f49bc6c7deb6ad896faddec9f3be35" width="24" height="24" data-path="icons/xds/icon-person.svg">
    ユーザー向けにカスタマイズされたトレンド
  </Card>

  <Card title="位置情報対応" icon="location-dot">
    ユーザーの位置情報に基づく
  </Card>

  <Card title="リアルタイム" icon="bolt">
    現在のトレンドトピック
  </Card>
</CardGroup>

***

## エンドポイント

| Method | Endpoint                       | 説明              |
| :----- | :----------------------------- | :-------------- |
| GET    | `/2/users/personalized_trends` | パーソナライズドトレンドを取得 |

***

## リクエスト例

```bash theme={null}
curl "https://api.x.com/2/users/personalized_trends" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

## レスポンス例

```json title="レスポンス例" lines wrap icon="https://mintcdn.com/x-preview-mintlify-5e62557c/QVCcrJRuVU5c6Fli/icons/xds/icon-brackets.svg?fit=max&auto=format&n=QVCcrJRuVU5c6Fli&q=85&s=8c7124cd379f973762b135033c4e3df8" theme={null}
{
  "data": [
    {
      "trend_name": "#AI",
      "tweet_count": 125000
    },
    {
      "trend_name": "Machine Learning",
      "tweet_count": 85000
    }
  ]
}
```

***

## はじめに

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * Developer Console の[プロジェクトとアプリ](/resources/fundamentals/developer-apps)
  * [OAuth 2.0 PKCE](/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) を介したユーザーアクセストークン
  * Premium ユーザーサブスクリプション
</Note>

<CardGroup cols={2}>
  <Card title="WOEID によるトレンド" icon="globe" href="/x-api/trends/trends-by-woeid/introduction">
    特定の位置情報のトレンドを取得
  </Card>

  <Card title="API リファレンス" icon="https://mintcdn.com/x-preview-mintlify-5e62557c/NnGYBQFO1PDkJQK7/icons/xds/icon-code.svg?fit=max&auto=format&n=NnGYBQFO1PDkJQK7&q=85&s=e6a5208c5ad4cc59a4a97fed7db5ed00" href="/x-api/trends/personalized-trends" width="24" height="24" data-path="icons/xds/icon-code.svg">
    完全なエンドポイントドキュメント
  </Card>
</CardGroup>
