# Google Finance Scraper (`publicmoney/google-finance-scraper`) Actor

Extract Google Finance quotes for stocks, indices, currencies and crypto with no API key: price, change, both ranges, market cap, PE, dividend yield, analyst consensus and price target. Export data, run via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/publicmoney/google-finance-scraper.md
- **Developed by:** [Public Money](https://apify.com/publicmoney) (Apify)
- **Categories:** Business
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Google Finance has no API at all, official or otherwise, and the old GOOGLEFINANCE spreadsheet function only works inside Google Sheets. This Actor reads the Google Finance quote page and returns one structured record per instrument: price, change, both ranges, market cap, PE, dividend yield, and the analyst consensus with its average price target. A second mode returns the news Google carries for the instrument.

### What it does

- Returns **one record per requested instrument**, in order. An instrument Google does not list comes back with `status: "failed"` and a reason.
- Carries the **analyst consensus and average price target**, which Google publishes and most quote sources do not.
- Takes instruments in **Google's own `SYMBOL:EXCHANGE` form**, so the same ticker on two venues is unambiguous: `AAPL:NASDAQ` is not `AAPL:MEX`.
- Covers **stocks, indices, currency pairs and crypto** in one list.
- Optional **price history**, so you can pull a series rather than just a snapshot.
- Has a second mode for **news**, one record per story Google carries for the instrument.

### Use cases

| You need to | How this Actor does it |
| --- | --- |
| See what analysts think, not just the price | Read `analystConsensus` and `analystPriceTargetAverage` |
| Disambiguate a cross-listed ticker | Pass `SYMBOL:EXCHANGE` so you get the venue you meant |
| Replace GOOGLEFINANCE outside Sheets | Call the Actor from your own code and get the same data as JSON |
| Catch a 52-week breakout | Compare `value` against the 52-week high on each run |
| Feed a finance agent | Call the Actor over MCP and let the model ask for the symbol it needs |
| Build your own history | Schedule the run and let the dataset accumulate a row per symbol per run |

### Quick start

1. Click **Try for free**.
2. Add your instruments, one per line, as `SYMBOL:EXCHANGE`: `AAPL:NASDAQ`, `MSFT:NASDAQ`, `.INX:INDEXSP` for the S\&P 500, `EURUSD` for FX, `BTC-USD` for crypto.
3. Leave **Mode** on `quote`, or switch it to `news`.
4. Turn on **Include history** if you want a price series alongside the snapshot.
5. Click **Start**. Rows appear within seconds.
6. Export as JSON, CSV, Excel or XML, or read the dataset over the API.

### Input

| Field | Type | Default | What it controls |
| --- | --- | --- | --- |
| `instruments` | array | `AAPL:NASDAQ` | Instruments to read, in Google's `SYMBOL:EXCHANGE` form |
| `mode` | string | `quote` | `quote` returns a record per instrument, `news` a record per story |
| `newsPerInstrument` | integer | `5` | Stories per instrument in news mode |
| `includeHistory` | boolean | `false` | Adds a price series alongside the snapshot |
| `maxItems` | integer | `0` | Caps how many instruments are read. `0` reads them all |

```json
{
    "instruments": [
        "AAPL:NASDAQ",
        "MSFT:NASDAQ",
        ".INX:INDEXSP"
    ],
    "mode": "quote",
    "maxItems": 0
}
```

### Output

One dataset item per instrument. Fields Google does not publish are dropped rather than returned as `null`, so an index carries no PE and a currency pair carries no market cap.

| Field group | Fields |
| --- | --- |
| Identity | `status`, `instrument`, `name`, `exchange`, `currency`, `url` |
| Price | `value`, `change`, `changePercent`, `previousClose`, `dayLow`, `dayHigh` |
| 52-week range | `fiftyTwoWeekLow`, `fiftyTwoWeekHigh` |
| Fundamentals | `marketCap`, `peRatio`, `dividendYieldPercent`, `avgVolume` |
| Analyst | `analystConsensus`, `analystPriceTargetAverage` |
| News mode | `headline`, `publisher`, `datePublished`, `url` |
| Timing | `validFrom`, `scrapedAt` |

```json
{
    "status": "ok",
    "instrument": "AAPL:NASDAQ",
    "name": "Apple Inc",
    "exchange": "NASDAQ",
    "currency": "USD",
    "value": 319.97,
    "changePercent": -2.51,
    "previousClose": 328.21,
    "dayLow": 317.86,
    "dayHigh": 328.93,
    "marketCap": 4670000000000,
    "peRatio": 36.65,
    "dividendYieldPercent": 0.33,
    "analystConsensus": "Buy",
    "analystPriceTargetAverage": 352.18,
    "validFrom": "2026-09-04T20:00:01.000Z",
    "url": "https://www.google.com/finance/quote/AAPL:NASDAQ"
}
```

#### What does news mode return?

`mode: "news"` returns the stories Google carries for each instrument you named: `headline`, `publisher`, `datePublished` and `url`, plus the `instrument` the story was found under so rows join back to the quote records. News is charged as news items rather than as quote records.

### Integrations

Run it over the API and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/publicmoney~google-finance-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"instruments": ["AAPL:NASDAQ", "MSFT:NASDAQ", ".INX:INDEXSP"], "mode": "quote", "maxItems": 0}'
```

From Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("publicmoney/google-finance-scraper").call(run_input={"instruments": ["AAPL:NASDAQ", "MSFT:NASDAQ", ".INX:INDEXSP"], "mode": "quote", "maxItems": 0})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["value"], item["validFrom"])
```

