Twitter Tweet Details API
Extract comprehensive tweet metadata for analytics, moderation, and research
Overview
The Tweet Details API retrieves comprehensive information about a specific tweet using its unique tweet ID. This endpoint is essential for applications that need to enrich analytics dashboards, power moderation workflows, or attach tweet context to customer records.
A tweet ID is a numeric string that uniquely identifies every tweet on the platform.
You can find it in the tweet URL: twitter.com/user/status/1234567890
Key Capabilities
- Tweet Metadata — Retrieve key fields including text, author, timestamps, and media
- Engagement Metrics — Access likes, retweets, replies, and quote counts
- Fast Lookup — Single request returns complete tweet data in JSON format
- Integration Ready — Optimized for dashboards, CRMs, and automated pipelines
Request Parameters
tweetId string Yes The unique numeric ID of the tweet to retrieve GET /api/twitter/tweet/details?tweetId=1924684020107116709 Response Structure
The API returns a JSON object containing comprehensive tweet information:
Core Fields
id — Tweet unique identifiertext — Full tweet contentcreated_at — Tweet creation timestamplang — Detected language codeAuthor Information
author.id — User ID of tweet authorauthor.username — Author's handleauthor.name — Author's display nameauthor.verified — Verification statusEngagement Metrics
like_count — Number of likesretweet_count — Number of retweetsreply_count — Number of repliesquote_count — Number of quote tweetsMedia & Context
media — Attached images, videos, or GIFsurls — Expanded URLs in tweethashtags — Hashtags usedmentions — Users mentionedUse Cases
Content Analytics
Enrich analytics dashboards with tweet-level metadata. Track engagement metrics over time, analyze content performance, and generate reports on social media impact.
- Dashboard widgets for tweet performance
- Historical engagement tracking
- Content ROI analysis
Content Moderation
Power moderation workflows by investigating flagged content. Retrieve full context including engagement signals and author information for informed decisions.
- Review flagged tweets in context
- Assess engagement patterns
- Verify author credentials
Social CRM
Attach tweet details to customer records. When customers mention your brand or submit support requests via Twitter, capture the full conversation context.
- Link tweets to support tickets
- Capture customer sentiment
- Build interaction history
Research & Monitoring
Support qualitative and quantitative research workflows. Monitor important posts from key accounts, track viral content, and analyze conversation dynamics.
- Academic research projects
- Competitor monitoring
- Trend analysis
Implementation Examples
Basic Tweet Lookup
// Fetch tweet details by ID
async function getTweetDetails(tweetId) {
const response = await fetch(
`https://api.example.com/api/twitter/tweet/details?tweetId=${tweetId}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
return data;
}
// Example usage
const tweet = await getTweetDetails('1924684020107116709');
console.log(tweet.text);
console.log(`Likes: ${tweet.like_count}`); Analytics Integration
import requests
def enrich_analytics_event(tweet_id):
"""Fetch tweet data for analytics dashboard"""
response = requests.get(
f"https://api.example.com/api/twitter/tweet/details",
params={"tweetId": tweet_id},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
tweet = response.json()
return {
"tweet_id": tweet["id"],
"engagement_rate": calculate_engagement(tweet),
"author_followers": tweet["author"]["followers_count"],
"content_type": detect_content_type(tweet),
"timestamp": tweet["created_at"]
}
def calculate_engagement(tweet):
total = tweet["like_count"] + tweet["retweet_count"] + tweet["reply_count"]
return total / max(tweet["author"]["followers_count"], 1) * 100 Best Practices
Tweet engagement metrics change over time. Cache for 5-15 minutes for dashboards, longer for historical analysis.
Tweets can be deleted at any time. Implement error handling for 404 responses.
Ensure tweet IDs are valid numeric strings before making API calls.
Batch lookups when possible and implement exponential backoff for retries.
Try the API
Test with real tweet data using our interactive demo. No credit card required to start.