Content ideation based on guesswork produces mediocre topics. An ideation agent that searches live data across multiple platforms finds topics with proven demand: questions people are asking on Reddit, gaps in Google results, and trending topics on YouTube. This tutorial builds an agent that queries three platforms for a topic area and synthesizes the findings into actionable content ideas.
Prerequisites
- Python 3.8+ installed
- requests library installed
- A Scavio API key from scavio.dev
- An OpenAI or Anthropic API key for LLM synthesis
Walkthrough
Step 1: Define the research function
Search Google, Reddit, and YouTube for a topic to find demand signals.
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def research_topic(topic: str) -> dict:
data = {}
for platform in ['google', 'reddit', 'youtube']:
resp = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': platform, 'query': topic}, timeout=10)
data[platform] = resp.json().get('organic', [])[:10]
return dataStep 2: Extract demand signals
Parse the search results to find questions, gaps, and trending angles.
def extract_signals(research: dict) -> dict:
signals = {'questions': [], 'gaps': [], 'trending': []}
# Google People Also Ask = questions with demand
for r in research.get('google', []):
if 'question' in r.get('type', ''):
signals['questions'].append(r.get('title', ''))
# Reddit threads with high engagement = proven interest
for r in research.get('reddit', []):
signals['questions'].append(r.get('title', ''))
# YouTube results = visual content opportunities
for r in research.get('youtube', []):
signals['trending'].append(r.get('title', ''))
return signalsStep 3: Synthesize with an LLM
Feed the demand signals into an LLM to generate structured content ideas.
def generate_ideas(topic: str, signals: dict) -> str:
prompt = f"""Based on these real demand signals for '{topic}':
Questions people are asking: {signals['questions'][:10]}
Trending content: {signals['trending'][:10]}
Generate 5 content ideas. Each must:
1. Address a specific question or gap from the signals
2. Have a concrete angle (not generic)
3. Include a suggested title and format (blog, tutorial, video, comparison)
Output as a numbered list."""
# Call your preferred LLM here
return prompt # Replace with actual LLM callStep 4: Run the full ideation pipeline
Combine research, signal extraction, and LLM synthesis.
def ideate(topic: str) -> dict:
print(f'Researching: {topic}')
research = research_topic(topic)
signals = extract_signals(research)
print(f'Found {len(signals["questions"])} questions, {len(signals["trending"])} trending topics')
ideas = generate_ideas(topic, signals)
return {'topic': topic, 'signals': signals, 'ideas': ideas}
result = ideate('AI agent frameworks 2026')
print(result['ideas'])Python Example
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def ideation_research(topic):
signals = []
for p in ['google', 'reddit', 'youtube']:
data = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': p, 'query': topic}, timeout=10).json()
signals.extend([{'platform': p, 'title': r['title']} for r in data.get('organic', [])[:5]])
return signalsJavaScript Example
async function ideationResearch(topic) {
const signals = [];
for (const p of ['google', 'reddit', 'youtube']) {
const data = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'},
body: JSON.stringify({platform: p, query: topic})
}).then(r => r.json());
signals.push(...(data.organic || []).slice(0, 5).map(r => ({platform: p, title: r.title})));
}
return signals;
}Expected Output
Content ideas backed by real demand signals from Google, Reddit, and YouTube search data.