Skip to main content
All job types use the /api/v1/search/live POST endpoint and follow the same structure: a top-level type to define the data source, and a set of arguments defining the parameters of the job.

Tweet Search

Search tweets using Twitter query syntax

User Profiles

Get user profile information and timelines

Tweet Interactions

Get replies, retweets, and specific tweets by ID

Social Networks

Get followers, following, and trending topics

Media Content

Extract media from tweets and profiles

Trending Topics

Discover trending topics and hashtags

Overview

The Twitter API provides comprehensive access to Twitter data including tweets, user profiles, social networks, and trending content. It supports multiple authentication methods and offers extensive search and interaction capabilities.

twitter

The primary job type for Twitter data extraction, automatically using the best available authentication method. Use Cases:
  • Social media monitoring and analysis
  • Content discovery and research
  • User engagement analysis
  • Trend monitoring and hashtag tracking
  • Media content extraction
  • Social network analysis

Parameters

Common Parameters

Query Types

  • Search Queries: Use Twitter search syntax for finding tweets
  • Usernames: Use @username format for user-specific operations
  • Tweet IDs: Use numeric IDs for specific tweet operations
  • User IDs: Use numeric IDs for user profile operations

Capabilities

Tweet Operations

Profile Operations

Special Operations

Examples

Tweet Search Operations

Advanced Tweet Search with Time Filters

Historical Tweet Search (Elevated API)

Get Specific Tweet

Get Tweet Replies

Get Tweet Retweeters

Get User Timeline

Get Media from Tweets

Profile Operations

Get User Profile by Username

Get User Profile by ID

Get User Followers

Get User Following

Special Operations

Get Twitter Space

Use Case Examples

Social Media Monitoring

Monitor mentions and hashtags:

Competitor Analysis

Analyze competitor mentions:

Influencer Research

Research user engagement:

Content Discovery

Find viral content:

Best Practices

1. Query Optimization

  • Use specific keywords and hashtags for targeted results
  • Combine multiple terms with OR/AND operators
  • Use quotes for exact phrase matching
  • Include relevant filters (lang:, from:, etc.)

2. Rate Limiting

  • Be mindful of API rate limits
  • Use appropriate max_results values
  • Implement pagination with next_cursor
  • Cache results when possible

3. Time Filtering

  • Use start_time and end_time for historical data
  • Consider timezone implications
  • Use ISO 8601 format for timestamps

4. Result Management

  • Set appropriate max_results based on your needs
  • Use pagination for large result sets
  • Consider the cost of high-volume requests

Response Data

The Twitter API returns structured data including:

Tweet Data

  • Content: Tweet text, media, links
  • Metadata: Timestamps, engagement metrics
  • User Info: Author details and verification status
  • Interactions: Reply, retweet, like counts

Profile Data

  • Basic Info: Username, display name, bio
  • Metrics: Follower count, following count, tweet count
  • Verification: Account verification status
  • Media: Profile and banner images

Social Network Data

  • Followers: User profiles of followers
  • Following: User profiles being followed
  • Engagement: Interaction patterns and metrics

Limitations

  • Maximum 1000 results per request (max_results limit)
  • Historical search requires elevated API access
  • Some data may be limited by privacy settings
  • Rate limiting applies to prevent excessive API usage
  • Real-time data availability may vary

Error Handling

Common Error Scenarios

Invalid Query Format

Ensure queries follow Twitter search syntax:
  • Use proper operators (OR, AND, NOT)
  • Quote phrases that need exact matching
  • Use valid hashtag and mention formats

Exceeding Limits

  • max_results cannot exceed 1000
  • count cannot exceed 1000
  • Large requests may be rate limited

Missing Required Parameters

  • type is required for all operations
  • query is required for most operations (except gettrends)

Authentication Issues

  • Some capabilities require specific authentication methods
  • Elevated API access needed for historical search
  • Rate limits vary by authentication type

Notes

  • All timestamps use ISO 8601 format
  • Pagination is supported via next_cursor parameter
  • Search results are returned in reverse chronological order
  • Media URLs may have expiration times
  • Some capabilities may require specific API access levels