{"uid":"cap_1ZghT0zckvqdoQ8Art8i2","slug":"x-twitter-search-for-crypto-agents-via-x402-6983c57e","name":"X (Twitter) Search for Crypto Agents via x402","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/twitter-search?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"q":{"type":"string","examples":["bitcoin","$ETH","x402","from:base"],"maxLength":200,"minLength":1,"description":"X search query (operators ok); or use the twit.sh-style filters below"},"to":{"type":"string","description":"Replying to handle"},"from":{"type":"string","description":"From handle"},"lang":{"type":"string","maxLength":5,"description":"Language filter e.g. en, ko"},"sort":{"enum":["recency","relevancy"],"type":"string","description":"Default relevancy"},"limit":{"type":"integer","maximum":20,"minimum":1,"description":"Posts (default 10)"},"since":{"type":"string","description":"YYYY-MM-DD (last 7 days)"},"until":{"type":"string","description":"YYYY-MM-DD"},"words":{"type":"string","description":"All of these words"},"phrase":{"type":"string","description":"Exact phrase"},"anyWords":{"type":"string","description":"Any of these words (space/comma separated)"},"hashtags":{"type":"string","description":"Hashtags (comma separated, # optional)"},"minLikes":{"type":"integer","minimum":0},"username":{"type":"string","description":"Timeline shortcut: posts from this handle"},"noneWords":{"type":"string","description":"None of these words"},"mentioning":{"type":"string","description":"Mentions handle"},"minReplies":{"type":"integer","minimum":0},"minReposts":{"type":"integer","minimum":0},"next_token":{"type":"string","description":"Pagination token from previous response"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"n":1,"q":"bitcoin","next":["/crypto/prices?symbols=BTC","/crypto/prediction-markets?q=bitcoin","/crypto/market-pulse"],"posts":[{"id":"1851234567890123456","url":"https://x.com/example/status/1851234567890123456","lang":"en","text":"$BTC ETF inflows strong again, ATH watch","author":{"name":"Example","handle":"example","verified":true,"followers":250000},"metrics":{"likes":1200,"quotes":12,"replies":85,"reposts":210},"created_at":"2026-10-30T01:20:00Z"}],"signal":{"cashtags":["$BTC"],"sentiment":"bullish","top_claim":{"url":"https://x.com/example/status/1851234567890123456","text":"$BTC ETF inflows strong again, ATH watch","handle":"example"},"top_terms":["etf","inflows","ath"],"engagement":{"likes":1200,"replies":85,"reposts":210},"notable_handles":[{"handle":"example","followers":250000}],"sentiment_score":0.4},"source":"x-api-v2-recent-search","updated_at":"2026-10-30T01:50:00Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HDWaRRZhr_RCW8W0fi_OZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Search recent X (Twitter) posts by keyword, cashtag, handle, or advanced filters, returning posts with engagement metrics and a sentiment signal summary, paid per-call via USDC on Base.","exampleAgentPrompt":"Search X for the most recent posts mentioning $ETH, sorted by recency, up to 15 results — I want to see the sentiment signal and top claims from the last 24 hours.","exampleUseCases":[{"title":"Token launch social sentiment scan","prompt":"Search X for posts about the $PEPE token from the last 2 days, sorted by relevancy, give me the top 10 results with their sentiment score and notable handles."},{"title":"Influencer timeline monitoring","prompt":"Pull the latest 20 tweets from handle 'CryptoKaleo' on X and summarize the sentiment and top claims."},{"title":"Event-driven news sweep","prompt":"Search X for posts with the exact phrase 'bitcoin ETF approved' since 2024-01-10 until 2024-01-12, sorted by recency, and show me which posts have the most likes."}],"resultDescription":"Returns a list of posts (up to 20) each with tweet ID, URL, text, author handle/name/verified status/follower count, engagement metrics (likes, reposts, replies, quotes), and language. Also includes an aggregated signal object with extracted cashtags, overall sentiment label, sentiment score, top claim post, top terms, engagement totals, and notable handles. Includes a next_token for pagination and suggested follow-up crypto data endpoints.","failureModes":["Query string missing or empty — returns validation error","Date range outside last 7 days — X API enforces recency limit, may return empty results","Rate limit or upstream X API outage — may return 429 or 503","x402 payment failure — returns 402 if USDC payment on Base is not completed","Invalid next_token — pagination fails with an error response","Query produces zero matching posts — returns empty posts array with no signal"],"whenToPreferThis":"Choose this endpoint when your trading or onchain AI agent needs real-time social sentiment from X about a specific crypto token, cashtag, handle, or event, and you want structured engagement metrics and a pre-computed sentiment signal without managing X API credentials. It is especially useful when you need pay-per-call pricing via USDC on Base (no API key setup), rich filter options (cashtag, from/to handle, hashtag, engagement thresholds, date range), and downstream suggestions for related crypto data endpoints.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:57.562Z","isFirstParty":false,"canonicalSlug":"x-twitter-search-for-crypto-agents-via-x402-bc3417c6"}