Twitter / X Data API
The unofficial Twitter / X API gives developers access to rich public social data through Rapid2-backed endpoints for user info, timelines, followers, tweet metadata, trends, search, lists, communities, and Spaces. Build monitoring, analytics, customer engagement, and trend tracking workflows through a single REST API.
30
Endpoints
1
API group
99.9%
Uptime SLA
<500ms
Avg latency
What You Can Do With The Twitter / X API
30 endpoints in OpenAPI order. All returning clean, structured JSON.
Rapid2-backed Twitter / X endpoints in the same order as the OpenAPI definition and the APIs navigation menu.
User Info
Retrieve detailed Twitter / X user information, including bio, location, avatar, verification status, profile counts, affiliates, and rest ID.
User Timeline
Fetch the most recent posts from a user's Twitter / X timeline with cursor-based pagination.
Following
Access the list of accounts a Twitter / X user follows, with cursor support for paging through the social graph.
Followers
Access the list of accounts following a Twitter / X user, with optional filtering for blue verified followers.
Tweet Info
Get detailed metadata for a specific tweet, including content, author information, engagement counts, and related tweet fields.
Affiliates
Analyze a user's affiliated or associated Twitter / X accounts and relationships.
User's Media
Retrieve media posts from a Twitter / X user, including images, videos, GIFs, and related tweet metadata.
Retweets
Access a paginated list of accounts and posts associated with retweets of a specific tweet.
Trends
Explore trending topics for a selected country and use them for monitoring, discovery, and market analysis.
Search
Search Twitter / X content using keywords, hashtags, or advanced queries, with support for cursor-based pagination and search type selection.
Check Retweet
Verify whether a specific Twitter / X user has retweeted a target tweet.
User Replies
Collect replies posted by a Twitter / X user with cursor-based pagination.
Tweet Thread
Retrieve the full thread for a Twitter / X conversation, including connected tweets and pagination for longer threads.
Latest Replies
Collect the latest replies to a specific tweet for conversation tracking and response analysis.
Check Follow
Determine whether one Twitter / X user follows another account.
List Timeline
Retrieve the timeline for a Twitter / X List, including posts from list members and pagination cursors.
Community Info
Access metadata for a Twitter / X Community, including community profile details.
Inspiration Posts
Explore inspiration posts by country, period, and type to discover high-performing Twitter / X content.
User Live
Check live broadcast information for a Twitter / X user by rest ID.
About Profile
Retrieve extended profile information for a Twitter / X user, including the account description and related profile metadata.
Community Members
Retrieve members of a Twitter / X Community with cursor-based pagination.
Jobs Search
Search Twitter / X jobs using a keyword query.
Communities Posts Search Latest
Search latest posts from Twitter / X Communities by keyword.
Communities Posts Search Top
Search top posts from Twitter / X Communities by keyword.
Communities Search
Search Twitter / X Communities by keyword and page through matching communities.
Profiles By Rest IDs
Retrieve multiple user profiles from internal Twitter / X rest IDs in a single request.
Community Posts
Explore posts from a Twitter / X Community timeline, with ranking and cursor options.
List Followers
Access the followers of a Twitter / X List with cursor-based pagination.
List Members
Access the members of a Twitter / X List with cursor-based pagination.
Spaces Info
Access details about a live audio Space on Twitter / X, including metadata useful for monitoring live discussions.
Twitter / X API Quick Start Guide
Call Rapid2-backed Twitter / X endpoints for current user, tweet, trend, list, community, and Space data.
curl --request GET \ --url 'https://api.keyapi.ai/v1/twitter/screenname?screenname=elonmusk' \ --header 'Authorization: Bearer YOUR_API_KEY'
{
"code": 0,
"message": "success",
"data": {
"profile": "elonmusk",
"rest_id": "44196397",
"blue_verified": true,
"name": "Elon Musk",
"friends": 1325,
"sub_count": 239947098,
"statuses_count": 102410,
"media_count": 4487
}
}Why Choose KeyAPI Twitter / X API
Built for scale, reliability, and developer experience.
User Info & Social Graph
Retrieve profile details, bios, locations, avatars, rest IDs, timelines, followers, following lists, affiliates, user media, replies, and follow checks.
Tweet Metadata & Threads
Get tweet info, retweets, retweet checks, full tweet threads, and latest replies for conversation analytics and content monitoring.
Trends & Search
Explore trends by country, search tweets with keywords or hashtags, discover inspiration posts, and query jobs data.
Lists & Communities
Access list timelines, followers, members, community info, community members, community timelines, and top or latest community posts.
Profiles By Rest IDs
Resolve multiple internal Twitter / X identifiers into profiles for enrichment, deduplication, and data pipeline joins.
Spaces Metadata
Retrieve live audio Space details for event monitoring, social listening, and real-time discussion workflows.
Twitter / X API Use Cases
Trend Tracking
Monitor trending topics, hashtags, inspiration posts, and search results for fast-moving market or news signals.
Conversation Analytics
Pull tweet threads, latest replies, retweets, and user replies to understand public discussion and engagement patterns.
Social Media Analytics
Combine user info, timelines, media, followers, following, and tweet metadata for dashboards and AI pipelines.
Customer Engagement
Track profiles, check relationships, analyze community activity, and surface relevant accounts for outreach workflows.
Frequently Asked Questions
Is the Twitter / X API official?
No, KeyAPI provides an unofficial Twitter / X API that lets you access Twitter / X data through our platform. We handle the complexities of data collection so you can focus on building your application.
How current is the data?
We provide real-time data from Twitter / X. When you make a request, we fetch the latest information available.
How do credits work?
Each API endpoint consumes credits. Most endpoints cost just 1 credit. All pricing is transparent in our API documentation with no hidden fees.
Can I use this for AI model training?
Yes. KeyAPI provides structured, AI-ready data ideal for training datasets, fine-tuning LLMs, and building AI pipelines. Our historical archives are particularly valuable for large-scale training workloads.
Ready to unlock unified
social intelligence?
Register today and receive 100 free API calls to test our infrastructure.
Join the growing community of developers, AI builders, automation engineers, and global businesses who trust KeyAPI for reliable, scalable social media data access.