# Yahoo Finance Scraper - Stocks, ETFs, Crypto API (`renzomacar/yahoo-finance-scraper`) Actor

Scrape Yahoo Finance for stocks, ETFs, crypto & forex: live quotes, historical OHLCV prices, fundamentals/financials, and news — by ticker, with no API key. Pay-per-result market data.

- **URL**: https://apify.com/renzomacar/yahoo-finance-scraper.md
- **Developed by:** [Renzo Madueno](https://apify.com/renzomacar) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Yahoo Finance Scraper — Stocks, ETFs, Crypto & Forex Data API

Scrape **live quotes, historical prices, fundamentals, and news** for stocks, ETFs, crypto, forex, and indices from Yahoo Finance — by ticker, in one run, with **no API key**. The pay-per-result alternative to paid market-data APIs.

⭐ **Using it and it works? [Leave a 30-second review](https://apify.com/renzomacar/yahoo-finance-scraper/reviews).** It's the single biggest thing that helps other developers find it.

### What can this Actor do?

For any ticker (`AAPL`, `SPY`, `BTC-USD`, `EURUSD=X`, `^GSPC`), pull any of:

- **Live quote** — price, change %, day high/low, 52-week range, volume, market state.
- **Historical prices (OHLCV)** — open/high/low/close/adjusted-close/volume, any interval (1m → 1mo) and range (1d → max).
- **Fundamentals / financials** — market cap, P/E, EPS, margins, revenue & growth, cash, debt, ROE, analyst target & recommendation, sector, industry, employees.
- **News** — latest headlines per ticker with publisher and timestamp.

Plus **symbol search** to look up tickers by company name.

### How do I get stock data?

1. Add your **symbols** (e.g. `AAPL`, `BTC-USD`).
2. Pick the **data to fetch** (quote / history / fundamentals / news).
3. Run it — one clean JSON/CSV row per result, ready for your spreadsheet, dashboard, backtest, or AI agent.

### How much does it cost?

Pay-per-result — no subscription, a fraction of paid market-data APIs:

| Event | Price |
|-------|-------|
| Actor start | $0.01 |
| Per symbol/data result | $0.004 |
| Symbol search | $0.004 |

### What does the output look like?

```json
{ "dataType": "quote", "symbol": "AAPL", "price": 295.95, "changePercent": -1.1, "currency": "USD", "exchange": "NasdaqGS" }
{ "dataType": "fundamentals", "symbol": "AAPL", "marketCap": 4500000000000, "peRatio": 32.1, "profitMargins": 0.27, "recommendation": "buy" }
{ "dataType": "history", "symbol": "BTC-USD", "candles": [{ "date": "2026-06-17", "close": 71000, "volume": 1234 }] }
````

### Use cases

- **Backtesting & quant** — pull historical OHLCV for any ticker, any timeframe.
- **Dashboards & watchlists** — live quotes across stocks, crypto, and forex.
- **Fundamental screening** — compare P/E, margins, growth, and analyst targets.
- **AI finance agents** — feed clean market JSON straight into your LLM/MCP workflow.

### FAQ

**Do I need an API key or account?** No. It uses Yahoo Finance's public endpoints.

**Which assets are supported?** Stocks, ETFs, mutual funds, crypto (`BTC-USD`), forex (`EURUSD=X`), and indices (`^GSPC`) — anything with a Yahoo ticker.

**How fresh are quotes?** Real-time/near-real-time during market hours, per Yahoo.

**Can I pull thousands of tickers?** Yes — pass them all in `symbols`.

### Other Actors by this author

Need app, company, or web data too? See my [other Actors](https://apify.com/renzomacar) — App Store & Google Play, company enrichment, Google Maps, and more.

***

Built and maintained by [Renzo Madueño](https://apify.com/renzomacar). Found a bug or want another field? Open an issue or leave a review — I read every message. Data via Yahoo Finance; for informational purposes only, not financial advice.

# Actor input Schema

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

Tickers to fetch: stocks (AAPL), ETFs (SPY), crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC).

## `dataTypes` (type: `array`):

What to pull for each symbol.

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

Candle interval for historical prices.

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

How far back for historical prices.

## `newsCount` (type: `integer`):

When 'news' is selected.

## `searchQueries` (type: `array`):

Company/ticker names to look up symbols for, e.g. "tesla", "S\&P 500".

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "BTC-USD"
  ],
  "dataTypes": [
    "quote"
  ],
  "interval": "1d",
  "range": "1mo",
  "newsCount": 10
}
```

# 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",
        "BTC-USD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("renzomacar/yahoo-finance-scraper").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",
        "BTC-USD",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("renzomacar/yahoo-finance-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "BTC-USD"
  ]
}' |
apify call renzomacar/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=renzomacar/yahoo-finance-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yahoo Finance Scraper - Stocks, ETFs, Crypto API",
        "description": "Scrape Yahoo Finance for stocks, ETFs, crypto & forex: live quotes, historical OHLCV prices, fundamentals/financials, and news — by ticker, with no API key. Pay-per-result market data.",
        "version": "0.1",
        "x-build-id": "4rdKrF6M9q5zcjk0z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/renzomacar~yahoo-finance-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-renzomacar-yahoo-finance-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/renzomacar~yahoo-finance-scraper/runs": {
            "post": {
                "operationId": "runs-sync-renzomacar-yahoo-finance-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/renzomacar~yahoo-finance-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-renzomacar-yahoo-finance-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "symbols": {
                        "title": "Symbols / tickers",
                        "type": "array",
                        "description": "Tickers to fetch: stocks (AAPL), ETFs (SPY), crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dataTypes": {
                        "title": "Data to fetch",
                        "type": "array",
                        "description": "What to pull for each symbol.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "quote",
                                "history",
                                "fundamentals",
                                "news"
                            ],
                            "enumTitles": [
                                "Live quote",
                                "Historical prices (OHLCV)",
                                "Fundamentals / financials",
                                "News"
                            ]
                        },
                        "default": [
                            "quote"
                        ]
                    },
                    "interval": {
                        "title": "History interval",
                        "enum": [
                            "1m",
                            "5m",
                            "15m",
                            "30m",
                            "60m",
                            "1d",
                            "1wk",
                            "1mo"
                        ],
                        "type": "string",
                        "description": "Candle interval for historical prices.",
                        "default": "1d"
                    },
                    "range": {
                        "title": "History range",
                        "enum": [
                            "1d",
                            "5d",
                            "1mo",
                            "3mo",
                            "6mo",
                            "1y",
                            "2y",
                            "5y",
                            "10y",
                            "ytd",
                            "max"
                        ],
                        "type": "string",
                        "description": "How far back for historical prices.",
                        "default": "1mo"
                    },
                    "newsCount": {
                        "title": "News items per symbol",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "When 'news' is selected.",
                        "default": 10
                    },
                    "searchQueries": {
                        "title": "Symbol search (optional)",
                        "type": "array",
                        "description": "Company/ticker names to look up symbols for, e.g. \"tesla\", \"S&P 500\".",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
