Overview
A daily pipeline that pulls live Google SERP and Reddit data for your target topics, feeds that real signal to an LLM, and produces grounded outlines and drafts - instead of letting the model invent long-tail keywords like 'slow made ceramic plates'. Built on the Scavio Google and Reddit endpoints so every draft is anchored to what actually ranks today.
Trigger
Daily at 6 AM UTC via cron
Schedule
Daily at 6 AM UTC
Workflow Steps
Load today's target topics
Read a list of target topics or head keywords from a config file or database. Keep it small and intentional - 5 to 15 topics a day beats a firehose of thin pages. Each topic becomes one grounded draft.
Pull the live SERP for each topic
POST each topic to https://api.scavio.dev/api/v1/google with light_request:false (2 credits). The response carries organic results, the knowledge_graph, related_searches, and the questions (People Also Ask) block - the real long-tail and entity signal the LLM should write around, not guess.
Add the Reddit angle layer
Call /api/v1/reddit/search (2 credits) for the same topic to pull threads and scores. Reddit surfaces the actual phrasing, objections, and sub-questions real people use - the angle that makes a draft read like a human wrote it instead of a model padding word count.
Build a grounded brief
Assemble a brief that hands the LLM the real PAA questions, related searches, top competitor titles, and Reddit angles as constraints. The prompt instruction is explicit: only use the keywords and entities present in this brief; do not invent terms. This is the step that stops the garbage long-tail problem.
Draft, then gate on a human review
Generate the outline and draft from the grounded brief. Do not auto-publish. The fastest way to tank a site is shipping unreviewed AI text at volume, so queue each draft for a human pass before it goes live. AI is good at generating things for you to review, not at deciding what is true.
Python Implementation
import os, requests
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
BASE = "https://api.scavio.dev/api/v1"
def grounded_brief(topic):
serp = requests.post(f"{BASE}/google", headers=H,
json={"query": topic, "light_request": False}).json().get("data", {})
reddit = requests.post(f"{BASE}/reddit/search", headers=H,
json={"query": topic, "limit": 15}).json().get("data", {})
return {
"topic": topic,
"paa": serp.get("questions", []),
"related": serp.get("related_searches", []),
"competitor_titles": [r.get("title") for r in serp.get("organic", [])[:10]],
"reddit_angles": [p.get("title") for p in reddit.get("posts", [])[:10]],
}
TOPICS = ["best serp api for agents", "how to ground an llm", "tiktok analytics api"]
for t in TOPICS:
brief = grounded_brief(t)
# hand brief to your LLM with: "use only the keywords and entities in this brief"
print(t, "->", len(brief["paa"]), "PAA,", len(brief["reddit_angles"]), "reddit angles")JavaScript Implementation
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json' };
const BASE = 'https://api.scavio.dev/api/v1';
async function groundedBrief(topic) {
const [serpRes, redditRes] = await Promise.all([
fetch(`${BASE}/google`, { method: 'POST', headers: H, body: JSON.stringify({ query: topic, light_request: false }) }).then(r => r.json()),
fetch(`${BASE}/reddit/search`, { method: 'POST', headers: H, body: JSON.stringify({ query: topic, limit: 15 }) }).then(r => r.json()),
]);
const serp = serpRes.data || {}, reddit = redditRes.data || {};
return {
topic,
paa: serp.questions || [],
related: serp.related_searches || [],
competitorTitles: (serp.organic || []).slice(0, 10).map(r => r.title),
redditAngles: (reddit.posts || []).slice(0, 10).map(p => p.title),
};
}
for (const t of ['best serp api for agents', 'how to ground an llm']) {
groundedBrief(t).then(b => console.log(t, '->', b.paa.length, 'PAA,', b.redditAngles.length, 'angles'));
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews
Community, posts & threaded comments from any subreddit