Comparing API Economics Across Projects

Every project depends on external APIs. The cost, rate limits, and access constraints shaped architecture decisions as much as technical requirements.

API Landscape (2026)

APIProjectCostRate LimitAccess LevelSurprise
Twitter v2 FreePollitique$0N/AWrite-onlyCan’t read any data
Twitter v2 BasicPollitique$100/moStandardRead + writeRequired for any useful data
YouTube Data v3Pollitique$010K units/dayFull readGenerous free tier
TikTokPollitiqueN/AN/ANo public APINot available at all
College ScorecardFavCollege$01K req/hourFull readRemarkably comprehensive
RedditFavCollege$060 req/minFull readRequires app approval (1-3 days)
Open-MeteoSnowCheck$0GenerousFull readNo API key needed
Gemini 2.5 FlashAniChatPay-per-useStandardFullFast, good for character gen

Key Insight: Free Tier Traps

Twitter’s free tier is write-only in 2026. This is the biggest API economics surprise across all projects. Pollitique was designed around Twitter follower tracking, but the free tier can’t read followers, mentions, or retweets. The $100/month Basic tier is required for any read access. This forced a complete redesign of the trending score weights.

Contrast with government APIs. The College Scorecard API provides 40+ fields per college across 7,000 institutions, completely free, 1,000 requests/hour. No signup friction — API key arrives via email in minutes. Government APIs are the best-kept secret in web development.

Architecture Responses to API Constraints

Pollitique: Graceful Degradation

When Twitter went write-only: adjusted weights (40% YouTube, 40% follower growth from whatever’s available, 20% TikTok manual entry). Four-tier fallback chain. Color-coded freshness indicators. The architecture survived a major data source disappearing.

SnowCheck: Provider Pattern

Abstract data sources behind a normalized interface so providers can be swapped without changing consumers. Currently only Open-Meteo (free, no key), but Weather Unlocked or Snow-Forecast.com can be added when needed. See provider-pattern.

FavCollege: Denormalized Cache

Reviews scraped in batch (2-second delays between requests), aggregated offline, cached on parent table. Avoids real-time API dependency on page load. The sync script (npm run update-counts) is the bridge between batch scraping and fast reads.

AniChat: Pre-Generation + LRU Cache

Generate all character variants upfront (12 emotion avatars), cache with LRU (50 entries). Reduces per-session Gemini API calls to near zero after warmup. Three-tier fallback: cached image → pre-generated PNG → SVG.

Cost of Running All Projects

ProjectMonthly API CostCould Be
Pollitique (current)$0 (YouTube only)$100 with Twitter Basic
FavCollege$0$0 (all free APIs)
SnowCheck$0$0 (Open-Meteo is free)
AniChat~$1-5 (Gemini usage)$0 with full pre-generation
Total~$1-5/month$100-105 with Twitter

Lessons

  1. Check API pricing before designing — Twitter’s write-only free tier was discovered during implementation, not planning
  2. Government APIs are underrated — College Scorecard provides more data for free than most commercial APIs
  3. Design for API disappearance — Pollitique’s fallback chain saved the project when Twitter access was lost
  4. Cache aggressively — every project caches (6-hour Supabase, LRU, denormalized columns, pre-generated images)
  5. Batch when possible — real-time API calls on page load are fragile; offline scraping + cache is more resilient

See also: provider-pattern, source-political-trending-score, source-college-scorecard-api, source-weather-provider-architecture