# Google Finance API (`johnvc/google-finance-api`) Actor

Extract real-time stock quotes, price history, market indices, financial statements, and company news from Google Finance. Supports stocks, ETFs, indices, currencies, and crypto - single symbol or batch portfolio runs.

- **URL**: https://apify.com/johnvc/google-finance-api.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** News, Integrations, E-commerce
- **Stats:** 39 total users, 11 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $19.41 / 1,000 quote fetcheds

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 API

The **Google Finance API** extracts real-time stock quotes, price history graphs, financial statements, market indices, company info, and related news from Google Finance. Supports stocks, ETFs, indices, currencies, and crypto: run a single symbol or scrape an entire portfolio in one call.

***

### What This Actor Returns

For each symbol queried, the actor returns:

- **Real-time quote** - current price, price change, percent change, exchange, currency, and after-hours data
- **Price history graph** - intraday or historical price and volume data points for your chosen time window (1D to MAX)
- **Market overview** - US, European, and Asian indices; major currencies; top cryptocurrencies; futures; and top market news
- **Company knowledge graph** - market cap, P/E ratio, 52-week high/low, dividend yield, EPS, and company description
- **Related news** - headlines with title, source, date, and link
- **Financial statements** - income statement, balance sheet, and cash flow data (where available)
- **Related instruments** - stocks, ETFs, and other instruments suggested by Google Finance

Each symbol is pushed as a separate item in the Apify dataset. One run can scrape a single ticker or an entire portfolio.

***

### Use Cases

- **Portfolio monitoring** - batch-fetch quotes and key stats for all your holdings in one run
- **Financial research** - pull income statements, balance sheets, and cash flow data for analysis
- **Earnings tracking** - monitor EPS, revenue, and quarterly financials over time
- **Market dashboards** - build real-time dashboards with index levels, currency rates, and crypto prices
- **Crypto and currency data** - fetch BTC-USD, ETH-USD, EUR-USD, and other pairs alongside traditional equities
- **News aggregation** - collect finance news for any symbol or market segment

***

### 🔌 Integrations: Automate Your Google Finance API Pipeline

