JUHE API Marketplace
API Service

Twitter Data

Retrieves detailed analytics for any public tweet, returning view counts, likes, retweets, and engagement metrics.

99.9%
Uptime
32ms
Avg Response
10K+
Daily Requests
Twitter Data Response
1{
2 "code": "0",
3 "msg": "success",
4 "data": {
5 "tweet_id": "1924684020107116709",
6 "creation_date": "Tue May 20 04: 30: 03 +0000 2025",
7 "text": "🚨 BREAKING: xAI just received 168 Tesla Megapacks...",
8 "media_url": [
9 "https://pbs.twimg.com/media/GrXZ6jybAAUjWPA.jpg"
10 ],
11 "video_url": null,
12 "user": {
13 "user_id": "1016059981907386368",
14 "username": "teslaownersSV",
15 "name": "Tesla Owners Silicon Valley",
16 "follower_count": 1192938
17 },
18 "language": "en",
19 "favorite_count": 2377,
20 "retweet_count": 343,
21 "reply_count": 460,
22 "quote_count": 123,
23 "retweet": false,
24 "views": 16026299,
25 "timestamp": 1747715403,
26 "video_view_count": null,
27 "in_reply_to_status_id": null,
28 "quoted_status_id": "1924585055365611799",
29 "expanded_url": "https://x.com/teslaownersSV/status/1924684020107116709/photo/1"
30 }
31}
JSON31 lines

API Introduction

About This API

The Twitter Data API is a service designed to retrieve detailed, public information about X (formerly Twitter) user profiles and individual tweets. It provides two primary functions: a user-centric query to fetch comprehensive profile data using a username or user ID, and a tweet-centric query to obtain specific details and engagement metrics for any given tweet ID. The API delivers all data in a structured JSON format, making it straightforward for developers to integrate real-time social data into their applications, dashboards, and analytical workflows.

Key Features

  • Comprehensive User Profiles: Retrieve in-depth user account information, including follower and following counts, tweet count, account creation date, verification status (blue checkmark), profile pictures, and banner URLs.
  • Detailed Tweet Analytics: Get precise engagement metrics for any public tweet, such as the number of views, likes (favorite_count), retweets, replies, and quote tweets.
  • Media Extraction: Extract direct URLs for media (images) and videos attached to tweets, allowing for easy display or archiving of visual content.
  • Flexible Lookups: Query user data with either a username or a user_id, providing flexibility in how you identify and retrieve profile information.
  • Author Information: Each tweet detail request includes a nested user object, providing key information about the tweet's author, such as their username and follower count.

Use Cases

Scenario 1: Building a Brand Campaign Monitor

  • Situation: A marketing agency needs to track the real-time performance of a specific promotional tweet sent out by a client.
  • Implementation: The agency's internal dashboard takes the tweet_id of the promotional tweet. It then periodically calls the /x/v1/tweet_details endpoint to fetch the latest engagement numbers, specifically monitoring the views, favorite_count, and retweet_count to measure the campaign's reach and impact.

Scenario 2: Creating an Influencer Vetting Tool

  • Situation: A brand wants to quickly assess the authenticity and history of potential influencers before starting a collaboration.
  • Implementation: An analyst enters an influencer's X username into the tool. The backend calls the /x/v1/user_details endpoint to retrieve key profile metrics like follower_count, account creation_date, number_of_tweets, and verification status. This data provides a quick, data-driven snapshot to help validate the influencer's credibility.

Scenario 3: Powering a Social Media Archiving Service

  • Situation: A research organization or news outlet needs to archive significant tweets related to breaking news events for historical records.
  • Implementation: When a noteworthy tweet is identified, its tweet_id is logged. The service's backend then calls the /x/v1/tweet_details endpoint to get a complete, structured snapshot of the tweet's content (text), media (media_url), and engagement stats at that moment. It also calls /x/v1/user_details using the author's user_id to archive the profile data of the person who posted it.

How it Works: Endpoints & Response

The API operates with two distinct endpoints for retrieving user and tweet data. A valid apikey is required for all requests.

User Endpoint: GET /x/v1/user_details By providing a username or user_id parameter, this endpoint returns a single JSON object. This object contains a data key with a comprehensive set of user profile attributes, including their follower stats, profile text, banner URLs, and verification status.

Tweet Endpoint: GET /x/v1/tweet_details By providing a tweet_id parameter, this endpoint returns a JSON object containing detailed information about that specific tweet. The data object includes the tweet's text content, creation date, all engagement counts (views, retweets, etc.), and any associated media URLs.

Quick Actions

Pricing

FREE
Get Started with 100 requests
No Credit Card Required

Key Features

Real-time Processing
High Accuracy
Low Latency
Scalable Infrastructure