Tutorial

How to Reverse-Engineer Google Finance Data with Scavio

Pull tickers, prices, and news from Google Finance via Scavio's SERP. Cleaner than direct scraping, no proxies, no captcha walls.

Direct Google Finance scraping is a maze of dynamic widgets and rotating selectors. The cleaner path uses SERP queries scoped to `site:google.com/finance` plus Scavio's extract endpoint. This tutorial walks the pattern that returns ticker pages as typed JSON without proxies or headless browsers.

Prerequisites

  • Python 3.10+
  • Scavio API key

Walkthrough

Step 1: Search a ticker

Scavio SERP scoped to Google Finance.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def ticker_search(symbol):
    r = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'site:google.com/finance {symbol}'})
    return r.json().get('organic_results', [])

Step 2: Extract the ticker page

Scavio extract returns markdown.

Python
def fetch_ticker(url):
    r = requests.post('https://api.scavio.dev/api/v1/extract',
        headers={'x-api-key': API_KEY},
        json={'url': url, 'format': 'markdown'})
    return r.json().get('markdown', '')

Step 3: Pull related news

Scavio news search adds context.

Python
def ticker_news(symbol):
    r = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'{symbol} stock news', 'search_type': 'news'})
    return r.json().get('news_results', [])[:10]

Step 4: Cross-check with SEC SERP

Find recent 10-Q filings via SERP.

Python
def filings(symbol):
    r = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'site:sec.gov 10-Q {symbol}'})
    return r.json().get('organic_results', [])[:5]

Step 5: Compose ticker brief

Markdown brief with price, news, filings.

Python
def brief(symbol):
    return {'page': fetch_ticker(ticker_search(symbol)[0]['link']), 'news': ticker_news(symbol), 'filings': filings(symbol)}

Python Example

Python
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']

def finance_brief(symbol):
    p = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'site:google.com/finance {symbol}'}).json()
    n = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'{symbol} stock news', 'search_type': 'news'}).json()
    return {'pages': p.get('organic_results',[])[:3], 'news': n.get('news_results',[])[:5]}

print(finance_brief('AAPL'))

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function financeBrief(symbol) {
  const headers = { 'x-api-key': API_KEY, 'Content-Type': 'application/json' };
  const [p, n] = await Promise.all([
    fetch('https://api.scavio.dev/api/v1/google', { method:'POST', headers, body: JSON.stringify({ query: `site:google.com/finance ${symbol}` }) }).then(r => r.json()),
    fetch('https://api.scavio.dev/api/v1/google', { method:'POST', headers, body: JSON.stringify({ query: `${symbol} stock news`, search_type: 'news' }) }).then(r => r.json())
  ]);
  return { p, n };
}

Expected Output

JSON
Per-ticker brief with Google Finance page extract, recent news, and SEC filings — all via SERP queries, no direct scraping required.

Related Tutorials

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.

Python 3.10+. Scavio API key. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, 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.

Start Building

Pull tickers, prices, and news from Google Finance via Scavio's SERP. Cleaner than direct scraping, no proxies, no captcha walls.