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

# X API Overview

> Complete X API v2 reference covering Posts, users, Spaces, Direct Messages, lists, trends, media, compliance, streaming, and webhook endpoints.

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 X API gives you programmatic access to X's public conversation. All endpoints below are available on [pay-per-use](/x-api/introduction) plans. Endpoints marked as Enterprise-only require an [Enterprise](/enterprise-api/introduction) plan.

***

## Endpoints

<CardGroup cols={3}>
  <Card title="Posts" icon="message" href="/x-api/posts/lookup/introduction">
    Search, retrieve, and publish posts. Access timelines, threads, and quote posts.
  </Card>

  <Card title="Users" icon="user" href="/x-api/users/lookup/introduction">
    Look up profiles, manage follows, blocks, and mutes.
  </Card>

  <Card title="Direct Messages" icon="envelope" href="/x-api/direct-messages/lookup/introduction">
    Send and receive private messages.
  </Card>

  <Card title="Spaces" icon="microphone" href="/x-api/spaces/lookup/introduction">
    Find live audio conversations and participants.
  </Card>

  <Card title="Lists" icon="list" href="/x-api/lists/list-lookup/introduction">
    Create and manage curated lists of accounts.
  </Card>

  <Card title="Likes" icon="heart" href="/x-api/posts/likes/introduction">
    Like and unlike posts. Look up who liked a post.
  </Card>

  <Card title="Trends" icon="arrow-trend-up" href="/x-api/trends/trends-by-woeid/introduction">
    Trending topics by location and personalized trends.
  </Card>

  <Card title="Media" icon="image" href="/x-api/media/introduction">
    Upload images, videos, and GIFs. Manage subtitles and metadata.
  </Card>

  <Card title="Communities" icon="users" href="/x-api/communities/lookup/introduction">
    Look up and search communities.
  </Card>

  <Card title="Community Notes" icon="note-sticky" href="/x-api/community-notes/introduction">
    Create, evaluate, and search community notes.
  </Card>

  <Card title="News" icon="newspaper" href="/x-api/news/introduction">
    Search and retrieve news stories.
  </Card>

  <Card title="Compliance" icon="shield-check" href="/x-api/compliance/batch-compliance/introduction">
    Batch compliance jobs and compliance streams.
  </Card>
</CardGroup>

***

## Streaming & real-time

<CardGroup cols={3}>
  <Card title="Filtered Stream" icon="filter" href="/x-api/posts/filtered-stream/introduction">
    Get posts delivered in real-time matching your filter rules.
  </Card>

  <Card title="X Activity" icon="bolt" href="/x-api/activity/introduction">
    Subscribe to real-time activity events like follows, likes, and profile updates.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/x-api/webhooks/introduction">
    Receive event data via HTTP callbacks.
  </Card>
</CardGroup>

***

## Enterprise-only

These endpoints require an [Enterprise plan](/enterprise-api/introduction).

<CardGroup cols={3}>
  <Card title="Volume Streams" icon="satellite-dish" href="/x-api/posts/volume-streams/introduction">
    Full firehose and language-specific streams.
  </Card>

  <Card title="Likes Streams" icon="heart" href="/x-api/stream/likes-streams-introduction">
    Stream all or sampled likes in real-time.
  </Card>

  <Card title="Powerstream" icon="bolt" href="/x-api/powerstream/introduction">
    High-performance filtered streaming with advanced operators.
  </Card>

  <Card title="Analytics" icon="chart-bar" href="/x-api/posts/get-post-analytics">
    Post and media engagement metrics at scale.
  </Card>

  <Card title="Account Activity" icon="bell" href="/x-api/account-activity/introduction">
    Real-time user event subscriptions.
  </Card>

  <Card title="Stream Webhooks" icon="webhook" href="/x-api/webhooks/stream/introduction">
    Filtered stream delivery via webhooks.
  </Card>
</CardGroup>

***

## Quick start

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

<CardGroup cols={2}>
  <Card title="Make your first request" icon="rocket" href="/x-api/getting-started/make-your-first-request">
    Get your credentials and call the API in minutes.
  </Card>

  <Card title="SDKs" icon="cube" href="/tools-and-libraries">
    Official Python and TypeScript libraries.
  </Card>
</CardGroup>
