Skip to main content

Scenario

Track how media sentiment around your brand, product category, or key topics shifts week over week. This job searches for mentions across all sources, batches them into weekly windows, sends each batch to Mavera Chat for structured sentiment analysis, and outputs a time-series sentiment dashboard with trend arrows. Flow: NewsAPI GET /everything?q={topic} (weekly batches) → Mavera POST /mave/chat per batch → Sentiment time series

Code

Example Output

Error Handling

Free tier limits search to past 30 days. Reduce WEEKS to 4 max on free plans. Business tier supports full archive.
Mave returns natural language by default. Prompt for JSON explicitly and parse with json.loads() / JSON.parse(). Wrap in try/catch for malformed responses.
Broad topics like “AI” return noise. Use quoted phrases and boolean operators: "AI marketing" AND ("ROI" OR "attribution").