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

# Introduction

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <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>;
};

The Personalized Trends endpoint allows you to get personalized trends for an authenticating user account.

<Note>
  **Note:** Personalized trends will only be returned by the endpoint for user accounts that are subscribed to X Premium.
</Note>

<Note>
  **Account setup**

  To access this endpoint, you will need:

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info).
  * To authenticate using the keys and tokens from a [developer App](/resources/fundamentals/developer-apps) that is located within a [Project](/resources/fundamentals/projects). 

  Learn more about getting access to the X API v2 endpoints in our [getting started guide](/x-api/getting-started/getting-access).
</Note>

### Getting started

#### Authentication

You can authenticate this endpoint with either [OAuth 1.0a User Context](/resources/fundamentals/authentication), or [OAuth 2.0 Authorization Code with PKCE](resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2).
 

#### Making a request

You can call the Personalized Trends endpoint as shown below:

`curl 'https://api.x.com/2/users/personalized_trends' --header 'Authorization: ••••••'`

If the request is successful, you should see the JSON response as shown below:

```
{
    "data": [
        {
            "category": "Bitcoin",
            "post_count": "42K posts",
            "trend_name": "MicroStrategy's $42 Billion Bitcoin Investment",
            "trending_since": "5 hours ago"
        },
        {
            "category": "Music",
            "post_count": "2K posts",
            "trend_name": "Drake's 'No Face' Music Video Release",
            "trending_since": "Trending now"
        },
        {
            "category": "Weather",
            "post_count": "1.2K posts",
            "trend_name": "Super Typhoon Leon Impacts Taiwan and Batanes",
            "trending_since": "Trending now"
        }
    ]
}
```

**Note:** If the authenticated user of the request is not subscribed to X Premium, they will receive the following response instead:

```
{
    "data": [
        {
            "category": "Unknown",
            "post_count": "Unknown",
            "trending_since": ""
        }
    ]
}
```
