SENTi-radar aggregates sentiment data from multiple social media and content platforms in real-time. The data collection pipeline uses a combination of official APIs, web scraping via Scrape.do, and intelligent fallback strategies to ensure reliable data delivery.
Scrape.do is a premium web scraping API that handles JavaScript rendering, residential proxies, and CAPTCHA bypass for platforms that block traditional scraping.
The scrapeDoProvider.ts service provides a unified interface for scraping:
// Build Scrape.do API URLexport function buildApiUrl( token: string, targetUrl: string, options: ScrapeDoOptions = {}): string { const params = new URLSearchParams(); params.set("token", token); params.set("url", targetUrl); if (options.render !== false) params.set("render", "true"); if (options.super) params.set("super", "true"); if (options.waitUntil) params.set("waitUntil", options.waitUntil); if (options.geoCode) params.set("geoCode", options.geoCode); return `https://api.scrape.do?${params.toString()}`;}
# Scrape.do API token (required for X and Reddit)SCRAPE_DO_TOKEN=your_scrape_do_token# YouTube Data API v3 key (required for YouTube)YOUTUBE_API_KEY=your_youtube_api_key# Parallel.ai API key (optional fallback)PARALLEL_API_KEY=your_parallel_api_key# Supabase credentialsSUPABASE_URL=your_supabase_urlSUPABASE_SERVICE_ROLE_KEY=your_service_role_key
The system never returns HTTP 500 errors to the orchestrator. Instead, it returns success: false with diagnostic info, allowing the pipeline to continue with other sources.