> ## 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.

# Timelines

> The Timelines endpoints let you retrieve Posts from user timelines, mention feeds, and home. Reference for the X API v2 standard tier covering timelines.

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 Timelines endpoints let you retrieve Posts from user timelines, mention feeds, and home feeds. Get a user's posted content, see what Posts mention them, or view their personalized home timeline.

## Overview

<CardGroup cols={2}>
  <Card title="User Posts" icon="user">
    Get Posts authored by a user
  </Card>

  <Card title="User mentions" icon="at">
    Get Posts mentioning a user
  </Card>

  <Card title="Home timeline" icon="house">
    Get personalized home feed
  </Card>

  <Card title="Reverse chronological" icon="clock">
    Posts in time order
  </Card>
</CardGroup>

***

## Endpoints

| Method | Endpoint                                                                    | Description                 |
| :----- | :-------------------------------------------------------------------------- | :-------------------------- |
| GET    | [`/2/users/:id/tweets`](/x-api/users/get-posts)                             | Get Posts by a user         |
| GET    | [`/2/users/:id/mentions`](/x-api/users/get-mentions)                        | Get Posts mentioning a user |
| GET    | [`/2/users/:id/timelines/reverse_chronological`](/x-api/users/get-timeline) | Get home timeline           |

***

## User Posts timeline

Get the most recent Posts authored by a specific user.

### Features

* Up to 3,200 most recent Posts
* Filter out replies and retweets
* Pagination support
* Historical access with time-based filtering

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/x-api/users/get-posts">
    Full endpoint documentation
  </Card>
</CardGroup>

***

## User mentions timeline

Get Posts that mention a specific user.

### Features

* Up to 800 most recent mentions
* Includes replies and quote Posts
* Pagination support

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/x-api/posts/timelines/quickstart/user-mention-quickstart">
    Get mentions for a user
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/users/get-mentions">
    Full endpoint documentation
  </Card>
</CardGroup>

***

## Reverse chronological home timeline

Get the authenticated user's home timeline in reverse chronological order.

### Features

* Posts from followed accounts
* Most recent 3,200 Posts (or 7 days)
* Excludes algorithmic ranking
* Requires user authentication

<Note>
  This endpoint requires [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).
</Note>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/x-api/posts/timelines/quickstart/reverse-chron-quickstart">
    Get a user's home timeline
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/users/get-timeline">
    Full endpoint documentation
  </Card>
</CardGroup>

***

## Filtering options

### Exclude parameter

Filter out specific Post types:

| Value      | Effect           |
| :--------- | :--------------- |
| `retweets` | Exclude retweets |
| `replies`  | Exclude replies  |

```bash theme={null}
curl "https://api.x.com/2/users/123/tweets?exclude=retweets,replies" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

### Time-based filtering

| Parameter    | Description                      |
| :----------- | :------------------------------- |
| `start_time` | Oldest Post timestamp (ISO 8601) |
| `end_time`   | Newest Post timestamp (ISO 8601) |
| `since_id`   | Return Posts after this ID       |
| `until_id`   | Return Posts before this ID      |

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * Your App's [keys and tokens](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="Home timeline quickstart" icon="house" href="/x-api/posts/timelines/quickstart/reverse-chron-quickstart">
    Get a user's home feed
  </Card>

  <Card title="Mentions quickstart" icon="at" href="/x-api/posts/timelines/quickstart/user-mention-quickstart">
    Get mentions for a user
  </Card>

  <Card title="Integration guide" icon="book" href="/x-api/posts/timelines/integrate">
    Key concepts and best practices
  </Card>

  <Card title="Sample code" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    Working code examples
  </Card>
</CardGroup>
