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

# X API v2

export const PricingCard = ({title, price, description, features = [], icon, iconType = "solid", popular = false, href = "https://developer.x.com/en/portal/products"}) => {
  const isLink = Boolean(href);
  const CardWrapper = isLink ? 'a' : 'div';
  return <CardWrapper href={isLink ? href : undefined} target={isLink ? "_blank" : undefined} rel={isLink ? "noopener noreferrer" : undefined} className={`block ${isLink ? 'cursor-pointer' : ''}`}>
      <div className={`
        relative p-4 rounded-xl border transition-all duration-200 h-full flex flex-col
        ${popular ? 'border-gray-200/60 bg-white/8' : 'border-gray-700 bg-white/4'}
        ${isLink ? 'hover:border-white' : ''}
      `}>
        {popular && <div className="absolute top-3 right-3">
            <span className="bg-white text-primary text-xs font-medium px-2 py-1 rounded-full">
              Popular
            </span>
          </div>}
        
        <div className="text-left mb-6">
          <h3 className="text-xl font-bold text-gray-900 dark:text-white mb-2">
            {title}
          </h3>
          
          <div className="mb-3">
            <span className="text-3xl font-bold text-gray-900 dark:text-white">
              {price}
            </span>
            {price !== 'Contact us' && <span className="text-gray-500 dark:text-gray-400 text-sm ml-1">/month</span>}
          </div>
          
          <p className="text-gray-600 dark:text-gray-300 text-xs">
            {description}
          </p>
        </div>
        
        {features.length > 0 && <>
            <div className="border-t border-gray-200 dark:border-gray-700 mb-4"></div>
            <div className="text-left flex-1">
              <h4 className="text-sm font-semibold text-gray-900 dark:text-white mb-3">
                What's included:
              </h4>
              <div className="space-y-2.5">
                {features.map((feature, index) => <div key={index} className="flex items-start space-x-2">
                    <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" className="text-green-500 flex-shrink-0 mt-0.5">
                      <path d="M3.11182 8.44444L6.44515 11.7778L14.2229 4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                    </svg>
                    <div className="text-sm text-gray-600 dark:text-gray-300 leading-relaxed">
                      {feature}
                    </div>
                  </div>)}
              </div>
            </div>
          </>}
      </div>
    </CardWrapper>;
};

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

X API v2 gives you programmatic access to X's global conversation—posts, users, spaces, DMs, lists, trends, media, and more. Build apps, analyze data, and create new experiences with powerful, modern endpoints.

***

## Key Features

<CardGroup cols="3">
  <Card title="Rich Data Objects" icon="database" href="/x-api/fundamentals/data-dictionary">
    Access detailed, structured data for posts, users, media, and more with comprehensive field selection.
  </Card>

  <Card title="Advanced Metrics" icon="chart-pie" href="/x-api/fundamentals/metrics">
    Get engagement analytics, real-time metrics, and detailed insights for your data.
  </Card>

  <Card title="Real-time Streams" icon="bolt" href="/x-api/posts/filtered-stream/introduction">
    Subscribe to filtered or sampled streams for live updates and real-time data processing.
  </Card>
</CardGroup>

***

## API Tiers & Pricing

<div className="grid md:grid-cols-3 gap-8 my-8">
  <PricingCard
    title="Free"
    price="$0"
    description="For testing"
    icon="gift"
    features={[
  "1 project",
  "1 app / project",
  "100 posts / month (reads)",
  "500 posts / month (writes)",
  <span><a href="/fundamentals/authentication/guides/log-in-with-x" className="underline">Login with X</a> access</span>,
  "Basic v2 endpoints access"
]}
  />

  <PricingCard
    title="Basic"
    price="$200"
    description="For hobbyists and prototypes"
    icon="star"
    popular={true}
    features={[
  "1 project",
  "2 apps / project",
  "15,000 posts / month (reads)",
  "50,000 posts / month (writes)",
  "Full v2 endpoints access"
]}
  />

  <PricingCard
    title="Pro"
    price="$5,000"
    description="For startups scaling their business"
    icon="rocket"
    features={[
  "1 project",
  "3 apps / project",
  "1,000,000 posts / month (reads)",
  "300,000 posts / month (writes)",
  <span><a href="/x-api/posts/search/introduction#full-archive-search" className="underline">Full-archive search</a> access</span>,
  <span><a href="/x-api/posts/filtered-stream/introduction" className="underline">Filtered stream</a> access</span>,
  "Priority support"
]}
  />
</div>

<div className="text-center mt-8 mb-6">
  <h3 className="text-lg font-semibold justify-center text-gray-900 dark:text-white mb-2">
    Need Enterprise-level access?
  </h3>

  <p className="text-gray-600 dark:text-gray-300 mb-4 max-w-2xl mx-auto">
    For businesses and scaled commercial projects, we offer custom solutions with dedicated support,
    complete streams, backfill capabilities, and custom integrations.
  </p>

  <div className="flex justify-center">
    <Button href="/enterprise/forms/enterprise-api-interest">
      Contact us about Enterprise
    </Button>
  </div>
</div>

***

## Get Started Tools

<CardGroup cols="3">
  <Card title="Client Libraries" icon="screwdriver-wrench" href="/x-api/tools-and-libraries/overview">
    Official and community SDKs for fast integration. Support for TypeScript, Java, Python, and more.

    <br />

    <br />

    [Browse libraries](/x-api/tools-and-libraries/overview)
  </Card>

  <Card title="Postman Collection" icon="book" href="https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400">
    Explore endpoints visually and test requests with our comprehensive Postman collection.

    <br />

    <br />

    [Get started with Postman](https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400)
  </Card>

  <Card title="Sample Code" icon="code" href="https://github.com/xdevplatform">
    Example apps, code samples, and tutorials on GitHub to help you get started quickly.

    <br />

    <br />

    [Get started with our sample code](https://github.com/xdevplatform)
  </Card>
</CardGroup>

***

## Support & Community

<div className="flex space-x-4">
  <Button href="https://developer.x.com/en/support/twitter-api.html">
    Get support
  </Button>

  <Button href="https://devcommunity.x.com/">
    Join the forum
  </Button>
</div>
