# Google Finance Scraper - Stocks, Financials, Intraday (`zet46/google-finance-scraper`) Actor

Google Finance quotes for stocks, indexes, forex, crypto. Six modes return price+change, profile, financial ratios, annual+quarterly financials, intraday OHLC, 30-day daily OHLCV, analyst targets, earnings forecasts, news. Use when an agent needs market data or company financials.

- **URL**: https://apify.com/zet46/google-finance-scraper.md
- **Developed by:** [An Tan Huynh](https://apify.com/zet46) (community)
- **Categories:** Business, AI, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Finance Scraper

Pulls Google Finance quote pages (`/finance/quote/<SYMBOL>:<EXCHANGE>`) and
decodes the 20 `AF_initDataCallback` blocks that Google renders server-side.
No headless browser — plain HTTP from an Apify datacenter US proxy is enough.

Six modes let you pay only for what you need. The cheapest, `quote`, is
`$0.0005` per ticker. The richest, `all`, is `$0.005` and bundles every
block the page carries.

### Modes

| Mode | Fields | Price |
|---|---|---|
| `quote` | price, change, previousClose, afterHours, timezone | $0.0005 |
| `quote_full` | quote + company profile + ratios + related peers + analyst ratings + upcoming earnings + news | $0.001 |
| `intraday` | per-minute close + volume for today's session (~390 points) | $0.002 |
| `history_daily` | daily OHLCV for ~30 days | $0.002 |
| `financials` | annual + quarterly series (revenue, operating income, EPS reported vs forecast, shares outstanding, fiscal end date; up to 27 annual + 111 quarterly periods) | $0.003 |
| `all` | every block above in one row | $0.005 |

### Input

```json
{
  "tickers": [
    {"symbol": "AAPL", "exchange": "NASDAQ"},
    {"symbol": "MSFT", "exchange": "NASDAQ"},
    "NVDA:NASDAQ",
    ".INX:INDEXSP",
    "EUR-USD",
    "BTC-USD"
  ],
  "mode": "quote_full"
}
```

Each `tickers` entry can be an object with `symbol` + optional `exchange`, or
a raw string. Google-specific symbols work:

- US stocks: `AAPL:NASDAQ`, `JPM:NYSE`, `BRK.A:NYSE`
- International: `7203:TYO` (Toyota), `0700:HKG` (Tencent), `ULVR:LON` (Unilever)
- Indexes: `.INX:INDEXSP`, `.DJI:INDEXDJX`, `.IXIC:INDEXNASDAQ`
- Forex pairs: `EUR-USD`, `GBP-JPY`
- Crypto: `BTC-USD`, `ETH-USD`

### Output (quote_full for AAPL)

```json
{
  "symbol": "AAPL",
  "exchange": "NASDAQ",
  "canonicalId": "AAPL:NASDAQ",
  "name": "Apple Inc",
  "currency": "USD",
  "price": 342.43,
  "change": -0.53,
  "changePercent": -0.15,
  "previousClose": 342.96,
  "afterHoursPrice": 346.72,
  "afterHoursChange": 4.29,
  "lastUpdate": "2026-10-15T18:37:12+00:00",
  "timezone": "America/New_York",
  "country": "US",
  "company": {
    "shortName": "Apple",
    "employees": 166000,
    "marketCap": 4997484950509.03,
    "high52Week": 348.1499,
    "low52Week": 243.42,
    "peRatio": 39.25,
    "sharesOutstanding": 14594180000,
    "address": {"city": "Cupertino", "state": "California", "country": "United States"}
  },
  "ratios": {
    "operatingMargin": 0.2583,
    "grossMargin": 0.6667,
    "netMargin": 0.0751,
    "epsBasic": 0.4536,
    "returnOnEquity": 0.104,
    "peRatio": 33.84,
    "beta": 0.9487
  },
  "related": [
    {"symbol": "NVDA", "price": 217.16, "change": -4.14},
    {"symbol": "AMZN", "price": 253.83, "change": -0.25}
  ],
  "analysts": {
    "summary": {"averageTarget": 338.31, "lowTarget": 245, "highTarget": 400, "ratingsCount": 31, "consensus": "Buy", "buyCount": 16, "holdCount": 4, "sellCount": 11}
  },
  "earnings": [
    {"fiscalYear": 2026, "fiscalQuarter": 4, "fiscalEndDate": "2026-09-30", "revenueForecast": 113626875100, "epsForecast": 1.98}
  ]
}
```

### Output (financials for AAPL, annual)

```json
{
  "financials": {
    "annual": [
      {"fiscalYear": 2025, "revenue": 416161000000, "operatingIncome": 112010000000, "epsReported": 7.46, "fiscalEndDate": "2025-09-27", "sharesOutstanding": 14776353000},
      {"fiscalYear": 2024, "revenue": 391035000000, "operatingIncome": 93736000000, "epsReported": 6.08, "fiscalEndDate": "2024-09-28", "sharesOutstanding": 15115823000},
      {"fiscalYear": 2023, "revenue": 383285000000, "operatingIncome": 96995000000, "epsReported": 6.13, "fiscalEndDate": "2023-09-30", "sharesOutstanding": 15552752000}
    ]
  }
}
```

### Rate limiting + proxy

Google rate-limits `/finance/quote/` per IP. The actor uses Apify's shared
datacenter US proxy (rotating per request) and falls back to the residential
pool if 403/429 persists. Each request is throttled by a 0.4–0.8 s jitter.

Expect ~2 tickers / second steady state. For large portfolios split into
multiple runs or raise memory.

### Which positions are exposed vs raw

The `financials` block decodes a 106-position tuple per fiscal period. Only
positions whose semantics match independently reported figures are exposed:

- `revenue`, `operatingIncome`, `epsReported`, `revenueTtm`,
  `epsConsensusActual`, `epsConsensusForecast`, `currency`, `fiscalEndDate`,
  `sharesOutstanding`.

Set `includeRawFinancials: true` to also receive the full 106-tuple in each
row (keyed `raw`). Positions 11-105 cover items like cost of revenue, gross
profit, balance sheet lines and cash flow items — the exact mapping varies
by sector classification, so they are not labelled.

### Not included

- Options chains (Google Finance does not SSR option tables).
- `/finance/markets/*` top-mover lists are planned for v0.2.
- Pre-market quotes outside US sessions.

# Actor input Schema

## `tickers` (type: `array`):

Required. List of symbols to fetch. Each entry can be a plain string 'AAPL' (exchange auto-resolved via Google's /finance?q= redirect), 'AAPL:NASDAQ' (explicit exchange), 'EUR-USD' (forex), 'BTC-USD' (crypto), '.INX:INDEXSP' (S\&P 500), or an object {symbol, exchange}. Provide at least one entry.

## `mode` (type: `string`):

What to extract per ticker. 'quote' = price + change + previousClose + afterHours + timezone (cheapest). 'quote_full' adds company profile, financial ratios, peer stocks, analyst ratings, upcoming earnings forecast and related news. 'intraday' returns per-minute OHLC + volume for today's session. 'history_daily' returns ~30 days of daily OHLCV. 'financials' returns annual + quarterly financials. 'all' bundles everything.

## `includeRawFinancials` (type: `boolean`):

Keep the raw 106-position tuple inside each financials row. Useful if you want metrics beyond revenue / operating income / EPS / shares outstanding (the only positions whose semantics are verified).

## `proxyConfiguration` (type: `object`):

Apify datacenter US proxy is used by default (Google Finance serves identical data regardless of IP, but Google rate-limits per IP so this rotates per request).

## Actor input object example

```json
{
  "tickers": [
    {
      "symbol": "AAPL",
      "exchange": "NASDAQ"
    },
    {
      "symbol": "MSFT",
      "exchange": "NASDAQ"
    },
    {
      "symbol": "NVDA",
      "exchange": "NASDAQ"
    }
  ],
  "mode": "quote",
  "includeRawFinancials": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `quotes` (type: `string`):

All scraped ticker rows as JSON items.

## `quotesCsv` (type: `string`):

The same rows as a CSV file.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tickers": [
        {
            "symbol": "AAPL",
            "exchange": "NASDAQ"
        },
        {
            "symbol": "MSFT",
            "exchange": "NASDAQ"
        },
        {
            "symbol": "NVDA",
            "exchange": "NASDAQ"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zet46/google-finance-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "tickers": [
        {
            "symbol": "AAPL",
            "exchange": "NASDAQ",
        },
        {
            "symbol": "MSFT",
            "exchange": "NASDAQ",
        },
        {
            "symbol": "NVDA",
            "exchange": "NASDAQ",
        },
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zet46/google-finance-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tickers": [
    {
      "symbol": "AAPL",
      "exchange": "NASDAQ"
    },
    {
      "symbol": "MSFT",
      "exchange": "NASDAQ"
    },
    {
      "symbol": "NVDA",
      "exchange": "NASDAQ"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zet46/google-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zet46/google-finance-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/u9LAF6Bnlk3LkKAqA/builds/okEwjdxP9Sd2sUbJb/openapi.json
