OC-201a · Module 3
Social Intelligence
2 min read
Build a cost-optimized daisy chain of Twitter search methods: FXTwitter (free) → twitterapi.io (cheap) → X API v2 (expensive) → Grok (fallback).
Tier 1: FXTwitter API (free, single tweet lookup only). Tier 2: twitterapi.io ($0.15/1000 tweets, search + profiles + threads). Tier 3: Official X API v2 ($0.005/tweet, full access). Tier 4: XAI Grok API as a fallback. The system automatically tries the cheapest method first and falls back to more expensive options only when needed.
Let the system choose the cheapest API tier that can fulfill each specific request type rather than always hitting the most capable (expensive) one.
Not every Twitter query needs the full X API. Single tweet lookups use the free tier. Profile searches and threads use the mid-cost tier. Only complex search queries with full metadata hit the expensive tier. This pattern of matching request complexity to API tier saves significant money over always using the premium option.