---
title: "Google Finance API: Stock Quotes and History as JSON"
description: "Six Google Finance endpoints return quotes, history, intraday, markets and indices as JSON at 1 credit a call. Parameters, a recorded AAPL quote and costs."
url: https://perceptlayer.com/blog/google-finance-api-stock-quotes
---

[Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides)

# Google Finance API: Stock Quotes and History as JSON

10 Jul 2026 Perceptlayer 8 min read

Google Finance is a website and a spreadsheet function, not a JSON API, but Perceptlayer's Google Finance API returns data from the Google Finance site as JSON. Six endpoints cover search, quotes, history, intraday, markets and indices. Each successful call costs 1 credit, and failed calls cost nothing. Send a ticker in `symbol`, add `exchange` when it's ambiguous, and read the result.

## Key takeaways

-   `GET /v1/google-finance/quote` needs only `symbol`; adding `exchange=NASDAQ` pins the listing. The recorded AAPL response carries `summary`, `key_stats`, `about` and `financials`.
-   All six endpoints cost 1 credit per successful call. Failed calls return `X-Credits-Used: 0`.
-   `historical` takes `interval` (daily, weekly or monthly) plus `range`, `start_date` and `end_date`.
-   `markets` takes `trend` (gainers, losers, most-active and more) and `index_market` (americas, europe-middle-east-africa, asia-pacific).
-   Data is returned as found at the time of the call. It is not a trading feed.

## Is there an official Google Finance API?

