Technical Documentation

Twitter Tweet Details API

Extract comprehensive tweet metadata for analytics, moderation, and research

GET /api/twitter/tweet/details | 2026-01-28 | Blog

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.

What's a Tweet ID?

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

Parameter Type Required Description
tweetId string Yes The unique numeric ID of the tweet to retrieve
Example Request HTTP
GET /api/twitter/tweet/details?tweetId=1924684020107116709

Response Structure

The API returns a JSON object containing comprehensive tweet information:

Core Fields

id — Tweet unique identifier
text — Full tweet content
created_at — Tweet creation timestamp
lang — Detected language code

Author Information

author.id — User ID of tweet author
author.username — Author's handle
author.name — Author's display name
author.verified — Verification status

Engagement Metrics

like_count — Number of likes
retweet_count — Number of retweets
reply_count — Number of replies
quote_count — Number of quote tweets

Media & Context

media — Attached images, videos, or GIFs
urls — Expanded URLs in tweet
hashtags — Hashtags used
mentions — Users mentioned

Use 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

JavaScript
// 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

Python
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

Cache responses appropriately

Tweet engagement metrics change over time. Cache for 5-15 minutes for dashboards, longer for historical analysis.

Handle deleted tweets gracefully

Tweets can be deleted at any time. Implement error handling for 404 responses.

Validate tweet IDs

Ensure tweet IDs are valid numeric strings before making API calls.

Respect rate limits

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.

Related APIs