A single run answers one question: what is this stock worth right now? The real value comes from running the Google Finance API on a schedule, so quotes, financial statements, and news accumulate into a history you can chart, alert on, and hand to other tools. Browse the full list of [Apify platform integrations](https://docs.apify.com/platform/integrations) for every connector.

#### Tasks and schedules (the core recipe)

Save one [task](https://docs.apify.com/platform/actors/running/tasks) per thing you monitor: a "Daily Portfolio" task with your holdings in `queries`, a "Crypto Watch" task with `BTC-USD` and `ETH-USD`, an "Index Board" task with the major indices. Then attach a [schedule](https://docs.apify.com/platform/schedules) from the Actor's **Actions**, then **Schedule** menu. One schedule can trigger many tasks at once, so a single daily job refreshes everything you follow.

Cron strings that suit market data:

- `0 21 * * 1-5` captures the US close on weekdays
- `0 */6 * * *` refreshes every six hours for around-the-clock crypto
- `0 7 * * 1` pulls a Monday-morning snapshot for a weekly report

#### Store price history in Supabase (Python)

Run the Actor and bulk-insert the flat quote rows into a Supabase table so a price history builds up across runs. This uses the real Actor id `johnvc/google-finance-api` and real output fields (`summary.title`, `summary.price`, `search_timestamp`):

```python
from apify_client import ApifyClient
from supabase import create_client

apify = ApifyClient("YOUR_APIFY_TOKEN")
supabase = create_client("YOUR_SUPABASE_URL", "YOUR_SUPABASE_KEY")

run = apify.actor("johnvc/google-finance-api").call(run_input={
    "queries": ["GOOGL:NASDAQ", "AAPL:NASDAQ", "BTC-USD"],
    "window": "1D",
})

rows = []
for item in apify.dataset(run["defaultDatasetId"]).iterate_items():
    summary = item.get("summary", {})
    params = item.get("search_parameters", {})
    rows.append({
        "symbol": params.get("q"),
        "title": summary.get("title"),
        "price": summary.get("price"),
        "captured_at": item.get("search_timestamp"),
    })

supabase.table("finance_quotes").insert(rows).execute()
```

Prefer no code? Chain an n8n **Google Finance API** node into a **Supabase** node for the same result. The full Python and MCP walkthrough lives in the [example repo](https://github.com/johnisanerd/Apify-Google-Finance-API).

#### n8n, Make, and Zapier

This API ships as an n8n community node (see the **n8n integration** section below) and connects to [Make](https://docs.apify.com/platform/integrations/make) and [Zapier](https://docs.apify.com/platform/integrations/zapier) with the same trigger-then-act pattern: schedule a run, filter the result, then push it to a sheet, a database, or a chat channel.

#### MCP and AI agents

Add the Actor to any MCP client through the hosted [Apify MCP server](https://mcp.apify.com/) and ask an agent questions like "did any of my holdings drop more than three percent today?" The **Use with Claude, Cursor, and Any MCP Client** section below has the setup steps, or run the [Get live stock quotes in Claude via MCP](https://apify.com/johnvc/google-finance-api/examples/get-live-stock-quotes-in-claude-via-mcp?fpr=9n7kx3) task to see it working.

#### Webhooks

For anything custom, add an Apify [webhook](https://docs.apify.com/platform/integrations/webhooks) on the `ACTOR.RUN.SUCCEEDED` event to POST each finished run to your own endpoint.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `queries` | string\[] | Yes (or `q`) | - | List of symbols for batch runs, e.g. `["GOOGL:NASDAQ", "BTC-USD"]`. Takes precedence over `q`. |
| `q` | string | Yes (or `queries`) | - | Single symbol for a quick lookup, e.g. `"GOOGL:NASDAQ"`. Ignored if `queries` is set. |
| `hl` | string | No | `"en"` | Language code (ISO 639-1) for news and descriptions, e.g. `"es"`, `"de"`. |
| `window` | string | No | `"1D"` | Time window for price history graph: `1D`, `5D`, `1M`, `6M`, `YTD`, `1Y`, `5Y`, `MAX`. |
| `max_queries` | integer | No | `0` | Cap the number of symbols processed. `0` = unlimited (process all). |
| `output_file` | string | No | - | Optional filename to save results as JSON (e.g. `"portfolio.json"`). |

#### Symbol Format Guide

| Instrument | Format | Examples |
|-----------|--------|---------|
| US stocks | `TICKER:EXCHANGE` | `GOOGL:NASDAQ`, `AAPL:NASDAQ`, `MSFT:NASDAQ`, `JPM:NYSE` |
| International stocks | `TICKER:EXCHANGE` | `BP:LON`, `SAP:ETR`, `7203:TYO` |
| Cryptocurrencies | `TICKER-USD` | `BTC-USD`, `ETH-USD`, `SOL-USD` |
| Currency pairs | `BASE-QUOTE` | `EUR-USD`, `GBP-JPY`, `USD-JPY` |
| US indices | `.TICKER:INDEXID` | `.DJI:INDEXDJX`, `.IXIC:INDEXNASDAQ`, `.INX:INDEXSP` |

***

### Example Output

#### Single Symbol

**Input:**

```json
{
  "q": "GOOGL:NASDAQ"
}
```

**Output item (truncated):**

```json
{
  "search_timestamp": "2026-05-07T14:30:00.123456",
  "search_parameters": {
    "q": "GOOGL:NASDAQ",
    "hl": "en",
    "window": "1D"
  },
  "search_metadata": {
    "status": "Success"
  },
  "summary": {
    "title": "Alphabet Inc Class A",
    "price": "166.32",
    "stock": {
      "price": 166.32,
      "price_movement": {
        "percentage": 0.49,
        "value": 0.81,
        "movement": "Up"
      }
    },
    "market_info": {
      "exchange": "NASDAQ",
      "currency": "USD"
    }
  },
  "graph": [
    { "date": "May 7, 2:00 AM", "price": 163.91, "volume": 1450000 },
    { "date": "May 7, 9:30 AM", "price": 165.51, "volume": 3820000 }
  ],
  "knowledge_graph": {
    "title": "Alphabet Inc Class A",
    "type": "NASDAQ: GOOGL",
    "key_stats": [
      { "label": "Market cap", "value": "2.03T USD" },
      { "label": "P/E ratio", "value": "18.13" },
      { "label": "Div yield", "value": "0.50%" },
      { "label": "52-wk high", "value": "208.70" },
      { "label": "52-wk low", "value": "140.53" }
    ]
  },
  "news_results": [
    {
      "date": "3 days ago",
      "title": "Alphabet Reports Record Q1 Revenue",
      "link": "https://example.com/article",
      "source": "Reuters"
    }
  ],
  "financials": [
    {
      "title": "Income Statement",
      "annual": [
        {
          "year": "TTM",
          "revenue": "359.5B",
          "net_income": "115.7B"
        }
      ]
    }
  ],
  "markets": {
    "us": [
      { "market_index": "S&P 500", "stock": { "price": 5627.89, "price_movement": { "movement": "Up" } } }
    ]
  },
  "discover_more": [
    {
      "title": "People also search for",
      "items": [
        { "name": "Microsoft", "price": "449.15", "extracted_price": 449.15 }
      ]
    }
  ]
}
```

#### Multi-Symbol Portfolio

**Input:**

```json
{
  "queries": ["GOOGL:NASDAQ", "AAPL:NASDAQ", "BTC-USD"],
  "window": "1Y"
}
```

The actor pushes **one dataset item per symbol**, so the dataset contains 3 items - one for each of GOOGL, AAPL, and BTC. Each item has the same structure as the single-symbol example above with 1-year price history.

***

### Pricing

| Event | Cost | When charged |
|-------|------|-------------|
| Setup | $0.02 | Once per run |
| Per symbol | $0.02 | Per symbol fetched |

**Examples:**

- 1 symbol → $0.04 total
- 10 symbols → $0.22 total
- 50 symbols (full portfolio) → $1.02 total

***

### How to Get Started

#### Quick start - single symbol

```json
{
  "q": "GOOGL:NASDAQ"
}
```

#### Portfolio run - multiple symbols

```json
{
  "queries": [
    "GOOGL:NASDAQ",
    "AAPL:NASDAQ",
    "MSFT:NASDAQ",
    "AMZN:NASDAQ",
    "BTC-USD",
    "EUR-USD",
    ".DJI:INDEXDJX"
  ],
  "window": "1Y",
  "hl": "en"
}
```

#### Get financial statements only

```json
{
  "queries": ["GOOGL:NASDAQ", "AAPL:NASDAQ", "MSFT:NASDAQ"],
  "window": "1D"
}
```

Then use the `?view=financials` dataset endpoint for a focused financial statements view.

***

### Use with Claude, Cursor, and Any MCP Client

This actor is available as an **MCP (Model Context Protocol) tool**, letting you query Google Finance data directly inside Claude, Cursor, or any MCP-compatible AI client ,  no code required. Ask questions in plain English and get live financial data back.

#### How to Connect

[![Watch the setup tutorial on YouTube](https://img.shields.io/badge/YouTube-Setup_Tutorial-red?logo=youtube)](https://www.youtube.com/watch?v=BKu8H91uCTg)

1. Open the actor on Apify and click **API** → **MCP Server**
2. Copy your personal MCP server URL
3. Add it to your Claude Desktop or Cursor config (see the [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp) for step-by-step instructions)
4. Ask financial questions in plain English

#### Example Prompts

- *"Is TSLA up or down vs its 200-day moving average right now?"*
- *"Compare NVDA's last 8 quarters of revenue growth vs SPY"*
- *"What's Apple's current P/E ratio and market cap?"*
- *"Show me Bitcoin's price history for the last month"*
- *"Fetch quotes for my portfolio: GOOGL, AAPL, MSFT, AMZN, NVDA"*
- *"Rank my holdings by today's volatility"*

> Note: this actor returns market **data only** ,  it is not financial advice.

***

### 💸 Pay per run with crypto (x402)

The Google Finance API supports agentic payments via the [x402 protocol](https://docs.apify.com/platform/integrations/x402).
AI agents and MCP clients can pay for runs in USDC (on Base) with no Apify account or API token needed:
point your agent at the [Apify MCP server](https://mcp.apify.com/?tools=actors,docs,johnvc/google-finance-api) and it can
discover, pay for, and run this Actor autonomously. Read the
[Apify x402 announcement](https://apify.com/change-log/pay-for-apify-actors-with-x402?fpr=9n7kx3) for details.

### 🔗 Related Tools

A market or research pipeline usually needs more than quotes. These related APIs from the same portfolio pair well with the Google Finance API:

- **[Congress Financial Disclosures & Stock Trades](https://apify.com/johnvc/us-congress-financial-disclosures-and-stock-trading-data?fpr=9n7kx3)** tracks the stock trades and financial disclosures of US members of Congress, so you can cross-reference political trading against live prices.
- **[Earnings Call Transcript API](https://apify.com/johnvc/earnings-call-transcript-api?fpr=9n7kx3)** pulls full earnings call transcripts and SEC 8-K filings, the qualitative context behind the financial statements this Actor returns.
- **[Google News API](https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3)** collects finance and company headlines at scale when you need broader news coverage than a single symbol's feed.
- **[Crunchbase Company API](https://apify.com/johnvc/crunchbase-company-api?fpr=9n7kx3)** adds funding rounds, investors, and firmographics for the companies behind the tickers.

For contrast, other Google Finance scrapers on the Store, such as [this alternative](https://apify.com/codingfrontend/google-finance-scraper?fpr=9n7kx3), carry a very small user base, no ratings, and an empty README, and return a quote-only field set (price, market cap, P/E, dividend yield, and 52-week range). They do not return price history graphs, market indices, financial statements, or crypto and currency pairs. This API is actively maintained, documented, and returns the full dataset described above.

***

### FAQ

#### What symbol format should I use?

For US stocks: `TICKER:EXCHANGE` (e.g. `GOOGL:NASDAQ`, `JPM:NYSE`). For crypto: `TICKER-USD` (e.g. `BTC-USD`). For currencies: `BASE-QUOTE` (e.g. `EUR-USD`). For indices: `.TICKER:INDEXID` (e.g. `.DJI:INDEXDJX`). You can search Google Finance directly to find the exact symbol format for international equities.

#### What if I enter a company name like "Google" instead of a symbol?

Plain company names won't return data. Google Finance requires a symbol in the formats described above - `GOOGL:NASDAQ`, not `Google`. If you submit an unrecognized query, the actor will push an error record to the dataset and you will still be charged for the attempt (the underlying API call was made). To avoid wasted charges, use the Symbol Format Guide above or look up the correct symbol on [Google Finance](https://www.google.com/finance) first.

#### What happens if a symbol has no results?

The actor pushes an error record for that symbol with `"error": true` and a descriptive message. Other symbols in the same run continue processing - one bad symbol won't abort the run.

#### Are financial statements available for all symbols?

Financial statements (income statement, balance sheet, cash flow) are only available for equities. Crypto, currencies, and indices return `null` for the `financials` field.

#### How many symbols can I fetch in one run?

There is no hard limit. Use `max_queries` to cap the run. For large portfolios, the actor processes each symbol sequentially and charges per symbol.

#### What is the `window` parameter for?

It controls the time range of the price history graph returned in the `graph` field. `1D` returns intraday data points; `5Y` or `MAX` returns multi-year historical price points. The quote summary (`summary`) always reflects the current real-time price regardless of the window.

#### Can I schedule the Google Finance API?

Yes, and this is where most of the value is. Any run can be automated on a [schedule](https://docs.apify.com/platform/schedules). Save a [task](https://docs.apify.com/platform/actors/running/tasks) with your symbols in `queries`, then open the Actor's **Actions**, then **Schedule** menu and pick a cadence. Common patterns are `0 21 * * 1-5` to capture the US market close on weekdays, `0 */6 * * *` every six hours for crypto, and `0 7 * * 1` for a Monday-morning snapshot. One schedule can trigger several tasks at once, so a single daily job can refresh your portfolio, your crypto watchlist, and the index board together. See the **Integrations** section above for the full monitoring recipe.

#### Should I use an API or a web scraper?

An official finance API is usually rate limited, quota bound, and missing fields like intraday graphs or full financial statements. This Actor gives you the same Google Finance data as a no-code web scraper, or as a clean [API](https://en.wikipedia.org/wiki/API) endpoint you call yourself, with no quotas to manage. If the distinction is new to you, it is the difference between calling a maintained data feed and [web scraping](https://en.wikipedia.org/wiki/Web_scraping) the page yourself. Either way you get structured JSON back.

#### Does Google Finance have an official API, and is it free?

Google's own Google Finance API was deprecated years ago, so there is no supported first-party endpoint. This Actor is the practical replacement: it returns the same data you see on the [Google Finance](https://www.google.com/finance) site as structured JSON. Running it is not free at zero cost; pricing is pay per symbol (see the Pricing section above), which keeps small lookups to a few cents while large portfolios stay predictable.

#### Can I use the Google Finance API programmatically?

Yes. The Apify API gives full programmatic access to run the Actor, schedule it, and fetch datasets, and the `apify-client` package is available for both Node.js and Python. Grab your endpoints and code samples from the Actor's [API tab](https://apify.com/johnvc/google-finance-api/api?fpr=9n7kx3). For a complete Python quick start, including how to call the Google Finance API in Python, see the [example repo](https://github.com/johnisanerd/Apify-Google-Finance-API).

#### Can I integrate this Google Finance scraper with other apps?

Yes. The Actor connects to almost any cloud service through [Apify integrations](https://docs.apify.com/platform/integrations): [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), Google Sheets, and more. For custom actions, add a [webhook](https://docs.apify.com/platform/integrations/webhooks) on the `ACTOR.RUN.SUCCEEDED` event. See the Integrations section above for copy-paste recipes.

#### Can I use this Google Finance scraper through an MCP server?

Yes. The Actor can be added as a tool to any MCP client, such as [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial), Claude Desktop, or Cursor, through the hosted [Apify MCP server](https://mcp.apify.com/). Use the Actor-specific URL `https://mcp.apify.com/?tools=actors,docs,johnvc/google-finance-api`, then ask for live quotes in plain English. See the [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp) and the "Use with Claude, Cursor, and Any MCP Client" section above.

#### Can I use Google Finance data with AI assistants?

Yes. Beyond the MCP setup above, the clean JSON this Actor returns drops straight into an AI workflow: feed a run's dataset to an agent or a spreadsheet AI function and ask it to summarize your portfolio, flag outliers, or draft a market note. It is a practical way to build a Google Finance AI workflow without waiting for an official AI product from Google.

#### How else can I track markets and company data?

Pair this API with related tools in the same portfolio: [Congress Financial Disclosures & Stock Trades](https://apify.com/johnvc/us-congress-financial-disclosures-and-stock-trading-data?fpr=9n7kx3) for political trading activity, the [Earnings Call Transcript API](https://apify.com/johnvc/earnings-call-transcript-api?fpr=9n7kx3) for the story behind the numbers, and the [Google News API](https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3) for broader headline coverage. See the Related Tools section above for the full list.

***

### n8n integration

Available as an n8n community node, **[n8n-nodes-google-finance-api](https://www.npmjs.com/package/n8n-nodes-google-finance-api)**. In n8n: Settings, Community Nodes, install `n8n-nodes-google-finance-api`, then use it in any workflow (it also works as an AI Agent tool).

***

### Featured Tasks

Ready-to-run examples that show this API solving a specific problem. Each opens its own setup so you can
run it on your account in one click.

- [Download NVDA stock price history to CSV](https://apify.com/johnvc/google-finance-api/examples/download-nvda-stock-price-history-to-csv?fpr=9n7kx3) - Nvidia's price series for any window plus key stats, exportable to CSV.
- [Get NSE stock quotes like Reliance by API](https://apify.com/johnvc/google-finance-api/examples/get-nse-stock-quotes-like-reliance-by-api?fpr=9n7kx3) - live NSE quotes with price, currency, and key stats as clean JSON.
- [Get live stock quotes in Claude via MCP](https://apify.com/johnvc/google-finance-api/examples/get-live-stock-quotes-in-claude-via-mcp?fpr=9n7kx3) - live ticker quotes inside [Claude](https://claude.ai/referral/uIlpa7nPLg) (free trial available) chat via MCP, with price and key stats.
- [Monitor a Stock Portfolio With Google Finance](https://apify.com/johnvc/google-finance-api/examples/monitor-stock-portfolio-with-google-finance?fpr=9n7kx3) - batch-fetch live price, percent change, and key stats for every holding in one run.
- [Get Market Data to Power a Finance Dashboard](https://apify.com/johnvc/google-finance-api/examples/market-data-for-a-finance-dashboard?fpr=9n7kx3) - index levels, currency rates, crypto prices, and per-symbol quotes returned as clean JSON.

***

### 🌐 About Alpha OSINT

This Actor is part of [Alpha OSINT](https://www.alphaosint.com), toolset of financial and operations data sources and APIs.
See the [Google Finance API source page](https://www.alphaosint.com/sources/google-finance-api/) for related tools and use cases.
For support or requests for this actor, please start a ticket [directly on our support page](https://apify.com/johnvc/google-finance-api/issues/open?fpr=9n7kx3).

Last Updated: 2026.09.10

# Actor input Schema

## `queries` (type: `array`):

List of symbols in Google Finance format (e.g. \["GOOGL:NASDAQ", "AAPL:NASDAQ", "BTC-USD", "EUR-USD", ".DJI:INDEXDJX"]). Plain company names like "Google" will not return data - use the ticker:exchange format shown in the Symbol Format Guide in the README. Takes precedence over 'q' when both are set.

## `q` (type: `string`):

A single symbol in Google Finance format (e.g. "GOOGL:NASDAQ"). Plain company names like "Google" will not return data - use the ticker:exchange format shown in the Symbol Format Guide in the README. Ignored if 'queries' is set.

## `hl` (type: `string`):

Language code for results (ISO 639-1, e.g. "en", "es", "de", "fr"). Controls the language of news articles and company descriptions returned.

## `window` (type: `string`):

Time window for the price history graph. 1D = 1 day (intraday), 5D = 5 days, 1M = 1 month, 6M = 6 months, YTD = year to date, 1Y = 1 year, 5Y = 5 years, MAX = maximum available.

## `max_queries` (type: `integer`):

Maximum number of symbols to process in this run. Set to 0 for unlimited (process all symbols in the list).

## `output_file` (type: `string`):

Optional filename to save all results as a JSON file in the actor's working directory (e.g. "results.json"). Leave blank to skip file output.

## Actor input object example

```json
{
  "queries": [
    "GOOGL:NASDAQ",
    "AAPL:NASDAQ",
    "BTC-USD"
  ],
  "q": "GOOGL:NASDAQ",
  "hl": "en",
  "window": "1D",
  "max_queries": 0
}
```

# Actor output Schema

## `allResults` (type: `string`):

Complete dataset - one item per symbol. Each item includes the real-time quote summary, price history graph, market indices, knowledge graph, news, financial statements, and related instruments.

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

Lightweight quote view - symbol, current price, price change, percent change, exchange, and after-hours data. One row per symbol. Ideal for portfolio dashboards.

## `financials` (type: `string`):

Income statement, balance sheet, and cash flow data extracted from Google Finance. One row per symbol. Returns null for symbols that have no financial statements (e.g. crypto, currencies, indices).

# 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 = {
    "queries": [
        "GOOGL:NASDAQ",
        "AAPL:NASDAQ",
        "BTC-USD"
    ],
    "q": "GOOGL:NASDAQ",
    "hl": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnvc/google-finance-api").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 = {
    "queries": [
        "GOOGL:NASDAQ",
        "AAPL:NASDAQ",
        "BTC-USD",
    ],
    "q": "GOOGL:NASDAQ",
    "hl": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("johnvc/google-finance-api").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 '{
  "queries": [
    "GOOGL:NASDAQ",
    "AAPL:NASDAQ",
    "BTC-USD"
  ],
  "q": "GOOGL:NASDAQ",
  "hl": "en"
}' |
apify call johnvc/google-finance-api --silent --output-dataset

```

## MCP server setup

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

```

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/AcKc1V9tbsoPtyhWU/builds/g8DNaAlzo8pHDWf4Y/openapi.json
