# Yahoo Finance API — quotes, OHLCV, crypto & FX (no key) (`synthetic.ia/yahoo-finance-api`) Actor

Real-time quotes, historical OHLCV, symbol search and fundamentals for stocks, ETFs, crypto and FX — via Yahoo Finance, no API key. Clean HTTP API + MCP. Pay per query.

- **URL**: https://apify.com/synthetic.ia/yahoo-finance-api.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 market queries

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

## Yahoo Finance API — quotes, OHLCV, crypto & FX (no key)

Get **market data from Yahoo Finance over a clean HTTP API** — real-time quotes, historical OHLCV candles, symbol search and company fundamentals, for **stocks, ETFs, crypto and FX**. No Yahoo API key, no crumb/cookie juggling, no rate-limit headaches — we handle the reverse-engineering and hand you clean JSON. Pay per query.

- 💹 **Quotes** — real-time price, change, volume, market cap, day range… for many symbols at once
- 📈 **Chart** — historical OHLCV candles (1 minute → monthly, up to max history)
- 🔎 **Search** — find a ticker by company name or symbol
- 🏢 **Fundamentals** — financials, key stats, profile, earnings (quoteSummary modules)
- 🪙 **Stocks, ETFs, crypto (BTC-USD), FX (EURUSD=X), indices (^GSPC)** — all in one API
- ⚡ HTTP API (Standby) + usable from AI agents (MCP)

### Sample output (quote)

```json
{
  "ok": true,
  "count": 3,
  "quotes": [
    { "symbol": "AAPL", "regularMarketPrice": 335.88, "currency": "USD", "marketCap": 4900000000000, "regularMarketChangePercent": 0.42 },
    { "symbol": "BTC-USD", "regularMarketPrice": 76686.02, "currency": "USD" },
    { "symbol": "EURUSD=X", "regularMarketPrice": 1.1478, "currency": "USD" }
  ]
}
```

### How to use

#### HTTP API (Standby — recommended)

Base URL: `https://synthetic-ia--yahoo-finance-api.apify.actor` with header `Authorization: Bearer <APIFY_TOKEN>`.

| Endpoint | Body | Does |
|---|---|---|
| `POST /quote` | `{ symbols: "AAPL" \| ["AAPL","BTC-USD","EURUSD=X"] }` | Real-time quotes |
| `POST /chart` | `{ symbol, range?, interval? }` | Historical OHLCV |
| `POST /search` | `{ q, count?: 1-20 }` | Find symbols |
| `POST /fundamentals` | `{ symbol, modules? }` | Company financials & stats |
| `GET /` | — | Endpoint list |

`GET /quote?symbols=AAPL,MSFT` and `GET /chart?symbol=AAPL&range=1y` also work (query-string form).

```bash
## Quote several assets at once
curl -X POST ".../quote" -H "Authorization: Bearer $APIFY_TOKEN" \
  -d '{"symbols":["AAPL","MSFT","BTC-USD","EURUSD=X","^GSPC"]}'

## One year of daily candles
curl -X POST ".../chart" -H "Authorization: Bearer $APIFY_TOKEN" \
  -d '{"symbol":"TSLA","range":"1y","interval":"1d"}'

## Fundamentals
curl -X POST ".../fundamentals" -H "Authorization: Bearer $APIFY_TOKEN" \
  -d '{"symbol":"AAPL","modules":["summaryDetail","financialData","defaultKeyStatistics"]}'
```

#### One-shot run

Set `operation` (quote/chart/search/fundamentals) and its params, and run once. The result is saved to the run's key-value store as `OUTPUT` and pushed to the dataset.

### Input

- **operation** — `quote`, `chart`, `search` or `fundamentals`.
- **symbols** — tickers for Quote (`AAPL`, `BTC-USD`, `EURUSD=X`, `^GSPC`). **symbol** — a single ticker for Chart/Fundamentals.
- **range** — `1d`…`max`. **interval** — `1m`…`3mo`.
- **q** / **count** — Search text and how many matches.
- **modules** — Fundamentals: `assetProfile`, `summaryDetail`, `financialData`, `defaultKeyStatistics`, `price`, `earnings`, `recommendationTrend`, and more.

### Pricing

**Per query** from **$0.01** (drops to $0.003 on higher tiers). Platform usage included. A single `/quote` call can return dozens of symbols for one query fee.

### Related Actors

- **[MercadoLibre Scraper](https://apify.com/synthetic.ia/mercadolibre-scraper)** — e-commerce prices & listings.
- **[ffmpeg API](https://apify.com/synthetic.ia/ffmpeg-api)** / **[Media Downloader](https://apify.com/synthetic.ia/media-downloader)** — media tooling.

### FAQ

**Do I need a Yahoo key?** No. We handle the session/crumb Yahoo now requires, so you just call the API.

**What assets?** Stocks, ETFs, crypto (`BTC-USD`), FX (`EURUSD=X`), indices (`^GSPC`), futures, and more — anything with a Yahoo symbol.

**How fresh are quotes?** Real-time / near-real-time as Yahoo provides (some exchanges are delayed).

### Legal

Data is provided by Yahoo Finance and subject to their terms; use it accordingly. This Actor returns market data only and is **not investment advice**. You are responsible for how you use the data.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/yahoo-finance-api/changelog.md

# Actor input Schema

## `operation` (type: `string`):

What to fetch.

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

One or more tickers for Quote: AAPL, MSFT, BTC-USD, EURUSD=X, ^GSPC.

## `symbol` (type: `string`):

A single ticker for Chart or Fundamentals.

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

How far back the chart goes.

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

Candle size.

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

Text to search for a symbol (company name or ticker).

## `count` (type: `integer`):

How many search matches to return (1-20).

## `modules` (type: `array`):

quoteSummary modules: assetProfile, summaryDetail, financialData, defaultKeyStatistics, price, earnings, recommendationTrend…

## Actor input object example

```json
{
  "operation": "quote",
  "symbols": [
    "AAPL"
  ],
  "symbol": "AAPL",
  "range": "1mo",
  "interval": "1d",
  "q": "apple",
  "count": 8,
  "modules": [
    "summaryDetail",
    "financialData",
    "defaultKeyStatistics"
  ]
}
```

# Actor output Schema

## `result` (type: `string`):

The query result JSON.

## `runs` (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 = {
    "symbol": "AAPL",
    "q": "apple",
    "count": 8,
    "modules": [
        "summaryDetail",
        "financialData",
        "defaultKeyStatistics"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/yahoo-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 = {
    "symbol": "AAPL",
    "q": "apple",
    "count": 8,
    "modules": [
        "summaryDetail",
        "financialData",
        "defaultKeyStatistics",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/yahoo-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 '{
  "symbol": "AAPL",
  "q": "apple",
  "count": 8,
  "modules": [
    "summaryDetail",
    "financialData",
    "defaultKeyStatistics"
  ]
}' |
apify call synthetic.ia/yahoo-finance-api --silent --output-dataset

```

## MCP server setup

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