# Historical Stock Prices API: Daily OHLCV, Full History (`newpo/historical-stock-prices`) Actor

Historical stock prices API: daily OHLCV and adjusted close for 63,000+ global symbols, up to 10,000 bars each, from $0.35 per 1,000 symbols.

- **URL**: https://apify.com/newpo/historical-stock-prices.md
- **Developed by:** [newpo](https://apify.com/newpo) (community)
- **Categories:** Developer tools, AI
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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

## Historical Stock Prices API: daily OHLCV for 63,000+ symbols, cheapest per symbol

**Historical Stock Prices** returns daily open, high, low, close, adjusted close and volume (OHLCV) for stocks, ETFs, indices, crypto and FX pairs worldwide, back to the first listing day (up to 10,000 daily bars per symbol, about 40 years). Dates, splits and dividends are already adjusted in `adj_close`. You get one dataset item per symbol with all its bars, and a one-row-per-bar CSV or Excel export in one click.

It is built to be the **cheapest historical stock price actor in the Apify Store**: you pay **$0.40 per 1,000 symbols** ($0.35 on Silver and higher plans), however many bars each symbol has, plus a $0.0001 start fee per run. Per-row history actors charge about 120 to 300 times this for a year of daily bars, and all-in-one scrapers charge 25% to 150% more per symbol.

> Data comes from our own stock data service, refreshed every day after the markets close. It is not real-time exchange data and not investment advice.

### What can you do with it?

- Download historical stock prices for backtesting, charts and machine-learning datasets.
- Build a price database for a portfolio, a screener or a spreadsheet.
- Compare the same period across US, UK, Canadian, European and Asian listings.
- Pull the full daily history of an ETF, index, crypto pair or currency pair.

### How much does it cost?

| Event | Price |
| --- | --- |
| Run start | $0.0001 |
| Symbol with history (any number of bars), Free and Bronze plans | **$0.0004** ($0.40 per 1,000) |
| Symbol with history, Silver, Gold, Platinum and Diamond plans | **$0.00035** ($0.35 per 1,000) |
| Symbol without data | free |

Example: the full daily history of 100 symbols costs $0.0001 + 100 x $0.0004 = **$0.0401**. One year of data for a single symbol costs $0.0005.

#### How it compares

Typical prices of Apify Store actors for the same jobs, public Free-plan prices checked in November 2026. Some of them discount their prices for paid Apify plans.

| Actor type | Price per symbol / result | 1 year of daily history, 1 symbol | 100 symbols, 1 year | Full history included | Global exchanges | Standby API |
| --- | --- | --- | --- | --- | --- | --- |
| **Historical Stock Prices (this actor)** | **$0.0004 per symbol** ($0.00035 on Silver and higher plans), any number of bars | **$0.0005** (incl. $0.0001 start) | **$0.0401** | **Yes**, up to 10,000 daily bars per symbol | **Yes**, 63,000+ symbols | **Yes** |
| Typical all-in-one finance scraper | $0.0005 to $0.001 per stock (+ $0.00005 start) | $0.0005 to $0.001 (chart series inside the record) | $0.05 to $0.10 | Partly (chart window) | Yes | No |
| Per-row history scraper | $0.00025 to $0.0006 per row | about $0.06 to $0.15 (about 252 rows) | about $6 to $15 | Yes, billed per row (10,000 bars = $2.50 to $6) | Limited regions | No |
| Popular quote scraper | $0.0001 per stock (+ $0.00005 start) | Not offered (quotes only) | Not offered | No | Yes | No |

None of the compared actors offered a Standby (live HTTP API) mode when we checked. Check each actor's page for its current price.

### How fast is it?

Measured in November 2026 on the Apify platform, median of 2 runs per cell, same inputs for every actor (5 quotes: AAPL, MSFT, SHEL.L, SHOP.TO, 0700.HK; 1 year of daily bars for AAPL; the full history of AAPL). Wall time from starting the run (or sending the request) to the finished result.

| | 5 quotes | 1 year, 1 symbol | Full history, 1 symbol |
| --- | --- | --- | --- |
| **Our Standby API, warm container** | **about 0.4 s** | **about 0.6 s** | **about 1.0 s** |
| Our Standby API, cold container | about 2.0 s | about 2.3 s | not measured |
| Our batch run | 2.9 s | 2.6 s | 3.5 s |
| Typical finance scraper, batch run (6 compared) | 2.3 s to 17 s | 2.5 s to 14 s | 3.8 s to 4.9 s |

What this shows: a warm Standby request answers in well under a second, and none of the compared actors offers a live HTTP API at all. Our batch runs are in the fast half of the field, but two of the compared scrapers start and finish a batch run as quickly as ours; most all-in-one scrapers need 5 to 17 seconds. Cold-start time of a Standby container is about 2 seconds; the container then stays warm for about 3 seconds after the last request. Your own network adds to the numbers above.

### What exchanges are covered?

63,000+ symbols with daily history: US exchanges, Canada (TSX, TSX-V), UK (LSE), Germany (Xetra, Frankfurt), France, Netherlands, Belgium, Italy, Spain, Switzerland, the Nordics, Poland, Austria, Hong Kong, Japan, China, Korea, Taiwan, India, Singapore, Australia, Brazil, South Africa, Israel, plus indices, top crypto, FX pairs and futures. Use [Stock Ticker Search](https://apify.com/newpo/stock-ticker-search) to find a symbol.

### How to get historical stock prices: input

```json
{
  "symbols": ["AAPL", "SHEL.L"],
  "startDate": "2026-01-01",
  "endDate": "2026-11-20",
  "interval": "1d"
}
```

| Field | Description |
| --- | --- |
| `symbols` | Tickers, up to 100 per run (`AAPL`, `SHEL.L`, `SHOP.TO`, `0700.HK`). |
| `startDate`, `endDate` | `YYYY-MM-DD`, end inclusive. Together they replace `range`. |
| `range` | `1mo`, `3mo`, `6mo`, `1y` (default), `2y`, `5y`, `10y`, `ytd`, `max` (the latest 10,000 bars). |
| `interval` | `1d` (default), `1wk`, `1mo`. |

### Output example

```json
{
  "symbol": "SHOP.TO",
  "name": "Shopify Inc.",
  "exchange": "Toronto",
  "currency": "CAD",
  "interval": "1d",
  "bar_count": 4,
  "first_date": "2026-11-10",
  "last_date": "2026-11-13",
  "bars": [
    {"date": "2026-11-10", "open": 212.91, "high": 214, "low": 201.74, "close": 208.12, "adj_close": 208.12, "volume": 1527700},
    {"date": "2026-11-11", "open": 212, "high": 213.76, "low": 209.73, "close": 212.57, "adj_close": 212.57, "volume": 1163400}
  ],
  "fetched_at": "2026-11-21T00:36:10.100Z"
}
```

`close` is split-adjusted as traded; `adj_close` also adjusts for dividends. London prices are in pence (`GBp`). A symbol with no data returns `{"symbol": "...", "found": false}` and is not charged.

### Use it from code, spreadsheets and no-code tools

**Python (pandas)**

```python
import pandas as pd
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("newpo/historical-stock-prices").call(run_input={"symbols": ["AAPL"], "range": "5y"})
item = next(client.dataset(run["defaultDatasetId"]).iterate_items())
df = pd.DataFrame(item["bars"]).set_index("date")
print(df.tail())
```

**Node.js**

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('newpo/historical-stock-prices').call({ symbols: ['AAPL'], range: '1y' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].bars.length);
```

**HTTP API**

```bash
curl -X POST "https://api.apify.com/v2/acts/newpo~historical-stock-prices/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "content-type: application/json" -d '{"symbols": ["AAPL"], "range": "1y"}'
```

**CSV / Excel / Google Sheets**: export the dataset with one row per bar: `https://api.apify.com/v2/datasets/<datasetId>/items?format=csv&unwind=bars&fields=symbol,bars&token=<APIFY_TOKEN>` (use `format=xlsx` for Excel). In Google Sheets: `=IMPORTDATA("<that url>")`.

**Make, Zapier, n8n**: use the Apify app, action "Run Actor", choose Historical Stock Prices.

### Use as a real-time API (Standby)

The actor also runs as a live HTTP API (Apify Actor Standby): call a URL, get the bars as JSON straight away (a warm container answers in well under a second, a cold one needs a few seconds). Same price per symbol; the $0.0001 start fee is charged once each time a container starts, and a container stays warm for about 3 seconds. Up to 5 symbols per request; use batch runs for up to 100.

```bash
curl "https://newpo--historical-stock-prices.apify.actor/history?symbols=AAPL&startDate=2026-01-01&endDate=2026-11-20&token=<APIFY_TOKEN>"
```

```python
import requests

r = requests.get(
    "https://newpo--historical-stock-prices.apify.actor/history",
    params={"symbols": "SHEL.L", "range": "1y", "token": "<APIFY_TOKEN>"},
    timeout=60,
)
bars = r.json()["items"][0]["bars"]
print(len(bars), bars[-1])
```

```js
const url = 'https://newpo--historical-stock-prices.apify.actor/history?symbols=0700.HK&range=5y&token=<APIFY_TOKEN>';
const { items } = await (await fetch(url)).json();
console.log(items[0].symbol, items[0].bar_count, items[0].last_date);
```

`POST /history` with a JSON body of the same fields works too.

### FAQ

**How do I get historical stock prices as CSV?** Export the run's dataset with `format=csv&unwind=bars` (see above) or use Export in the Console: you get one row per bar.

**How far back does the data go?** To the first listing day, limited to the latest 10,000 bars per symbol per run. For longer histories use a weekly or monthly interval.

**Are prices adjusted for splits and dividends?** Yes: `adj_close` is adjusted for both, `close` for splits.

**Do I pay per bar?** No. You pay per symbol, so a 40-year history costs the same as one day.

**Can I download everything?** No, runs are limited to 100 symbols and we do not sell bulk dumps.

**Is it real time?** No, daily bars are refreshed after the close of each market. The most recent session may be provisional until the next refresh.

**Are dividends and splits listed separately?** Not as separate events yet; use `adj_close` for total-return calculations.

### Related actors

- [Stock Price API](https://apify.com/newpo/stock-price-api): the latest quotes.
- [Stock Ticker Search](https://apify.com/newpo/stock-ticker-search): find the symbol by company name.

Market information only, not investment advice.

# Actor input Schema

## `symbols` (type: `array`):

Tickers with the exchange suffix for non-US listings: AAPL, SHEL.L, SHOP.TO, 0700.HK, 7203.T, SAP.DE, ^GSPC, BTC-USD, EURUSD=X, GC=F. Up to 100 per run.

## `startDate` (type: `string`):

First day, YYYY-MM-DD. Together with End date it replaces the Range preset. Leave both empty to use the preset.

## `endDate` (type: `string`):

Last day (inclusive), YYYY-MM-DD. Default: today.

## `range` (type: `string`):

Used when no start or end date is given. 'max' returns the most recent 10,000 bars per symbol (everything for most daily histories).

## `interval` (type: `string`):

Daily bars come from the full archive. Weekly and monthly bars cover the same history.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "SHEL.L"
  ],
  "startDate": "2026-01-01",
  "endDate": "2026-11-20",
  "range": "1y",
  "interval": "1d"
}
```

# Actor output Schema

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

No description

# 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 = {
    "symbols": [
        "AAPL",
        "SHEL.L"
    ],
    "startDate": "2026-01-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("newpo/historical-stock-prices").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 = {
    "symbols": [
        "AAPL",
        "SHEL.L",
    ],
    "startDate": "2026-01-01",
}

# Run the Actor and wait for it to finish
run = client.actor("newpo/historical-stock-prices").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 '{
  "symbols": [
    "AAPL",
    "SHEL.L"
  ],
  "startDate": "2026-01-01"
}' |
apify call newpo/historical-stock-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,newpo/historical-stock-prices"
        }
    }
}
```

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/YWZJS3JOlxhGhb9io/builds/BsruwK6phaxoeXNZ0/openapi.json
