For Agents
Post tweets, search conversations, stream real-time content, and manage user interactions on Twitter. Supports 109 endpoints covering tweets, DMs, lists, communities, and Spaces.
Get started with Twitter API v2 in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"search recent tweets about a topic"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Twitter API v2 API.
Search historical and recent tweets by keyword, hashtag, or user mention with boolean operators
Stream real-time tweets matching filter rules via persistent HTTP connections
Send and retrieve direct messages across conversations with specific participants
Look up user profiles, followers, and following relationships by ID or username
GET STARTED
Use for: I need to post a tweet with an image attachment, Search for recent tweets mentioning a specific brand, I want to set up a real-time stream for tweets matching specific keywords, Retrieve the follower list for a given Twitter user
Not supported: Does not handle ad campaigns, analytics dashboards, or audience insights — use for tweet content, user data, and messaging only.
Access and interact with posts, users, direct messages, communities, lists, and Spaces on the Twitter platform through 109 endpoints. Supports full-text search across historical and recent tweets, real-time filtered streams, and compliance data feeds. Provides community management, user relationship lookups, and engagement actions including likes and bookmarks.
Create, delete, and quote tweets with media attachments and polls
Browse and search Twitter Communities and their member posts
Retrieve trending topics by geographic location (WOEID)
Patterns agents use Twitter API v2 API for, with concrete tasks.
★ AI Agent Social Monitoring
An AI agent searches for tweets mentioning a brand or topic using the /2/tweets/search/recent endpoint, analyzes sentiment and volume, and triggers alerts when engagement spikes. Through Jentic, the agent discovers the search endpoint by intent, loads the query schema, and executes searches without manual API setup. Handles up to 450 requests per 15-minute window on the standard tier.
Search for tweets mentioning '@acme' posted in the last 24 hours using /2/tweets/search/recent and return the 10 most engaged results sorted by retweet count
Real-Time Content Streaming
Filter and receive tweets in real time matching specific rules — keywords, user handles, geographic locations, or conversation threads. The /2/tweets/search/stream endpoint delivers a persistent HTTP stream of matching tweets within seconds of posting. Supports up to 25 concurrent rules on the basic access level and 1,000 rules on academic research access.
Add a filter rule for tweets containing 'artificial intelligence' with language:en to /2/tweets/search/stream/rules and open the stream connection
Community Engagement Analysis
Retrieve posts, members, and metadata from Twitter Communities using /2/communities/{id} and /2/communities/search. Analyze engagement patterns within niche communities to identify influential voices and trending discussion topics. Supports pagination through community member lists and post timelines.
Search for Twitter Communities matching 'machine learning' via /2/communities/search and retrieve the top community's member count and recent posts
Automated Direct Messaging
Send direct messages to users, retrieve conversation histories, and monitor DM events through the /2/dm_conversations endpoints. Supports creating new conversations, sending messages to existing threads, and listing DM events with pagination. Enables customer support bots and notification workflows that communicate privately with users.
Send a direct message 'Your order has shipped!' to participant_id 12345 via POST /2/dm_conversations/with/{participant_id}/messages
Tweet Publishing and Thread Creation
Publish tweets, create multi-tweet threads, and attach media including images, videos, and polls via POST /2/tweets. Supports reply threading by setting in_reply_to_tweet_id, quote tweets, and scheduled content workflows. Media uploads use the /2/media/upload endpoint with chunked transfer for large files.
Create a tweet thread by posting an initial tweet via POST /2/tweets and replying to it with a second tweet using in_reply_to_tweet_id
109 endpoints — access and interact with posts, users, direct messages, communities, lists, and spaces on the twitter platform through 109 endpoints.
METHOD
PATH
DESCRIPTION
/2/tweets
Create a new tweet
/2/tweets/search/recent
Search recent tweets (last 7 days)
/2/tweets/search/all
Full-archive tweet search
/2/tweets/search/stream
Real-time filtered tweet stream
/2/users/{id}
Look up a user by ID
/2/dm_conversations/with/{participant_id}/messages
Send a direct message
/2/communities/search
Search Twitter Communities
/2/trends/by/woeid/{woeid}
Get trending topics by location
/2/tweets
Create a new tweet
/2/tweets/search/recent
Search recent tweets (last 7 days)
/2/tweets/search/all
Full-archive tweet search
/2/tweets/search/stream
Real-time filtered tweet stream
/2/users/{id}
Look up a user by ID
Three things that make agents converge on Jentic-routed access.
Credential isolation
Twitter OAuth 2.0 tokens and Bearer keys are stored encrypted in the Jentic vault (MAXsystem). Agents receive scoped access tokens with only the required permissions (tweet.read, tweet.write, dm.read) — raw API keys and client secrets never enter the agent's context.
Intent-based discovery
Agents search by intent (e.g., 'search recent tweets about a brand') and Jentic returns the matching /2/tweets/search/recent operation with its full query parameter schema, so the agent can construct valid requests without browsing Twitter's developer documentation.
Time to first call
Direct Twitter API integration: 3-7 days for OAuth 2.0 PKCE setup, rate limit handling, pagination, and stream management. Through Jentic: under 1 hour — search for the operation, load the schema, execute.
Alternatives and complements available in the Jentic catalogue.
Reddit API
Community discussion platform with subreddit-based content instead of follower-based timelines
Choose Reddit when the task involves forum-style threaded discussions, subreddit-specific content, or anonymous community sentiment rather than real-time public broadcasts
Slack API
Team messaging platform for forwarding tweet alerts or social monitoring results to internal channels
Use Slack alongside Twitter when the agent needs to notify team members about detected mentions, trending topics, or engagement spikes from Twitter monitoring
Buffer API
Social media scheduling tool that queues content for posting to Twitter and other platforms
Use Buffer when the agent needs to schedule tweets for future posting times or manage a content calendar across multiple social accounts
Specific to using Twitter API v2 API through Jentic.
What authentication does the Twitter API v2 use?
The Twitter API v2 supports three authentication methods: OAuth 2.0 with PKCE for user-context requests (posting tweets, managing DMs), App-only Bearer Token for read-only endpoints (search, user lookup), and OAuth 1.0a User Token for legacy compatibility. Through Jentic, these credentials are stored encrypted in the MAXsystem vault and agents receive scoped tokens without handling raw keys directly.
What are the rate limits for the Twitter API v2 search endpoint?
The /2/tweets/search/recent endpoint allows 450 requests per 15-minute window on Basic access and 300 per 15-minute window on Pro access. Each request returns up to 100 tweets. The /2/tweets/search/all (full-archive) endpoint is available on Academic Research or Pro access at 300 requests per 15-minute window.
Can I stream tweets in real time with the Twitter API v2?
Yes. The /2/tweets/search/stream endpoint provides a persistent HTTP connection delivering tweets matching your filter rules within seconds of posting. You configure rules via POST /2/tweets/search/stream/rules. Basic access supports 25 concurrent rules; Pro access supports up to 1,000 rules.
How do I search tweets and post content through Jentic?
Install the Jentic SDK with pip install jentic, then search for 'search recent tweets' to discover the /2/tweets/search/recent operation. Jentic returns the full input schema so your agent can construct the query parameter. For posting, search 'create a tweet' to load the POST /2/tweets schema. Sign up at https://app.jentic.com/sign-up to get started.
Can I access historical tweets beyond the 7-day window?
Yes. The /2/tweets/search/all endpoint provides full-archive search going back to the first tweet ever posted. This requires Academic Research or Pro access level. The endpoint supports the same query syntax as recent search with additional operators for time-range filtering using start_time and end_time parameters.
Does the Twitter API v2 support sending direct messages?
Yes. Use POST /2/dm_conversations/with/{participant_id}/messages to send a DM to a specific user, or POST /2/dm_conversations to create a new group conversation. Retrieve conversation history with GET /2/dm_conversations/with/{participant_id}/dm_events. DM endpoints require OAuth 2.0 user context with the dm.read and dm.write scopes.
What is the difference between Twitter API v1.1 and v2?
API v2 uses a redesigned data model with expansion fields, supports more granular OAuth 2.0 scopes with PKCE, and adds endpoints for Spaces, Communities, and Bookmarks that do not exist in v1.1. The v2 search endpoint supports a richer query language with conversation_id, context annotations, and entity operators not available in v1.1.
/2/dm_conversations/with/{participant_id}/messages
Send a direct message
/2/communities/search
Search Twitter Communities
/2/trends/by/woeid/{woeid}
Get trending topics by location