Authentication Type: API Key
Description: Access Twitter data including user profiles, posts, follower counts, verification status, and engagement metrics.
Authentication
To authenticate, you'll need a RapidAPI key for the Twitter API.
Note: The free plan includes 500 requests per month.
Profile Data
Get detailed Twitter user profile information by username.
Get Profile
Retrieve a Twitter user profile including follower count, verification status, bio, location, and other public profile information.
Operation Type: Query (Read)
Parameters:
- username
string(required): Twitter username to retrieve profile for (without @ symbol)
Returns:
- id
string: Twitter user ID - rest_id
string: REST API user ID - is_blue_verified
boolean(nullable): Whether user has Twitter Blue verification - can_dm
boolean(nullable): Whether user can receive direct messages - created_at
string: Account creation date - default_profile_image
boolean(nullable): Whether user has default profile image - description
string(nullable): User bio/description - fast_followers_count
number(nullable): Fast followers count - favourites_count
number(nullable): Number of tweets liked - followers_count
number(nullable): Number of followers - friends_count
number(nullable): Number of accounts following - listed_count
number(nullable): Number of lists user is on - location
string(nullable): User location - media_count
number(nullable): Number of media items - name
string: Display name - screen_name
string: Username/handle - url
string(nullable): User website URL - verified
boolean(nullable): Legacy verification status - birthdate
object(nullable): User birthdate information- day
number(nullable): Birth day - month
number(nullable): Birth month - visibility
string(nullable): Birthdate visibility setting - year_visibility
string(nullable): Year visibility setting
- day
Example Usage:
{
"username": "elonmusk"
}
User Posts
Get Twitter user posts/tweets by user ID.
Get Posts
Retrieve a user's recent tweets including text, engagement metrics, view counts, and conversation data.
Operation Type: Query (Read)
Parameters:
- user
string(required): Twitter user REST ID to retrieve posts for - count
string(required): Number of posts to retrieve (e.g., "20")
Returns:
- tweets
array of objects: Array of tweets- rest_id
string: Tweet REST ID - views
object(nullable): Tweet view information- count
string(nullable): View count for the tweet - state
string(nullable): View state status
- count
- legacy
object(nullable): Tweet legacy data- bookmark_count
number(nullable): Number of bookmarks - bookmarked
boolean(nullable): Whether tweet is bookmarked - created_at
string(nullable): Tweet creation date - conversation_id_str
string(nullable): Conversation ID - favorite_count
number(nullable): Number of likes - favorited
boolean(nullable): Whether tweet is favorited - full_text
string(nullable): Full tweet text - is_quote_status
boolean(nullable): Whether tweet is a quote - lang
string(nullable): Tweet language - quote_count
number(nullable): Number of quotes - reply_count
number(nullable): Number of replies - retweet_count
number(nullable): Number of retweets - retweeted
boolean(nullable): Whether tweet is retweeted - user_id_str
string(nullable): User ID string - id_str
string(nullable): Tweet ID string - in_reply_to_screen_name
string(nullable): Reply to screen name - in_reply_to_status_id_str
string(nullable): Reply to status ID - in_reply_to_user_id_str
string(nullable): Reply to user ID
- bookmark_count
- rest_id
- cursor
object(nullable): Pagination cursor information- bottom
string(nullable): Bottom cursor for pagination - top
string(nullable): Top cursor for pagination
- bottom
Example Usage:
{
"user": "44196397",
"count": "10"
}
Search Tweets
Search Twitter for tweets matching a query. Returns tweet URLs, text, media links, and engagement metrics. Supports filtering by type (Top, Latest, People, Media, Lists).
Operation Type: Mutation (Write)
Parameters:
- query
string(required): Search query - keywords, hashtags, or phrases - type
string(default: "Top"): Search type - "Top", "Latest", "People", "Media", or "Lists" - count
number(default: 20): Number of results to return - cursor
string(nullable): Pagination cursor from previous response
Returns:
- results
array of objects: Array of matching tweets- url
string: URL to the tweet - username
string: Twitter handle of the author - text
string(nullable): Tweet text content - mediaLinks
array of strings(nullable): URLs to media attachments (images, videos) - engagement
object: Engagement metrics- views
number(nullable): Number of views - likes
number(nullable): Number of likes - retweets
number(nullable): Number of retweets - replies
number(nullable): Number of replies - bookmarks
number(nullable): Number of bookmarks
- views
- createdAt
string(nullable): Tweet creation timestamp
- url
- cursor
string(nullable): Cursor for fetching the next page of results
Example Usage:
{
"query": "artificial intelligence",
"type": "Latest",
"count": 20
}
Common Use Cases
Profile Analysis:
- Analyze user engagement patterns and follower growth
- Track verification status and account authenticity
- Research user demographics and interests
Content Monitoring:
- Track tweet performance and engagement metrics
- Monitor user posting patterns and frequency
- Analyze tweet content and conversation threads
- Search for tweets mentioning your brand or competitors
Social Media Research:
- Study user behavior and engagement on Twitter
- Analyze tweet performance across different topics
- Track user influence and reach metrics
- Search for trending topics and conversations
Trend Analysis:
- Search for tweets about specific topics or hashtags
- Monitor real-time discussions and breaking news
- Track sentiment around products, events, or brands
- Discover influencers and thought leaders in your industry