Give an AI agent the Actor over MCP:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?actors=publicmoney/google-finance-scraper"
        }
    }
}
```

Schedules run it on any cron, webhooks fire when a run finishes, and platform integrations push the
dataset to Google Sheets, Slack, Airtable, Zapier or your own endpoint.

### Cost

Pay per event, so you pay for records rather than compute time.

| Event | Free tier | Top volume tier |
| --- | --- | --- |
| Record with data | $0.002 | $0.0007 |
| News article | $0.001 | $0.00035 |
| Actor start | $0.00005 per GB | Same |

A record that returned no data is published as a failure row and is **never charged**. Six volume tiers apply, so the per-record price falls with monthly volume.

### Troubleshooting

| Issue | Solution |
| --- | --- |
| An instrument returns `failed` | Google needs the exchange. Send `AAPL:NASDAQ`, not `AAPL`. Indices use their own prefix, such as `.INX:INDEXSP`. |
| I get the wrong listing for a ticker | The same ticker trades on several venues. The exchange half of the input decides which one, so check it matches the market you meant. |
| `analystConsensus` is missing | Google publishes analyst coverage only for instruments that have it. Indices, FX pairs and crypto carry none. |
| `peRatio` is missing | Google does not publish it for that instrument type. Indices, currencies and crypto have no earnings. |
| Every instrument returns `failed` | Google is rate limiting the run. Split large lists across parallel runs. |

### FAQ

#### Does Google Finance have an API?

No. Google retired its Finance API in 2012 and never replaced it. The GOOGLEFINANCE function works only inside Google Sheets, which is why this Actor reads the public quote page instead.

#### Can I use this instead of the GOOGLEFINANCE function?

Yes, and that is the main reason people reach for it. GOOGLEFINANCE only runs inside a Google Sheet, while this Actor returns the same data as JSON to any code, and can push into Sheets through the integration if that is where you want it.

#### What is the SYMBOL:EXCHANGE format?

Google's own instrument id, made of the ticker and the venue: `AAPL:NASDAQ`, `SHEL:LON`, `.INX:INDEXSP`. It is what makes a cross-listed ticker unambiguous. You can read it off the end of the Google Finance URL.

#### Does it return historical prices?

Yes, if you turn on **Include history**. Without it each record is the current snapshot stamped with `validFrom`.

#### Is there a Google Finance news API?

`mode: "news"` is the closest thing, returning the stories Google carries per instrument with headline, publisher, date and URL, charged as news items.

#### Do I need a Google Finance API key?

No. You need an Apify token to call the Actor over the API. No Google Finance credential is involved anywhere.

#### Can I get this data in Python?

Yes, with the `apify-client` package as shown above. It returns parsed JSON, so there is no HTML or response handling on your side.

#### Can I get the data into Excel or Google Sheets?

Yes. Export the dataset as XLSX or CSV, or connect the Google Sheets integration so each run appends to a sheet.

#### Can an AI agent call this Actor?

Yes. Add it to an MCP client with the config above and the model can request what it needs on its own. Every record is flat JSON with named fields, so no post-processing is needed.

#### Is it legal to scrape Google Finance?

This Actor reads public Google Finance data that needs no login and collects no personal data. Scraping public data is generally lawful, and how you store, redistribute or act on market data is governed by your own agreements and local rules. Take your own legal advice for your use case.

### Changelog

- **0.0.2** Added news mode, optional history and the analyst consensus block.
- **0.0.1** First release. Quote mode across stocks, indices, currencies and crypto.

### Feedback

Found a field Google Finance publishes that this Actor misses, or an input it rejects? Open an issue on the Issues tab with the input and what you expected. A daily test runs every Actor in the fleet against live sources, so parser fixes ship fast.

# Actor input Schema

## `instruments` (type: `array`):

Google Finance instrument keys or quote URLs, one per line. Listed equities and indices carry the exchange: 'AAPL:NASDAQ', 'KO:NYSE', '.INX:INDEXSP'. Crypto and currency pairs use a dash: 'BTC-USD', 'EUR-USD'. A URL such as 'https://www.google.com/finance/quote/AAPL:NASDAQ' is read as its key. A bare ticker such as 'AAPL' is tried against NASDAQ, NYSE, NYSEAMERICAN, NYSEARCA and OTCMKTS in that order.

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

Quote returns one record per instrument. News returns one record per story from that instrument's quote page, charged as news items rather than as quotes. Neither costs an extra request — the stories are in the page already fetched.

## `newsPerInstrument` (type: `integer`):

How many stories to return per instrument in news mode, newest first. Google carries a rolling window per instrument, so a value above what it holds returns everything available. Ignored in quote mode. Examples: 3, 5, 20. Default is 5.

## `maxItems` (type: `integer`):

Maximum number of instruments to read, counted from the top of the list. Use it to cap spend on a long list without editing the list itself. Examples: 10, 50, 200. Default is 0, which reads every instrument given.

## `includeHistory` (type: `boolean`):

Adds a price series alongside the quote snapshot. It costs an extra request per instrument, so leave it off for a price-only run. Examples: true for a chart, false for a snapshot. Default is off.

## Actor input object example

```json
{
  "instruments": [
    "AAPL:NASDAQ",
    "BTC-USD",
    "https://www.google.com/finance/quote/KO:NYSE"
  ],
  "mode": "quote",
  "newsPerInstrument": 5,
  "maxItems": 0,
  "includeHistory": false
}
```

# Actor output Schema

## `results` (type: `string`):

One item per instrument scraped by the run, in the default dataset.

# 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 = {
    "instruments": [
        "AAPL:NASDAQ",
        "BTC-USD",
        "https://www.google.com/finance/quote/KO:NYSE"
    ],
    "mode": "quote",
    "newsPerInstrument": 5,
    "maxItems": 0,
    "includeHistory": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("publicmoney/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 = {
    "instruments": [
        "AAPL:NASDAQ",
        "BTC-USD",
        "https://www.google.com/finance/quote/KO:NYSE",
    ],
    "mode": "quote",
    "newsPerInstrument": 5,
    "maxItems": 0,
    "includeHistory": False,
}

# Run the Actor and wait for it to finish
run = client.actor("publicmoney/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 '{
  "instruments": [
    "AAPL:NASDAQ",
    "BTC-USD",
    "https://www.google.com/finance/quote/KO:NYSE"
  ],
  "mode": "quote",
  "newsPerInstrument": 5,
  "maxItems": 0,
  "includeHistory": false
}' |
apify call publicmoney/google-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,publicmoney/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/WZ1hBwfVm95bErVzb/builds/Rpu09Q7rXdqYghkvc/openapi.json
