ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build a SERP-Grounded Content Brief with API
Tutorial

How to Build a SERP-Grounded Content Brief with API

Generate content briefs from live SERP data. Pull rankings, PAA questions, and AI Overview data at $0.025/brief using Scavio API.

Get Free API KeyAPI Docs

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.

Python
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.

Python
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.

Python
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

Python
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

JavaScript
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

JSON
Content brief with top-ranking titles, unique PAA questions from main + related keywords, AI Overview presence flag, and related keyword list.

Related Tutorials

  • How to Monitor AI Overview Citations via API

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Scavio API key. Python 3.8+ or Node.js 18+. Target keyword for the content piece. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Raw SERP Data APIs for Custom Dashboards (2026)

Read more
Use Case

Automated Content Ideation from Search Data

Read more
Workflow

SERP Content Brief Generation On-Demand

Read more
Best Of

Best SERP API by Pricing Model in 2026

Read more
Use Case

n8n Search Enrichment Workflow

Read more
Workflow

Daily Content Research Brief

Read more

Start Building

Generate content briefs from live SERP data. Pull rankings, PAA questions, and AI Overview data at $0.025/brief using Scavio API.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy