Generate data-driven content briefs by pulling live SERP data: top-ranking titles, People Also Ask questions, AI Overview presence, and related searches. Total API cost per brief: $0.025 (5 searches at $0.005 each).
Prerequisites
- Scavio API key
- Python 3.8+ or Node.js 18+
- Target keyword for the content piece
Walkthrough
Step 1: Pull SERP data for the main keyword
Search Google for the target keyword with AI Overview enabled.
import requests, os
HEADERS = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def serp_data(query):
return requests.post('https://api.scavio.dev/api/v1/search',
headers=HEADERS,
json={'query': query, 'country_code': 'us',
'include_ai_overview': True}).json()
data = serp_data('best CRM software 2026')Step 2: Extract brief components
Pull PAA questions, competitor titles, and related keywords.
brief = {
'keyword': 'best CRM software 2026',
'top_titles': [r['title'] for r in data.get('organic_results', [])[:5]],
'paa_questions': [q['question'] for q in data.get('people_also_ask', [])],
'ai_overview': bool(data.get('ai_overview')),
'related_keywords': [r['query'] for r in data.get('related_searches', [])],
}
for k, v in brief.items():
print(f'{k}: {v}')Step 3: Expand with related keyword SERPs
Search 4 related keywords for additional context.
for related_kw in brief['related_keywords'][:4]:
related_data = serp_data(related_kw)
related_paa = [q['question'] for q in related_data.get('people_also_ask', [])]
brief['paa_questions'].extend(related_paa)
brief['paa_questions'] = list(set(brief['paa_questions']))
print(f'Total unique PAA questions: {len(brief["paa_questions"])}')Python Example
import requests, os, json
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def content_brief(keyword, related_count=4):
def search(q):
return requests.post('https://api.scavio.dev/api/v1/search',
headers=H, json={'query': q, 'country_code': 'us',
'include_ai_overview': True}).json()
main = search(keyword)
brief = {
'keyword': keyword,
'top_titles': [r['title'] for r in main.get('organic_results', [])[:5]],
'paa': [q['question'] for q in main.get('people_also_ask', [])],
'ai_overview': bool(main.get('ai_overview')),
'related': [r['query'] for r in main.get('related_searches', [])],
}
for kw in brief['related'][:related_count]:
extra = search(kw)
brief['paa'].extend([q['question'] for q in extra.get('people_also_ask', [])])
brief['paa'] = list(set(brief['paa']))
return brief
b = content_brief('best CRM software 2026')
print(json.dumps(b, indent=2))JavaScript Example
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function contentBrief(keyword) {
async function search(q) {
return fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: H,
body: JSON.stringify({query: q, country_code: 'us', include_ai_overview: true})
}).then(r => r.json());
}
const main = await search(keyword);
const brief = {
keyword,
topTitles: (main.organic_results || []).slice(0, 5).map(r => r.title),
paa: (main.people_also_ask || []).map(q => q.question),
aiOverview: !!main.ai_overview,
related: (main.related_searches || []).map(r => r.query),
};
for (const kw of brief.related.slice(0, 4)) {
const extra = await search(kw);
brief.paa.push(...(extra.people_also_ask || []).map(q => q.question));
}
brief.paa = [...new Set(brief.paa)];
return brief;
}
contentBrief('best CRM software 2026').then(b => console.log(JSON.stringify(b, null, 2)));Expected Output
Content brief with top-ranking titles, unique PAA questions from main + related keywords, AI Overview presence flag, and related keyword list.