# Google Finance (`canadesk/google-finance`) Actor

Get the latest Quotes and Historical data for Stocks, Indexes, Crypto, Exchange rates and more from Google Finance. It's fast and costs little!

- **URL**: https://apify.com/canadesk/google-finance.md
- **Developed by:** [Canadesk Support](https://apify.com/canadesk) (community)
- **Categories:** News, Social media, SEO tools
- **Stats:** 94 total users, 1 monthly users, 100.0% runs succeeded, 7 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

⚡ Make sure to increase the Actor's memory and timeout for long runs.

### Input

- Tickers (array)

  Returns data for the listed tickers.

  Expected format: {CODE} or {CODE}:{EXCHANGE} or {CODE}-{CODE} (for Cryptocurrency).

  Examples: GOOGL or GOOGL:NASDAQ or BTC-USD.

- Process (select)

  - **Search**

    {CODE} or {CODE}-{CODE} returns a list of potential matches with general information for each ticker.

    {CODE}:{EXCHANGE} returns general information for the exact ticker.

  - **Get Price**

    {CODE} or {CODE}-{CODE} returns a list of potential matches with price information for each ticker.

    {CODE}:{EXCHANGE} returns price information for the exact ticker.

  - **Get History**

    {CODE} first tries to find the most relevant exchange, then returns history information.

    **Recommended!** {CODE}:{EXCHANGE} or {CODE}-{CODE} returns history information without overhead.

- Batch (integer)

  Number of parallel requests to be executed - only relevant when there is more than 1 ticker.

  Default is 1. The higher the number, the more chances you have to be blocked.

- Delay (integer)

  For high-volume scraping, make sure to set a reasonable waiting time.

### Supported Exchange Codes

Original list: <https://www.google.com/googlefinance/disclaimer/>

```
[
	"BCBA", "BMV", "BVMF", "CNSX", "CVE", "NASDAQ", "NYSE", "NYSEARCA", "NYSEAMERICAN", "OPRA", "OTCMKTS", "TSE", "TSX", "TSXV",
	"AMS", "BIT", "BME", "CPH", "EBR", "ELI", "EPA", "ETR", "FRA", "HEL", "ICE", "IST", "LON", "RSE", "STO", "SWX", "VTX", "TAL", "VIE", "VSE", "WSE",
	"JSE", "TADAWUL", "TLV",
	"BKK", "BOM", "KLSE", "HKG", "IDX", "KOSDAQ", "KRX", "NSE", "SGX", "SHA", "SHE", "TPE", "TYO",
	"ASX", "NZE",
	"MUTF", "MUTF_IN",
	"INDEXBVMF", "INDEXCBOE", "INDEXCME", "INDEXDJX", "INDEXNASDAQ", "INDEXNYSEGIS", "INDEXRUSSELL", "INDEXSP", "INDEXBMV", "INDEXTSI",
	"INDEXBIT", "INDEXBME", "INDEXDB", "INDEXEURO", "INDEXFTSE", "INDEXIST", "INDEXSTOXX", "INDEXSWX", "INDEXVIE",
	"INDEXBKK", "INDEXBOM", "INDEXHANGSENG", "INDEXNIKKEI", "INDEXTYO", "INDEXTOPIX", "IDX", "SHE", "TPE",
	"INDEXASX", "INDEXNZE",
	"CBOT", "CME_EMINIS", "COMEX", "NYMEX"
]
```

### Output

For "Search" and "Get Price", using {CODE}:{EXCHANGE} returns a single entry instead.

**Search** with {CODE} returns:

```
{
	"ticker": "GOOGL",
	"data": [
		{
			"id": "GOOGL:NASDAQ",
			"code": "GOOGL",
			"name": "Alphabet Inc Class A",
			"exchange": "NASDAQ"
		},
		{
			"id": "GOOGL:BMV",
			"code": "GOOGL",
			"name": "Alphabet Inc Class A",
			"exchange": "BMV"
		},
		...
	]
}
```

**Get Price** with {CODE} returns:

```
{
	"ticker": "GOOGL",
	"data": [
		{
			"id": "/m/07zln7n",
			"ticker": "GOOGL:NASDAQ",
			"code": "GOOGL",
			"exchange": "NASDAQ",
			"name": "Alphabet Inc Class A",
			"currency": "USD",
			"price": {
				"lastPrice": 191.79,
				"change": 2.3600006,
				"changePct": 1.2458432
			},
			"previousClose": 189.43,
			"region": "US",
			"updateTimestamp": 1735954200,
			"timezone": "America/New_York",
			"timezoneOffset": -18000,
			"afterHrsTrading": {
				"lastPrice": 191.97,
				"change": 0.18000793,
				"changePct": 0.09385679
			},
			"previousTimestamp": 1735938001,
			"afterHrsTimestamp": 1735952308
		},
		{
			"id": "/g/11bbrjxcfr",
			"ticker": "GOOGL:BMV",
			"code": "GOOGL",
			"exchange": "BMV",
			"name": "Alphabet Inc Class A",
			"currency": "MXN",
			"price": {
				"lastPrice": 3953.04,
				"change": 57.66992,
				"changePct": 1.4804735
			},
			"previousClose": 3895.37,
			"region": "MX",
			"updateTimestamp": 1735939372,
			"timezone": "America/Mexico_City",
			"timezoneOffset": -21600,
			"afterHrsTrading": null,
			"previousTimestamp": 1735938000,
			"afterHrsTimestamp": null
		},
		...
	]
}
```

**Get History** returns:

```
{
	"ticker": "GOOGL:NASDAQ",
	"data": [
		{
			"dateTimeUTC": "2025-01-27T14:30:00.000Z",
			"price": {
				"lastPrice": 194.83,
				"change": 0,
				"changePct": 0
			},
			"volume": 237264
		},
		{
			"dateTimeUTC": "2025-01-27T15:00:00.000Z",
			"price": {
				"lastPrice": 193.14,
				"change": -1.6900000000000261,
				"changePct": -0.008674228814864375
			},
			"volume": 1691500
		},
		...
	]
}
```

### Support

Google Finance does not provide volume for all types (e.g., Cryptocurrency).

Open a new issue for bugs or feature requests. Please share the run URL.

Cheers!

# Actor input Schema

## `process` (type: `string`):

See Information tab.

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

Format: {CODE} or {CODE}:{EXCHANGE}.

## `period` (type: `string`):

Only for Get History.

## `batch` (type: `integer`):

Only relevant for Get All Reviews. See Information tab.

## `delay` (type: `integer`):

Only for API. Waiting time between requests.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "process": "gh",
  "tickers": [
    ".DJI",
    "SWPPX:MUTF",
    "GOOGL:NASDAQ",
    "ETH-BTC",
    "EUR-USD"
  ],
  "period": "5d",
  "batch": 2,
  "delay": 3,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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": [
        ".DJI",
        "SWPPX:MUTF",
        "GOOGL:NASDAQ",
        "ETH-BTC",
        "EUR-USD"
    ],
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("canadesk/google-finance").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": [
        ".DJI",
        "SWPPX:MUTF",
        "GOOGL:NASDAQ",
        "ETH-BTC",
        "EUR-USD",
    ],
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("canadesk/google-finance").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": [
    ".DJI",
    "SWPPX:MUTF",
    "GOOGL:NASDAQ",
    "ETH-BTC",
    "EUR-USD"
  ],
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call canadesk/google-finance --silent --output-dataset

```

## MCP server setup

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

```

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/5BAb5hv8YFQXEweKU/builds/SdlqD5OxKOQTezgfk/openapi.json