Not one we can point you to. Google offers the [Google Finance](https://www.google.com/finance/) website and a [`GOOGLEFINANCE` function in Google Sheets](https://support.google.com/docs/answer/3093281), and neither page documents an HTTP API for developers. Developers who want quotes as JSON either use a market data vendor or collect the page data some other way. This API takes the second route: the [Google Finance API](https://perceptlayer.com/apis/google-finance) on Perceptlayer returns what the site shows, collected from publicly available sources, as JSON with named fields.

That framing matters for what you build. A market data vendor's licensed feed is the right choice for execution, order routing or anything where a stale price costs money. This API fits research, dashboards, screening, enrichment and agents that need a fact-check on a ticker. Treat it as a reference reading, not a tick stream.

## Which Google Finance endpoints are there?

The Google Finance API has six endpoints under `https://api.perceptlayer.com/v1/google-finance/`: `search`, `quote`, `historical`, `intraday`, `markets` and `indices`. All are `GET` requests and each successful call costs 1 credit. Pick by the question you're asking: what is this ticker, how has it moved, or what is the market doing.

| Path | What it returns | Required | Credits |
| --- | --- | --- | --- |
| `/v1/google-finance/search` | Search results for a company or ticker | `q` | 1 |
| `/v1/google-finance/quote` | Quote | `symbol` | 1 |
| `/v1/google-finance/historical` | Historical | `symbol` | 1 |
| `/v1/google-finance/intraday` | Intraday | `symbol` | 1 |
| `/v1/google-finance/markets` | Markets | none | 1 |
| `/v1/google-finance/indices` | Indices | none | 1 |

A typical flow starts with [`search`](https://perceptlayer.com/apis/google-finance/search) to look up a company name, then calls `quote` for the snapshot and `historical` or `intraday` for the series. `markets` and `indices` need no symbol at all, so they suit a morning overview. The first step looks like this:

```bash
curl "https://api.perceptlayer.com/v1/google-finance/search?q=AAPL&hl=en&gl=us" \
  -H "X-API-Key: $API_KEY"
```

We have no recorded `search` response, so run it in the playground to confirm which fields identify the symbol and exchange. Then pass those two values as `symbol` and `exchange` to `quote`, as in the next section.

## How do I get a stock quote as JSON?

Call `quote` with a `symbol` and, ideally, an `exchange`. One request returns the price summary, key statistics, a company profile and financial statements for the ticker. Authentication is the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup) if you don't have one, and see [authentication](https://docs.perceptlayer.com/authentication) for the details.

```bash
curl "https://api.perceptlayer.com/v1/google-finance/quote?symbol=AAPL&exchange=NASDAQ" \
  -H "X-API-Key: $API_KEY"
```

### What does the quote response contain?

This is an excerpt of a recorded response for that request, trimmed with `…`. The prices are the values at the time we recorded it, so yours will differ.

```json
{
  "quote": {
    "summary": {
      "name": "Apple Inc",
      "symbol": "AAPL",
      "exchange": "NASDAQ",
      "current_price": 347.725,
      "price_change": -0.49,
      "percent_change": -0.14,
      "currency": "USD",
      "market": {
        "trading": "Extended Hours",
        "price": "$347.20",
        "extracted_price": 347.2001,
        "price_movement": {
          "percentage": 0.15,
          "movement": "Down"
        }
      }
    },
    "key_stats": {
      "previous_close": "$348.22",
      "day_range": "$345.75 - $351.73",
      "year_range": "$243.42 - $351.73",
      "market_cap": "5.07T USD",
      "avg_volume": "39.13M",
      "pe_ratio": 39.86,
      "dividend_yield": "0.31%",
      "primary_exchange": "NASDAQ"
    },
    "about": {
      "ceo": "John Ternus",
      "founded": "Apr 1, 1976",
      "headquarters": "Cupertino, California, United States",
      "employees": "166,000"
    },
    "financials": [
      {
        "title": "Income Statement",
        "results": [
          { "date": "Jun 2026", "period_type": "Quarterly", "table": ["…"] }
        ]
      }
    ]
  }
}
```

Three things to notice before you write a parser. First, numbers come in two shapes: `current_price` and `pe_ratio` are numeric, while `previous_close`, `day_range` and `market_cap` are display strings such as `"5.07T USD"`. Convert those yourself; the snippet below shows one way. Second, `market.trading` says `"Extended Hours"` here, so the `market` block describes the session at the time of the call. Third, `financials` is a list of statements, each with dated results.

### How do I turn the display strings into numbers?

Strip the currency symbol and separators, read the number, then apply the `K`, `M`, `B` or `T` suffix. This Python parses the recorded strings: `"$348.22"` becomes 348.22, `"5.07T USD"` becomes 5,070,000,000,000, `"39.13M"` becomes 39,130,000, and `"$345.75 - $351.73"` splits into a low and a high.

```python
import os
import re

import requests

response = requests.get(
    "https://api.perceptlayer.com/v1/google-finance/quote",
    params={"symbol": "AAPL", "exchange": "NASDAQ"},
    headers={"X-API-Key": os.environ["API_KEY"]},
    timeout=30,
).json()

SUFFIX = {"K": 1e3, "M": 1e6, "B": 1e9, "T": 1e12}

def parse_display(value):
    m = re.search(r"-?[\d,]*\.?\d+", value)
    if not m:
        return None
    number = float(m.group().replace(",", ""))
    after = value[m.end():m.end() + 1].upper()
    return number * SUFFIX.get(after, 1)

def parse_range(value):
    low, high = value.split(" - ")
    return parse_display(low), parse_display(high)

stats = response["quote"]["key_stats"]
previous_close = parse_display(stats["previous_close"])    # 348.22
low, high = parse_range(stats["day_range"])                # 345.75, 351.73
market_cap = parse_display(stats["market_cap"])            # 5.07e12
```

`dividend_yield` ( `"0.31%"`) comes back as 0.31, a percentage and not a fraction, and a string with no digits returns `None`. Keep the raw string next to the parsed value so you can audit a surprising number later.

### How do I switch between quarterly and annual financials?

`period_type` accepts `quarterly` or `annual`; run both in the [quote playground](https://perceptlayer.com/apis/google-finance/quote) to see the difference. The recorded response above shows quarterly entries ( `"period_type": "Quarterly"`).

## What parameters does each endpoint take?

Each endpoint takes a small set of query parameters, and the table below lists every one with its type and allowed values, taken from the endpoint definitions. Only `q` or `symbol` is required where noted. Nothing else is documented about defaults, so check the [API page](https://perceptlayer.com/apis/google-finance) or run a call in its playground before relying on one.

| Endpoint | Parameter | Type | Notes |
| --- | --- | --- | --- |
| `search` | `q` | string, required | Up to 255 characters |
| `quote` | `symbol` | string, required | Up to 20 characters |
| `quote` | `exchange` | string | Optional, for example `NASDAQ` |
| `quote` | `period_type` | string | `quarterly` or `annual` |
| `historical` | `symbol` | string, required | Up to 20 characters |
| `historical` | `exchange` | string | Optional |
| `historical` | `range` | integer | Optional |
| `historical` | `start_date`, `end_date` | string | Optional |
| `historical` | `interval` | string | `daily`, `weekly` or `monthly` |
| `intraday` | `symbol` | string, required | Up to 20 characters |
| `intraday` | `exchange` | string | Optional |
| `markets` | `trend` | string | `indexes`, `most-active`, `gainers`, `losers`, `climate-leaders`, `cryptocurrencies`, `currencies` |
| `markets` | `index_market` | string | `americas`, `europe-middle-east-africa`, `asia-pacific` |
| `indices` | `indices` | string | Optional |
| all six | `hl`, `gl` | string | Language and country, up to 10 characters each |

The docs on [requests and responses](https://docs.perceptlayer.com/requests) explain how parameters are encoded and what headers come back.

## How do I get historical and intraday prices?

[`historical`](https://perceptlayer.com/apis/google-finance/historical) takes a `symbol`, an `interval` of `daily`, `weekly` or `monthly`, and a window set by `start_date` and `end_date` or the integer `range`. [`intraday`](https://perceptlayer.com/apis/google-finance/intraday) takes the same `symbol` and optional `exchange` as `quote`. We have no recorded sample for either, so we don't show their response shape or the date format `start_date` accepts; run one call of each in the playground before you write code against them.

```bash
curl "https://api.perceptlayer.com/v1/google-finance/historical?symbol=AAPL&exchange=NASDAQ&interval=weekly" \
  -H "X-API-Key: $API_KEY"

curl "https://api.perceptlayer.com/v1/google-finance/intraday?symbol=AAPL&exchange=NASDAQ" \
  -H "X-API-Key: $API_KEY"
```

What you can check now is the cost. A backfill is one `historical` call per ticker, so 50 tickers is 50 credits, and at the free rate of 1 request a second the loop takes at least 50 seconds. Intraday is a snapshot per call, not a stream: polling one ticker every minute for 6.5 hours is 390 calls, or 390 credits per ticker per US trading day. Chain it the same way as `quote`: `search` once per name, store the `symbol` and `exchange` it gives you, then reuse them so each later call is a single credit.

## How do I see market movers and indices?

[`markets`](https://perceptlayer.com/apis/google-finance/markets) answers "what is the market doing" with no symbol. Set `trend` to `gainers`, `losers`, `most-active`, `indexes`, `climate-leaders`, `cryptocurrencies` or `currencies`. `index_market` accepts `americas`, `europe-middle-east-africa` or `asia-pacific`.

```bash
curl "https://api.perceptlayer.com/v1/google-finance/markets?trend=gainers&hl=en&gl=us" \
  -H "X-API-Key: $API_KEY"
```

[`indices`](https://perceptlayer.com/apis/google-finance/indices) takes an optional `indices` string and the same `hl` and `gl` pair. It needs no parameters, so this is a valid call:

```bash
curl "https://api.perceptlayer.com/v1/google-finance/indices?hl=en&gl=us" \
  -H "X-API-Key: $API_KEY"
```

We have no recorded `indices` or `markets` response either, so check the fields in the playground. Use `hl` and `gl` consistently across calls, because language and country can change what a page shows.

## What does it cost?

Every endpoint is 1 credit per successful call, and failed calls are free; they return `X-Credits-Used: 0`. Free accounts get 100 credits once, after verifying an email, with no credit card. Paid credits come in prepaid packs and last 12 months; [pricing](https://perceptlayer.com/pricing) shows what each pack costs.

A worked example: a watchlist of 50 tickers, with one `quote` call each per trading day, over 21 trading days is 50 × 21 × 1 credit = 1,050 credits. The 100 free credits cover the first 2 trading days of that (50 × 2 = 100); the rest needs a pack. Add one `historical` backfill per ticker (50 credits) and a daily `markets` call (21 credits) and you're at 1,121 credits for the month, so the 10,000-credit Starter pack covers 8 months. See [credits](https://docs.perceptlayer.com/credits) for how balances and headers work.

Rate limits are per account: free accounts get 1 request a second. A loop over 50 tickers needs a short pause between calls, and a 429 carries `Retry-After` with the seconds to wait. The [rate limits](https://docs.perceptlayer.com/rate-limits) and [errors](https://docs.perceptlayer.com/errors) pages cover both.

## What should you check before relying on this data?

Data is collected from publicly available sources and returned as found at the time of the call. We don't promise freshness, completeness or accuracy beyond that. A quote can be delayed, and the `market.trading` field in the recorded response shows the session can be extended hours rather than the regular one.

In practice that means: store the time you made each call, keep the raw strings alongside any numbers you parse, and don't use it to trigger trades. If you want an agent to look up a ticker on demand, the same endpoints work through MCP; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add the server. For a similar guide to another Google source, see the [Google Search API](https://perceptlayer.com/blog/google-search-api-json) article, or browse the [API guides](https://perceptlayer.com/blog/category/api-guides).

Next step: [get a free API key](https://perceptlayer.com/signup), open the playground on the [Google Finance API page](https://perceptlayer.com/apis/google-finance) and run `quote` for your own ticker.

## APIs in this post

-   [Google Finance **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/google-finance)

## Frequently asked questions

### Does Google have an official Finance API?

Not one we can point you to. Google's Finance product is a [website](https://www.google.com/finance/), and Google Sheets has a `GOOGLEFINANCE` function documented in [Google's help center](https://support.google.com/docs/answer/3093281); neither page describes an HTTP API. For JSON over HTTP you need another source, such as the Google Finance endpoints on Perceptlayer.

### How much does a Google Finance API call cost?

One credit per successful call on all six endpoints, and nothing for failed calls. Free accounts get 100 credits once, after email verification. A daily `quote` for 20 tickers over 21 trading days is 20 × 21 × 1 credit = 420 credits, so the free credits cover the first 5 days and the rest needs a pack. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost.

### Is the data real time?

No. It is returned as found at the time of the call, and the recorded quote shows an `Extended Hours` session. That suits dashboards, research and enrichment. It doesn't suit trading decisions, where you need a licensed real-time feed with its own latency guarantees.

### How do I find the right symbol and exchange?

Call `search` with `q` set to a company name or ticker (up to 255 characters), then use what you find as `symbol` and `exchange` on `quote`, `historical` or `intraday`. We have no recorded `search` response, so confirm in the playground which fields hold the symbol and exchange. Passing `exchange` is worth it when a ticker may be listed on more than one venue.

### What happens when a call fails?

You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Codes include `invalid_parameters` (422) for a bad `interval`, and `rate_limited` (429) with a `Retry-After` header. A failed call isn't billed. The [errors page](https://docs.perceptlayer.com/errors) lists every code.

google finance stock quotes finance data historical prices market data

## More from the blog

1.  [API guides](https://perceptlayer.com/blog/category/api-guides) 20 Nov 2026 Perceptlayer 8 min read
    
    ## [Yahoo Finance API: Quotes, History and News as JSON](https://perceptlayer.com/blog/yahoo-finance-api-json)
    
    Five Yahoo Finance endpoints return search, quotes, candles, fundamentals and news as JSON. One quote call can price several tickers for 1 credit.
    
2.  [API guides](https://perceptlayer.com/blog/category/api-guides) 20 Nov 2026 Perceptlayer 7 min read
    
    ## [TradingView API: Screener and Symbol Data as JSON](https://perceptlayer.com/blog/tradingview-api-json)
    
    Three TradingView endpoints return symbol search, screener snapshots and published ideas as JSON. One POST prices a list of symbols for 1 credit.
    
3.  [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 9 min read
    
    ## [Stock Price API: Quotes and History as JSON](https://perceptlayer.com/blog/stock-price-api-google-finance)
    
    Get a stock price as JSON with GET /v1/google-finance/quote: current\_price, price\_change, key stats and a Python watchlist loop at 1 credit per symbol.
