Resumen
Este flujo de trabajo genera un diario financial news digest by querying Scavio for cada tracked ticker y sector palabra clave, extracting top headlines y AI Overview summaries, scoring news elementos by potential mercado impact, y compiling un prioritized digest. El salida es un structured JSON feed ese puede be pushed to Slack, correo electronico, o un panel de control. Ejecuta antes de mercado open to dar traders un manana briefing.
Desencadenador
Cron programar (diario at 7:30 AM EST)
Programación
Ejecuta diario at 7:30 AM EST antes de mercado open
Pasos del flujo de trabajo
Cargar ticker y sector watchlist
Leer el lista of tracked tickers y sector palabras clave de configuracion.
Consulta news for cada ticker
Search Scavio Google for cada ticker con news-focused consultas to obtener actual headlines.
Extraer AI Overview summaries
Pull AI Overview text for cada consulta to obtener consensus analyst views y key developments.
Puntuacion y deduplicate headlines
Eliminar duplicate stories a traves de tickers y puntuacion remaining headlines by impact palabras clave.
Compile y distribute digest
Format el ranked digest y push to Slack canal, correo electronico, o guardar as JSON.
Implementacion en Python
import requests
import json
from datetime import datetime
from pathlib import Path
API_KEY = "your_scavio_api_key"
IMPACT_WORDS = {"earnings", "beat", "miss", "guidance", "upgrade", "downgrade", "acquisition", "merger", "layoff", "fda", "sec", "investigation", "bankruptcy", "ipo", "split"}
def fetch_ticker_news(ticker: str) -> dict:
res = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"platform": "google", "query": f"{ticker} stock news today 2026", "ai_overview": True},
timeout=15,
)
res.raise_for_status()
data = res.json()
headlines = []
for r in data.get("organic", [])[:5]:
title = r.get("title", "")
snippet = r.get("snippet", "")
impact = len(set(title.lower().split()) & IMPACT_WORDS) + len(set(snippet.lower().split()) & IMPACT_WORDS)
headlines.append({"title": title, "snippet": snippet, "link": r.get("link", ""), "impact_score": impact})
return {
"ticker": ticker,
"ai_summary": data.get("ai_overview", {}).get("text", ""),
"headlines": sorted(headlines, key=lambda x: x["impact_score"], reverse=True),
}
def run():
date = datetime.utcnow().strftime("%Y-%m-%d")
tickers = ["NVDA", "AAPL", "TSLA", "MSFT", "GOOG", "META", "AMZN", "AMD"]
digest = {"date": date, "tickers": []}
for ticker in tickers:
news = fetch_ticker_news(ticker)
digest["tickers"].append(news)
Path(f"financial_digest_{date}.json").write_text(json.dumps(digest, indent=2))
print(f"Financial digest {date}: {len(tickers)} tickers scanned")
for t in digest["tickers"]:
top = t["headlines"][0]["title"] if t["headlines"] else "no news"
print(f" ${t['ticker']}: {top}")
if __name__ == "__main__":
run()Implementacion en JavaScript
const API_KEY = "your_scavio_api_key";
const IMPACT = new Set(["earnings","beat","miss","guidance","upgrade","downgrade","acquisition","merger","layoff"]);
async function fetchNews(ticker) {
const res = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST",
headers: { "x-api-key": API_KEY, "content-type": "application/json" },
body: JSON.stringify({ platform: "google", query: `${ticker} stock news today 2026`, ai_overview: true }),
});
const data = await res.json();
const headlines = (data.organic ?? []).slice(0, 5).map((r) => {
const words = new Set(`${r.title ?? ""} ${r.snippet ?? ""}`.toLowerCase().split(/\s+/));
return { title: r.title ?? "", snippet: r.snippet ?? "", impact: [...IMPACT].filter((w) => words.has(w)).length };
});
return { ticker, headlines: headlines.sort((a, b) => b.impact - a.impact), aiSummary: data.ai_overview?.text ?? "" };
}
for (const t of ["NVDA", "AAPL", "TSLA"]) {
const news = await fetchNews(t);
console.log(`$${t}: ${news.headlines[0]?.title ?? "no news"}`);
}Plataformas utilizadas
Búsqueda web con grafo de conocimiento, PAA y resúmenes de IA