Resumen
Este flujo de trabajo acts as un personal news agent. Every manana it searches Google News for un establecer of topics you care about, deduplicates articulos a traves de topics, ranks them by relevance, y delivers un curated digest. It replaces scattered RSS feeds y manual news scanning con un single automatizado pipeline.
Desencadenador
Cron programar (diario at 6 AM UTC)
Programación
Ejecuta diario at 6 AM UTC
Pasos del flujo de trabajo
Define topics
Cargar el lista of news topics y associated consultas de configuracion (e.g., AI regulation, SaaS funding, search API industria).
Search Google News
Call el Scavio API con plataforma google-news for cada topic to retrieve el ultimo articulos.
Deduplicate articulos
Eliminar duplicate articulos ese appear a traves de multiples topic searches by coincidencia on URL.
Clasificar y filtrar
Puntuacion articulos by recency y relevance. Keep el top N articulos for el digest.
Format digest
Generar un structured digest con sections per topic, cada containing headline, fuente, fragmento, y enlace.
Deliver
Enviar el digest via correo electronico, Slack, o escribir to un Notion pagina.
Implementacion en Python
import requests
import json
from datetime import datetime
API_KEY = "your_scavio_api_key"
MAX_PER_TOPIC = 5
def search_news(query: str) -> list[dict]:
res = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"platform": "google-news", "query": query},
timeout=15,
)
res.raise_for_status()
return res.json().get("organic", [])
def run():
topics = {
"AI Regulation": "AI regulation policy 2026",
"SaaS Funding": "SaaS startup funding rounds",
"Search Industry": "search API industry news",
}
seen_urls = set()
digest = {}
for label, query in topics.items():
articles = search_news(query)
unique = []
for a in articles:
url = a.get("link", "")
if url and url not in seen_urls:
seen_urls.add(url)
unique.append({
"title": a.get("title", ""),
"source": a.get("source", ""),
"snippet": a.get("snippet", ""),
"link": url,
})
digest[label] = unique[:MAX_PER_TOPIC]
date_str = datetime.utcnow().strftime("%Y-%m-%d")
print(f"News Digest for {date_str}")
for topic, articles in digest.items():
print(f"\n--- {topic} ---")
for a in articles:
print(f" {a['title']} ({a['source']})")
print(f" {a['link']}")
if __name__ == "__main__":
run()Implementacion en JavaScript
const API_KEY = "your_scavio_api_key";
const MAX_PER_TOPIC = 5;
async function searchNews(query) {
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-news", query }),
});
if (!res.ok) throw new Error(`scavio ${res.status}`);
const data = await res.json();
return data.organic ?? [];
}
async function run() {
const topics = {
"AI Regulation": "AI regulation policy 2026",
"SaaS Funding": "SaaS startup funding rounds",
"Search Industry": "search API industry news",
};
const seenUrls = new Set();
const digest = {};
for (const [label, query] of Object.entries(topics)) {
const articles = await searchNews(query);
const unique = [];
for (const a of articles) {
if (a.link && !seenUrls.has(a.link)) {
seenUrls.add(a.link);
unique.push({
title: a.title ?? "",
source: a.source ?? "",
snippet: a.snippet ?? "",
link: a.link,
});
}
}
digest[label] = unique.slice(0, MAX_PER_TOPIC);
}
const date = new Date().toISOString().slice(0, 10);
console.log(`News Digest for ${date}`);
for (const [topic, articles] of Object.entries(digest)) {
console.log(`\n--- ${topic} ---`);
for (const a of articles) {
console.log(` ${a.title} (${a.source})`);
console.log(` ${a.link}`);
}
}
}
run();Plataformas utilizadas
Google News
Búsqueda de noticias con titulares y fuentes