{"uid":"cap_Ru5e4aeDyE3k8nXiHau52","slug":"www-surplusintelligence-ai-0d9a1ee3","name":"X/Twitter Tweet Counts Recent via Surplus Intelligence","description":"X/Twitter API v2 via Surplus Intelligence: Tweet counts recent (1 unit)","url":"https://www.surplusintelligence.ai/x402/api/twitter/v2/tweets/counts/recent","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"X/Twitter recent counts query."},"granularity":{"enum":["minute","hour","day"],"type":"string","description":"Count bucket granularity."}},"additionalProperties":true}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"data":{},"meta":{"type":"object"},"errors":{"type":"array"}},"additionalProperties":true}}}}},"responseSchema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["end","start","tweet_count"],"properties":{"end":{"type":"string"},"start":{"type":"string"},"tweet_count":{"type":"number"}}}},"meta":{"type":"object","required":["total_tweet_count"],"properties":{"total_tweet_count":{"type":"number"}}}}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"query":"artificial intelligence","granularity":"day"}}},"response":{"data":[{"end":"2026-06-12T00:00:00.000Z","start":"2026-06-11T04:53:34.000Z","tweet_count":6802},{"end":"2026-06-13T00:00:00.000Z","start":"2026-06-12T00:00:00.000Z","tweet_count":7757},{"end":"2026-06-14T00:00:00.000Z","start":"2026-06-13T00:00:00.000Z","tweet_count":10607},{"end":"2026-06-15T00:00:00.000Z","start":"2026-06-14T00:00:00.000Z","tweet_count":9732},{"end":"2026-06-16T00:00:00.000Z","start":"2026-06-15T00:00:00.000Z","tweet_count":9908},{"end":"2026-06-17T00:00:00.000Z","start":"2026-06-16T00:00:00.000Z","tweet_count":7109},{"end":"2026-06-18T00:00:00.000Z","start":"2026-06-17T00:00:00.000Z","tweet_count":8016},{"end":"2026-06-18T04:53:34.000Z","start":"2026-06-18T00:00:00.000Z","tweet_count":1112}],"meta":{"total_tweet_count":61043}}},"exampleRequest":{"query":"artificial intelligence","granularity":"day"},"tags":["x402"],"displayCostAmount":"0.007900","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.007900/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0079","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0079","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZY28M5u_-FEsKpbvpKpNN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0079","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns bucketed counts of recent tweets matching a search query over the past 7 days, using the Twitter API v2 counts endpoint.","exampleAgentPrompt":"How many tweets have mentioned 'OpenAI' in the last 7 days? Break it down by day so I can see the trend.","exampleUseCases":null,"resultDescription":"Returns a time-series array of tweet count buckets (with start/end timestamps and count per bucket) at the requested granularity (minute, hour, or day), plus metadata such as total count and newest/oldest result IDs. Covers approximately the last 7 days of Twitter data.","failureModes":["Invalid or missing query parameter returns a 400-level error","Query too complex or unsupported operators return an API error from Twitter","Granularity value outside allowed enum returns validation error","Payment not processed (402) if USDC balance is insufficient","Rate limits exceeded on the underlying Twitter API return a 429-style error","Empty result set if no tweets match the query in the recent window"],"whenToPreferThis":"Use this endpoint when you need to measure tweet volume or activity trends for a keyword, hashtag, or boolean query over the past 7 days without retrieving the actual tweet content. It is more efficient and cheaper than fetching full tweet search results when you only need counts. Choose the 'all' variant if you need historical data beyond 7 days.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:40:43.193Z","isFirstParty":false}