El problema
Los agentes no consiguen leer enlaces de Reddit porque Reddit limita la tasa de peticiones y bloquea scrapers genéricos y navegadores headless, así que una herramienta que funcionaba hace unas semanas de pronto devuelve cuerpos vacíos, muros de login o un 429. La cadena habitual del agente es web_extract o un fetch tipo DuckDuckGo que baja el HTML en crudo y deja que el modelo lo interprete. Reddit ha cerrado ese camino: los espejos de old.reddit.com van estrangulados, el sufijo `.json` tiene un tope de tasa muy duro, y un navegador headless como Camoufox queda marcado en la segunda o tercera petición. El modelo recibe basura, no resume nada y el agente parece roto aunque tu prompt esté bien. Es el primer muro de pago que se levanta sobre contenido que antes se leía gratis.
La solucion de Scavio
La solución es dejar de bajar la página HTML y llamar a una API de Reddit estructurada que devuelve el post y su árbol de comentarios completo en JSON. `POST https://api.scavio.dev/api/v1/reddit/post` recibe la URL o el id del hilo y te da el título, el selftext, el score y los comentarios anidados en una sola respuesta (2 créditos por el árbol completo). Para encontrar hilos que leer, `POST https://api.scavio.dev/api/v1/reddit/search` devuelve los posts que coinciden por 1 crédito. El agente nunca toca un navegador, nunca dispara un límite de tasa y nunca ve un muro de login, porque Scavio hace el fetch y la rotación detrás del endpoint. Envuélvelo como una sola herramienta que el agente llama. Un límite honesto: esto cubre solo Reddit público. No lee posts de LinkedIn tras login, y no deberías fingir que sí. Para LinkedIn el agente sigue necesitando otra fuente conforme a las reglas. Si estás montando un paso de scraping en Hermes, la guía hermana en /tutorial/web-scraping-tool-for-hermes-agent muestra el mismo patrón de principio a fin, y /best/best-api-for-reddit-scraping compara las opciones.
Antes
El web_extract genérico o el fetch tipo DuckDuckGo de tu agente choca con un enlace de reddit.com y recibe un 429, un muro de login o HTML vacío, así que el modelo no resume nada.
Después
Una sola llamada a una herramienta devuelve el post y su árbol de comentarios completo en JSON estructurado, sin navegador headless ni scraper que Reddit pueda marcar y romper.
Para quien es
Constructores de agentes de IA en Hermes, LangChain, CrewAI o su propio bucle que necesitan que el agente lea hilos de Reddit con fiabilidad, sin un navegador headless que se rompa con el próximo cambio de límite de tasa.
Beneficios clave
- Sin navegador headless que marcar: el agente llama a un endpoint en vez de conducir Camoufox, así que Reddit no tiene nada que identificar y bloquear.
- Árbol de comentarios completo en JSON, no HTML que el modelo deba interpretar, así los resúmenes sí incluyen la discusión (2 créditos por hilo).
- Búsqueda de 1 crédito vía /api/v1/reddit/search encuentra los hilos antes de bajarlos, así el agente no adivina URLs.
- Auth Bearer y una forma JSON estable hacen que la herramienta siga funcionando cuando Reddit cambie su marcado o sus límites otra vez.
- Alcance honesto: esto lee Reddit público. Para LinkedIn aún necesitas otra fuente conforme; mira /best/best-api-for-reddit-scraping y /best/best-api-for-reddit-post-sentiment para ver la cobertura del lado de Reddit.
Ejemplo en Python
# Agent tool: read any Reddit thread as structured JSON
import os, requests
SCAVIO_KEY = os.environ["SCAVIO_API_KEY"]
BASE = "https://api.scavio.dev/api/v1"
def read_reddit_thread(url: str) -> dict:
"""Return the Reddit post + full comment tree as JSON.
Use this instead of web_extract when the link is a reddit.com URL.
Costs 2 credits (full comment tree)."""
r = requests.post(
f"{BASE}/reddit/post",
headers={"Authorization": f"Bearer {SCAVIO_KEY}"},
json={"url": url},
timeout=60,
)
r.raise_for_status()
return r.json()
def find_reddit_threads(query: str) -> dict:
"""Search Reddit and return matching posts (1 credit)."""
r = requests.post(
f"{BASE}/reddit/search",
headers={"Authorization": f"Bearer {SCAVIO_KEY}"},
json={"query": query},
timeout=60,
)
r.raise_for_status()
return r.json()
# In the agent loop, route reddit.com links here instead of the
# generic web_extract tool that now returns 429s and login walls.
thread = read_reddit_thread("https://www.reddit.com/r/hermesagent/comments/abc123/")
print(thread["title"])
for c in thread["comments"][:5]:
print("-", c["body"][:200])Ejemplo en JavaScript
// Agent tool: read any Reddit thread as structured JSON
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;
const BASE = "https://api.scavio.dev/api/v1";
// Use this instead of web_extract when the link is a reddit.com URL.
// Costs 2 credits (full comment tree).
async function readRedditThread(url) {
const r = await fetch(`${BASE}/reddit/post`, {
method: "POST",
headers: {
"Authorization": `Bearer ${SCAVIO_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url }),
});
if (!r.ok) throw new Error(`reddit/post ${r.status}`);
return r.json();
}
// Search Reddit and return matching posts (1 credit).
async function findRedditThreads(query) {
const r = await fetch(`${BASE}/reddit/search`, {
method: "POST",
headers: {
"Authorization": `Bearer ${SCAVIO_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ query }),
});
if (!r.ok) throw new Error(`reddit/search ${r.status}`);
return r.json();
}
// In the agent loop, route reddit.com links here instead of the
// generic web_extract tool that now returns 429s and login walls.
const thread = await readRedditThread("https://www.reddit.com/r/hermesagent/comments/abc123/");
console.log(thread.title);
for (const c of thread.comments.slice(0, 5)) console.log("-", c.body.slice(0, 200));Plataformas utilizadas
Comunidad, publicaciones y comentarios en hilos de cualquier subreddit