X (Twitter)
X (formerly Twitter) is a social media platform providing APIs for accessing and integrating with posts, users, spaces, direct messages, lists, media, trends, and real-time streaming data. The X API enables developers to build applications that read and write X data, manage advertising campaigns, and subscribe to real-time activity events. Available through pay-per-use credit-based pricing with enterprise options for high-volume access.
3 APIs
12 Features
Social MediaMicrobloggingReal-Time DataStreamingAdvertisingContent
Post Management
Create, delete, edit, repost, quote, like, and bookmark posts programmatically.
Real-Time Streaming
Access filtered streams, sampled streams, firehose, and language-specific streams for real-time post data.
Full-Archive Search
Search the complete archive of public posts with advanced query operators and date filtering.
User Lookup and Management
Look up users by ID or username, manage follows, blocks, mutes, and retrieve user metrics.
Spaces
Discover and look up live audio Spaces with host, speaker, and listener data.
Direct Messages
Send and receive direct messages, create conversations, and manage participants.
Lists
Create, manage, and query lists including membership, followers, and pinned lists.
Trends
Access personalized and geographic trending topics.
Media Upload
Upload images, videos, and large files using chunked upload with metadata and subtitle support.
Compliance
Access compliance streams and batch jobs for data deletion and user protection events.
Communities and Community Notes
Access community data and community notes for collaborative fact-checking.
Ad Campaign Management
Programmatically create, schedule, and manage advertising campaigns with targeting and budget controls.
Social Listening
Monitor brand mentions, sentiment, and conversations in real-time using filtered streams and search endpoints.
Content Publishing
Automate post creation, scheduling, and thread publishing for social media management platforms.
Analytics and Reporting
Retrieve post metrics, user engagement data, and campaign performance for business intelligence.
Bot Development
Build automated accounts that respond to mentions, post updates, or provide customer service.
Research and Academic Analysis
Access full-archive search and streaming data for social media research and trend analysis.
Advertising Automation
Programmatically manage ad campaigns, audiences, creatives, and bidding strategies at scale.
Real-Time Event Monitoring
Track live events, breaking news, and trending topics with streaming APIs and trend endpoints.
Community Management
Manage followers, lists, and direct messages for community engagement and moderation.
aid: twitter
name: X (Twitter)
description: >-
X (formerly Twitter) is a social media platform providing APIs for accessing and integrating with posts, users,
spaces, direct messages, lists, media, trends, and real-time streaming data. The X API enables developers to build
applications that read and write X data, manage advertising campaigns, and subscribe to real-time activity events.
Available through pay-per-use credit-based pricing with enterprise options for high-volume access.
type: Index
image: https://abs.twimg.com/favicons/twitter.ico
url: https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/apis.yml
created: '2025-07-29'
modified: '2026-05-19'
specificationVersion: '0.19'
tags:
- Social Media
- Microblogging
- Real-Time Data
- Streaming
- Advertising
- Content
apis:
- aid: twitter:x-api
name: X API
description: >-
The core X API providing programmatic access to posts, users, spaces, lists, direct messages, bookmarks, likes,
reposts, follows, blocks, mutes, trends, communities, and compliance data. Supports post creation, search (recent
and full-archive), timelines, filtered streams, sampled streams, and real-time data access. Uses OAuth 2.0 with
PKCE or OAuth 1.0a authentication with credit-based pay-per-use pricing.
image: https://abs.twimg.com/favicons/twitter.ico
humanURL: https://docs.x.com/x-api
baseURL: https://api.x.com/2
properties:
- type: Documentation
url: https://docs.x.com/x-api
- type: GettingStarted
url: https://docs.x.com/x-api/getting-started/make-your-first-request
- type: APIReference
url: https://docs.x.com/x-api
- type: Authentication
url: https://docs.x.com/resources/fundamentals/authentication
- type: RateLimits
url: https://docs.x.com/x-api/fundamentals/rate-limits
- type: SDK
url: https://docs.x.com/sdks-and-tools/python-xdk
title: Python XDK
- type: SDK
url: https://docs.x.com/sdks-and-tools/typescript-xdk
title: TypeScript XDK
- type: OpenAPI
url: openapi/x-api-openapi.json
tags:
- Posts
- Users
- Spaces
- Lists
- Direct Messages
- Streaming
- Search
- Timelines
- aid: twitter:x-ads-api
name: X Ads API
description: >-
The X Ads API enables programmatic management of advertising campaigns on the X platform including campaign
creation and scheduling, custom audience building, creative management (draft posts, cards, media), and analytics
retrieval for campaign performance metrics. Supports both synchronous and asynchronous analytics endpoints for
reporting.
image: https://abs.twimg.com/favicons/twitter.ico
humanURL: https://docs.x.com/x-ads-api
baseURL: https://ads-api.x.com
properties:
- type: Documentation
url: https://docs.x.com/x-ads-api
- type: GettingStarted
url: https://docs.x.com/x-ads-api/getting-started/create-a-campaign
- type: RateLimits
url: https://docs.x.com/x-ads-api/fundamentals/rate-limiting
- type: PostmanCollection
url: postman/x-ads-api-postman-collection.json
tags:
- Advertising
- Campaigns
- Analytics
- Audiences
- Creatives
- aid: twitter:x-activity-api
name: X Activity API
description: >-
The X Activity API provides real-time activity event subscriptions with sub-second delivery via streaming or
webhooks. Subscribe to profile updates, follows, likes, reposts, and other user activity events. Recently exited
beta and is now generally available.
image: https://abs.twimg.com/favicons/twitter.ico
humanURL: https://docs.x.com/x-activity-api
baseURL: https://api.x.com
properties:
- type: Documentation
url: https://docs.x.com/x-activity-api
tags:
- Activity
- Events
- Real-Time
- Streaming
- Webhooks
common:
- type: ArazzoWorkflows
url: arazzo/
workflows:
- url: arazzo/twitter-bookmark-and-remove-workflow.yml
name: X Search, Bookmark a Post, Then Remove the Bookmark
summary: Find a post by search, bookmark it, then delete that bookmark.
- url: arazzo/twitter-create-list-add-member-workflow.yml
name: X Create a List and Add a Member by Username
summary: Create a new List, resolve a member handle, and add them to the List.
- url: arazzo/twitter-follow-list-by-id-workflow.yml
name: X Confirm a List and Follow It
summary: Read a List by id to confirm it exists, then follow that List.
- url: arazzo/twitter-follow-user-by-username-workflow.yml
name: X Follow a User by Their Username
summary: Resolve a target handle to an id, then follow that user.
- url: arazzo/twitter-followers-of-handle-workflow.yml
name: X List the Followers of a Handle
summary: Resolve a username to an id, then page that user's followers.
- url: arazzo/twitter-liked-posts-of-handle-workflow.yml
name: X List the Posts a Handle Has Liked
summary: Resolve a username to an id, then fetch that user's liked posts.
- url: arazzo/twitter-list-detail-and-members-workflow.yml
name: X Fetch a List's Details and Its Members
summary: Read a List by id, then page the members of that List.
- url: arazzo/twitter-mentions-of-handle-workflow.yml
name: X List the Posts Mentioning a Handle
summary: Resolve a username to an id, then fetch posts that mention that user.
- url: arazzo/twitter-mute-user-by-username-workflow.yml
name: X Mute a User by Their Username
summary: Resolve a target handle to an id, then mute that user.
- url: arazzo/twitter-pin-owned-list-workflow.yml
name: X Pin the Authenticated User's First Owned List
summary: List the owned Lists, then pin the first one to the user's profile.
- url: arazzo/twitter-post-engagement-audit-workflow.yml
name: X Audit Engagement on a User's Latest Post
summary: Resolve a handle, get their latest post, then list who liked it.
- url: arazzo/twitter-post-like-cleanup-workflow.yml
name: X Create a Post, Like It, Then Delete It
summary: Publish a post, like it from the authenticated account, then remove it.
- url: arazzo/twitter-quote-post-from-search-workflow.yml
name: X Quote a Post Found by Search
summary: Search recent posts, then publish a quote post of the top match.
- url: arazzo/twitter-reply-to-latest-post-workflow.yml
name: X Reply to a User's Latest Post
summary: Resolve a handle, fetch their latest post, then reply to it.
- url: arazzo/twitter-repost-then-undo-workflow.yml
name: X Find a Post, Repost It, Then Undo the Repost
summary: Search for a post, repost the top match, then remove the repost.
- url: arazzo/twitter-reposters-of-latest-post-workflow.yml
name: X List Who Reposted a Handle's Latest Post
summary: Resolve a handle, get their latest post, then list who reposted it.
- url: arazzo/twitter-search-recent-get-details-workflow.yml
name: X Search Recent Posts and Hydrate the Top Match
summary: Run a recent search, then fetch full details for the first matching post.
- url: arazzo/twitter-unfollow-user-by-username-workflow.yml
name: X Unfollow a User by Their Username
summary: Resolve a target handle to an id, then unfollow that user.
- url: arazzo/twitter-user-lookup-recent-posts-workflow.yml
name: X Resolve User and List Their Recent Posts
summary: Look up a user by username, then pull their most recent posts.
- type: LinkedIn
url: https://www.linkedin.com/company/x-corp
- type: Portal
url: https://developer.x.com/en/portal/dashboard
- type: GettingStarted
url: https://docs.x.com/x-api/getting-started/make-your-first-request
- type: Console
url: https://developer.x.com/en/portal/dashboard
- type: SignUp
url: https://developer.x.com/en/portal/petition/essential/basic-info
- type: Authentication
url: https://docs.x.com/resources/fundamentals/authentication
- type: SDK
url: https://docs.x.com/sdks-and-tools/python-xdk
title: Python XDK
- type: SDK
url: https://docs.x.com/sdks-and-tools/typescript-xdk
title: TypeScript XDK
- type: CLI
url: https://docs.x.com/sdks-and-tools/xurl
title: xurl
- type: Pricing
url: https://developer.x.com/en/portal/petition/essential/basic-info
- type: TermsOfService
url: https://developer.x.com/en/developer-terms/agreement-and-policy
- type: PrivacyPolicy
url: https://x.com/en/privacy
- type: StatusPage
url: https://api.twitterstat.us/
- type: Support
url: https://devcommunity.x.com/
- type: Blog
url: https://blog.x.com/developer
- type: ReleaseNotes
url: https://docs.x.com/changelog
- type: GitHubOrganization
url: https://github.com/xdevplatform
- type: GitHubRepository
url: https://github.com/xdevplatform/xdk-python
description: Auto-generated Python SDK for the X API.
- type: GitHubRepository
url: https://github.com/xdevplatform/xdk-typescript
description: Auto-generated TypeScript SDK for the X API.
- type: GitHubRepository
url: https://github.com/xdevplatform/xurl
description: Official CLI for the X API with built-in authentication.
- type: GitHubRepository
url: https://github.com/xdevplatform/xdk
description: SDK generator for the X APIs producing auto-generated client libraries.
- type: GitHubRepository
url: https://github.com/xdevplatform/twitter-api-java-sdk
description: Official Java SDK for the Twitter/X API.
- type: GitHubRepository
url: https://github.com/xdevplatform/twitter-ruby-ads-sdk
description: Official Ruby SDK for the Twitter/X Ads API.
- type: Tools
url: https://github.com/xdevplatform/xmcp
description: MCP server for the X API enabling AI agent integration.
- type: Sandbox
url: https://github.com/xdevplatform/playground
description: Standalone local HTTP server simulating the X API v2 for testing and development with interactive web UI.
- type: CodeExamples
url: https://github.com/xdevplatform/samples
description: Official sample code for X API v2 endpoints.
- type: CodeExamples
url: https://github.com/xdevplatform/xchat-bot-python
description: Example DM reply bot in Python for X encrypted chat system.
- type: PostmanWorkspace
url: https://docs.x.com/sdks-and-tools/postman
- type: PostmanCollection
url: postman/x-api-v2-postman-collection.json
- type: X
url: https://x.com/XDevelopers
- type: Features
data:
- name: Post Management
description: Create, delete, edit, repost, quote, like, and bookmark posts programmatically.
- name: Real-Time Streaming
description: Access filtered streams, sampled streams, firehose, and language-specific streams for real-time post data.
- name: Full-Archive Search
description: Search the complete archive of public posts with advanced query operators and date filtering.
- name: User Lookup and Management
description: Look up users by ID or username, manage follows, blocks, mutes, and retrieve user metrics.
- name: Spaces
description: Discover and look up live audio Spaces with host, speaker, and listener data.
- name: Direct Messages
description: Send and receive direct messages, create conversations, and manage participants.
- name: Lists
description: Create, manage, and query lists including membership, followers, and pinned lists.
- name: Trends
description: Access personalized and geographic trending topics.
- name: Media Upload
description: Upload images, videos, and large files using chunked upload with metadata and subtitle support.
- name: Compliance
description: Access compliance streams and batch jobs for data deletion and user protection events.
- name: Communities and Community Notes
description: Access community data and community notes for collaborative fact-checking.
- name: Ad Campaign Management
description: Programmatically create, schedule, and manage advertising campaigns with targeting and budget controls.
- type: UseCases
data:
- name: Social Listening
description: Monitor brand mentions, sentiment, and conversations in real-time using filtered streams and search endpoints.
- name: Content Publishing
description: Automate post creation, scheduling, and thread publishing for social media management platforms.
- name: Analytics and Reporting
description: Retrieve post metrics, user engagement data, and campaign performance for business intelligence.
- name: Bot Development
description: Build automated accounts that respond to mentions, post updates, or provide customer service.
- name: Research and Academic Analysis
description: Access full-archive search and streaming data for social media research and trend analysis.
- name: Advertising Automation
description: Programmatically manage ad campaigns, audiences, creatives, and bidding strategies at scale.
- name: Real-Time Event Monitoring
description: Track live events, breaking news, and trending topics with streaming APIs and trend endpoints.
- name: Community Management
description: Manage followers, lists, and direct messages for community engagement and moderation.
- type: Integrations
data:
- name: Postman
description: Official Postman collections for exploring and testing X API endpoints interactively.
- name: MCP Servers
description: Integration with AI tools and agents through Model Context Protocol servers.
- name: Webhook Delivery
description: Real-time event delivery via webhooks for the Activity API.
- type: Solutions
data:
- name: X API Pay-Per-Use
description: Credit-based pricing with no commitments. Pay only for what you use with access to core X API endpoints.
- name: X API Enterprise
description: High-volume access with custom rate limits, dedicated account management, full firehose, and premium support.
- name: X Ads API
description: Advertising platform API for campaign management, audience targeting, creative management, and analytics.
maintainers:
- FN: Kin Lane
email: [email protected]