An r/n8n thread asked for a search API that integrates search plus content extraction for LLM pipelines. This tutorial wires the full n8n flow: Scavio search → Scavio extract → LLM summary → output.
Prerequisites
- n8n (Cloud or self-hosted)
- Scavio API key
Walkthrough
Step 1: Webhook Trigger or Cron
Webhook for ad-hoc research; Cron for daily digest.
// n8n trigger node — Webhook with topic inputStep 2: HTTP Request — Scavio search
POST /api/v1/search with topic.
Method: POST
URL: https://api.scavio.dev/api/v1/search
Headers: x-api-key = {{ $env.SCAVIO_API_KEY }}
Body: { "query": "{{ $json.topic }}" }Step 3: Iterate over top 5 results
Split-In-Batches node, batch size 1.
// n8n: Split In Batches → loop over organic_results[0..5]Step 4: HTTP Request — Scavio extract per result
POST /api/v1/extract per URL.
Body: { "url": "{{ $json.link }}", "format": "markdown" }Step 5: LLM node summarizes
Claude / GPT / Groq.
Prompt: 'Summarize this content into a 200-word brief: {{ $json.markdown }}'Step 6: Aggregate + output
Merge all 5 briefs into a single response.
// n8n: Merge node, then Respond to Webhook with the combined brief.Python Example
# Out of n8n the equivalent script:
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
H = {'x-api-key': API_KEY}
def research(topic):
s = requests.post('https://api.scavio.dev/api/v1/search', headers=H, json={'query': topic}).json()
out = []
for r in s.get('organic_results', [])[:5]:
e = requests.post('https://api.scavio.dev/api/v1/extract', headers=H, json={'url': r['link'], 'format': 'markdown'}).json()
out.append({'url': r['link'], 'md': e.get('markdown', '')[:3000]})
return out
print(len(research('mcp server best practices 2026')))JavaScript Example
// n8n is config-driven. See node-by-node steps above.Expected Output
Per request: 6 Scavio calls (1 search + 5 extracts) ≈ $0.026. Five summarized sources ready for an LLM context window.