{"uid":"cap_RMeWEjkj6x1gjCmoUX2xf","slug":"agent402-x-user-tweets-fetcher-e8ded76a","name":"Agent402: X User Tweets Fetcher","description":"Fetch an X (Twitter) account's most recent tweets by user id or username (username is resolved first). Options to exclude retweets and replies, page with pagination_token, or fetch only tweets newer than since_id. Each tweet carries text, created time, language and engagement metrics.","url":"https://agent402.tools/api/x-user-tweets","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"id":{"type":"string","description":"Numeric X user id. Provide id OR username."},"since_id":{"type":"string","description":"Only tweets with an id greater than this."},"username":{"type":"string","description":"X username (resolved to an id first). Provide id OR username."},"max_results":{"type":"number","description":"Tweets per page, 5-10 (default 10). The upstream bills per post returned, so the page size is capped."},"exclude_replies":{"type":"boolean","description":"Drop replies (default false)."},"exclude_retweets":{"type":"boolean","description":"Drop retweets (default false)."},"pagination_token":{"type":"string","description":"Pagination token from a previous response."}}},"responseSchema":{"type":"json","example":{"user":{"id":"574032254","name":"Coinbase","username":"coinbase","verified":true},"count":1,"source":"x-api-v2","tweets":[{"id":"20","url":"https://x.com/coinbase/status/1800000000000000000","lang":"en","text":"just setting up my twttr","author":{"name":"Coinbase","username":"coinbase","verified":true},"metrics":{"likes":180000,"quotes":30000,"replies":10000,"retweets":120000,"bookmarks":5000,"impressions":0},"authorId":"574032254","createdAt":"2006-03-21T20:50:14.000Z","conversationId":"20","possiblySensitive":false}],"fetchedAt":"2026-08-20T14:10:00.000Z","nextToken":"7140dibdnow9c7btw4xxxxx"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_t_nhq_9N-CTLflBlZtDhj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches recent tweets from a specified X (Twitter) user by user ID or username, with filtering and pagination support, billed per call via x402/USDC.","exampleAgentPrompt":"Can you fetch the last 10 tweets from the Coinbase X account — skip any replies or retweets — and show me the text, likes, and retweet counts for each?","exampleUseCases":[{"title":"Monitor brand announcements on X","prompt":"Pull the most recent 10 tweets from @elonmusk on X, excluding retweets, so I can see what he's been posting lately along with how many likes and replies each got."},{"title":"Track competitor social activity","prompt":"Get the latest tweets from OpenAI's X account — skip replies, keep retweets — up to 10 results, and show me the text and engagement metrics for each tweet."},{"title":"Resume a paginated tweet feed","prompt":"I was browsing Anthropic's tweets earlier and got a pagination token 7140dibdnow9c7btw4xxxxx — can you fetch the next page of up to 5 tweets from their account using that token?"}],"resultDescription":"A JSON object containing the resolved user profile (id, name, username, verified status), a count of returned tweets, the source identifier (x-api-v2), and an array of tweet objects each with tweet ID, URL, language, full text, author details, engagement metrics (likes, quotes, replies, retweets, bookmarks, impressions), author ID, creation timestamp, conversation ID, and sensitivity flag. Also includes a fetchedAt timestamp and an optional nextToken for pagination.","failureModes":["Invalid or non-existent username/user ID returns an error or empty result","Username resolution failure if the X handle has changed or been suspended","max_results outside the allowed range (5–10) may be clamped or rejected","Missing both id and username fields results in a validation error","Upstream X API rate limits or outages cause downstream failures","Pagination token expired or invalid returns an error"],"whenToPreferThis":"Use this endpoint when you need structured, paginated access to a specific X user's recent tweet timeline with engagement metrics, without managing X API credentials or OAuth flows. Prefer it over direct X API access when your agent uses x402/USDC micro-payments and needs a no-signup, wallet-authenticated path. Ideal for social listening, content monitoring, or brand tracking pipelines that require per-tweet metrics in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:56:13.683Z","isFirstParty":false}