{"uid":"cap_hMhC4ZgcPB2giQSZXa-PM","slug":"twitter-x-api-wrapper-search-lookup-timeline-272fc399","name":"Twitter/X API Wrapper — Search, Lookup & Timeline","description":"Twitter X API / X API v2 wrapper / tweet search, tweet lookup, username lookup, bulk users lookup, and user timeline fetch / social data API. Read-only endpoint with mode='search' for recent public posts, mode='tweets' for tweet IDs, mode='user' for one public profile, mode='users' for bulk profile lookup, or mode='user_tweets' for recent public posts from one username. Uses X_BEARER_TOKEN or TWITTER_BEARER_TOKEN. No posting, replying, liking, following, DM access, or account mutation.","url":"https://x402.agentutility.ai/twitter-x-api","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Alias for tweet_ids in mode='tweets' or user_ids in mode='users'."},"mode":{"enum":["search","user","tweets","users","user_tweets"],"type":"string","description":"Lookup mode. Defaults to 'search' unless username or IDs are supplied."},"query":{"type":"string","description":"Recent-search query for mode='search'."},"language":{"type":"string","description":"Optional two-letter language filter for search."},"user_ids":{"type":"array","items":{"type":"string"},"description":"User IDs for mode='users'. Up to 100."},"username":{"type":"string","description":"Handle for mode='user' or mode='user_tweets', with or without @."},"tweet_ids":{"type":"array","items":{"type":"string"},"description":"Tweet IDs for mode='tweets'. Up to 100."},"usernames":{"type":"array","items":{"type":"string"},"description":"Handles for mode='users'. Up to 100."},"max_results":{"type":"number","description":"Search or user timeline result count. Search clamps to 10-50; user_tweets clamps to 5-50."},"include_retweets":{"type":"boolean","description":"For mode='user_tweets', include retweets when true. Defaults false."},"pagination_token":{"type":"string","description":"Optional X pagination token for mode='user_tweets'."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"mode":{"type":"string"},"source":{"type":"string"},"result_count":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"mode":"search","source":"X API v2 recent search","result_count":10}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_J683QdZNiwQhCo4UIcYbc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Read-only Twitter/X API v2 wrapper supporting recent tweet search, tweet ID lookup, single/bulk user profile lookup, and user timeline retrieval.","exampleAgentPrompt":"Search Twitter for recent tweets about 'AI agents' and show me the top results, then also pull up the profile and recent tweets for the user @elonmusk.","exampleUseCases":[{"title":"Brand mention monitoring on Twitter","prompt":"Search Twitter for recent public tweets mentioning 'OpenAI' and give me a summary of what people are saying about them in the last few days."},{"title":"Competitor social media research","prompt":"Look up the Twitter profiles for @anthropic, @openai, and @googledeepai — I want to see their bios, follower counts, and most recent tweets."},{"title":"Influencer timeline audit","prompt":"Fetch the most recent tweets from the Twitter account @sama so I can see what Sam Altman has been posting lately."}],"resultDescription":"Returns structured JSON containing tweet text, tweet IDs, author info, timestamps, and engagement metadata for search results; or user profile fields (username, display name, bio, follower/following counts, verified status) for user lookups; or a list of recent public posts for timeline requests.","failureModes":["Invalid or missing bearer token returns authentication error","Username not found returns 404 or empty user object","Tweet IDs that are deleted or private return not-found errors","Search query returns empty results if no recent matching tweets","Rate limits on the underlying X API v2 may cause 429 errors","Bulk user lookup exceeding maximum batch size returns validation error"],"whenToPreferThis":"Choose this endpoint when you need read-only access to public Twitter/X data — including tweet search, profile lookups, or timeline retrieval — without setting up your own X API credentials. Especially useful for agents that need social data on demand, paid per-call via USDC with no API key management. Prefer over direct X API integration when running as an autonomous agent with x402 micropayment support.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:34:00.211Z","isFirstParty":false}