# Yahoo Finance Scraper - Stock Quotes, Prices & Data (`viralanalyzer/yahoo-finance-intelligence`) Actor

Extract Yahoo Finance data: stock prices, financials, analyst ratings, news, and historical data. Track any ticker or market.

- **URL**: https://apify.com/viralanalyzer/yahoo-finance-intelligence.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Categories:** Business, AI, News
- **Features:** Limited permissions
- **Stats:** 55 total users, 4 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $42.00 / 1,000 stock symbol scrapeds

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?

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 Intelligence — Stock Quotes, Fundamentals, Analyst Ratings & Price History

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/yahoo-finance-intelligence) | 🇺🇸 English | [🇧🇷 Português](#português)

Extract **stock data from Yahoo Finance** — real-time quotes, financial fundamentals, analyst recommendations, OHLCV price history, dividends, and stock splits. Supports equities, ETFs, indices, crypto, and forex. Pure HTTP — no browser or API key needed.

### ✨ Features

- 📈 **Real-time quotes** — Price, change, volume, day range, market state
- 💰 **Fundamentals** — Revenue, margins, cash flow, debt, ROE, ROA
- 🎯 **Analyst ratings** — Target prices, buy/hold/sell breakdown, recommendation key
- 📊 **Price history** — OHLCV data with configurable range (1d to max) and interval
- 💵 **Dividends & splits** — Historical dividend payments and stock split events
- 🏢 **Company profile** — Sector, industry, employees, website, location
- 🌍 **Multi-asset** — Equities, ETFs, indices (^GSPC), crypto (BTC-USD), forex
- ⚡ **Pure HTTP** — No browser needed, fast and cost-effective

### 📥 Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `symbols` | string\[] | ✅ | — | Ticker symbols (e.g., `"AAPL"`, `"BTC-USD"`, `"^GSPC"`). Max 50. |
| `includeHistory` | boolean | ❌ | `true` | Include OHLCV price history |
| `historyRange` | string | ❌ | `"1mo"` | Price history range: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, max |
| `historyInterval` | string | ❌ | `"1d"` | Data granularity: 1d, 1wk, 1mo |
| `includeFundamentals` | boolean | ❌ | `true` | Include financial data (revenue, margins, analyst targets) |
| `proxyConfiguration` | object | ❌ | — | Proxy settings (residential recommended for large runs) |

#### Input Example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "GOOGL",
    "AMZN",
    "BTC-USD"
  ],
  "includeHistory": true,
  "historyRange": "3mo",
  "historyInterval": "1d",
  "includeFundamentals": true
}
```

### 📤 Output

Each symbol produces a comprehensive result with 70+ fields:

| Field | Type | Description |
|---|---|---|
| `symbol` | string | Ticker symbol |
| `shortName` | string | Short display name |
| `longName` | string | Full company name |
| `quoteType` | string | EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY |
| `exchange` | string | Exchange name |
| `currency` | string | Trading currency |
| `regularMarketPrice` | number | Current price |
| `regularMarketChange` | number | Absolute price change |
| `regularMarketChangePercent` | number | Price change % |
| `regularMarketVolume` | number | Trading volume |
| `regularMarketDayHigh` | number | Day high |
| `regularMarketDayLow` | number | Day low |
| `regularMarketOpen` | number | Opening price |
| `marketState` | string | PRE, REGULAR, POST, CLOSED |
| `marketCap` | number | Market capitalization |
| `trailingPE` | number | Trailing P/E ratio |
| `forwardPE` | number | Forward P/E ratio |
| `priceToBook` | number | Price-to-Book ratio |
| `enterpriseValue` | number | Enterprise value |
| `epsTrailing` | number | Trailing EPS (12 months) |
| `epsForward` | number | Forward EPS estimate |
| `revenueGrowth` | number | Revenue growth rate |
| `earningsGrowth` | number | Earnings growth rate |
| `profitMargin` | number | Net profit margin |
| `operatingMargin` | number | Operating margin |
| `grossMargin` | number | Gross margin |
| `returnOnEquity` | number | Return on equity |
| `returnOnAssets` | number | Return on assets |
| `totalRevenue` | number | Total revenue |
| `totalCash` | number | Total cash |
| `totalDebt` | number | Total debt |
| `debtToEquity` | number | Debt-to-equity ratio |
| `freeCashflow` | number | Free cash flow |
| `dividendYield` | number | Trailing annual dividend yield |
| `dividendRate` | number | Trailing annual dividend rate |
| `exDividendDate` | string | Ex-dividend date (YYYY-MM-DD) |
| `fiftyTwoWeekHigh` | number | 52-week high |
| `fiftyTwoWeekLow` | number | 52-week low |
| `fiftyDayAverage` | number | 50-day moving average |
| `twoHundredDayAverage` | number | 200-day moving average |
| `analystTargetMean` | number | Mean price target |
| `analystTargetHigh` | number | Highest price target |
| `analystTargetLow` | number | Lowest price target |
| `analystRecommendation` | string | buy, hold, sell, strongBuy, etc. |
| `analystCount` | number | Number of analysts |
| `analystBuy` | number | Buy + strong buy count |
| `analystHold` | number | Hold count |
| `analystSell` | number | Sell + strong sell count |
| `nextEarningsDate` | string | Next earnings date (YYYY-MM-DD) |
| `sector` | string | Business sector |
| `industry` | string | Industry classification |
| `fullTimeEmployees` | number | Employee count |
| `website` | string | Company website |
| `country` | string | Headquarters country |
| `sharesOutstanding` | number | Shares outstanding |
| `beta` | number | Beta coefficient |
| `priceHistory` | object\[] | OHLCV array: {date, open, high, low, close, adjClose, volume} |
| `dividends` | object\[] | Dividend events: {date, amount} |
| `splits` | object\[] | Split events: {date, ratio} |
| `platform` | string | Always `"yahoo_finance"` |
| `scrapedAt` | string | ISO 8601 timestamp |

#### Output Example

```json
{
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "longName": "Apple Inc.",
  "quoteType": "EQUITY",
  "exchange": "NasdaqGS",
  "currency": "USD",
  "regularMarketPrice": 237.42,
  "regularMarketChange": 3.18,
  "regularMarketChangePercent": 1.3587,
  "regularMarketVolume": 54230000,
  "regularMarketDayHigh": 238.15,
  "regularMarketDayLow": 234.02,
  "regularMarketOpen": 234.85,
  "regularMarketPreviousClose": 234.24,
  "marketState": "REGULAR",
  "marketCap": 3612000000000,
  "trailingPE": 37.4218,
  "forwardPE": 32.1547,
  "priceToBook": 62.45,
  "enterpriseValue": 3680000000000,
  "epsTrailing": 6.34,
  "epsForward": 7.39,
  "revenueGrowth": 0.0487,
  "earningsGrowth": 0.1024,
  "profitMargin": 0.2637,
  "operatingMargin": 0.3142,
  "grossMargin": 0.4612,
  "returnOnEquity": 1.5718,
  "returnOnAssets": 0.2847,
  "totalRevenue": 395000000000,
  "totalCash": 62484000000,
  "totalDebt": 104590000000,
  "debtToEquity": 173.77,
  "currentRatio": 0.988,
  "freeCashflow": 108807000000,
  "dividendYield": 0.0044,
  "dividendRate": 1.0,
  "exDividendDate": "2026-02-10",
  "payoutRatio": 0.1578,
  "fiftyTwoWeekHigh": 260.10,
  "fiftyTwoWeekLow": 169.21,
  "fiftyDayAverage": 232.45,
  "twoHundredDayAverage": 224.18,
  "analystTargetMean": 252.30,
  "analystTargetHigh": 300.00,
  "analystTargetLow": 200.00,
  "analystRecommendation": "buy",
  "analystCount": 42,
  "analystBuy": 34,
  "analystHold": 6,
  "analystSell": 2,
  "nextEarningsDate": "2026-04-24",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "fullTimeEmployees": 164000,
  "website": "https://www.apple.com",
  "country": "United States",
  "city": "Cupertino",
  "sharesOutstanding": 15204100096,
  "floatShares": 15180000000,
  "shortRatio": 1.52,
  "beta": 1.24,
  "priceHistory": [
    {
      "date": "2026-02-06",
      "open": 227.18,
      "high": 229.42,
      "low": 226.35,
      "close": 228.74,
      "adjClose": 228.74,
      "volume": 48120000
    },
    {
      "date": "2026-02-07",
      "open": 229.10,
      "high": 231.85,
      "low": 228.60,
      "close": 231.20,
      "adjClose": 231.20,
      "volume": 51340000
    }
  ],
  "dividends": [
    {
      "date": "2025-11-08",
      "amount": 0.25
    },
    {
      "date": "2026-02-10",
      "amount": 0.25
    }
  ],
  "splits": [],
  "platform": "yahoo_finance",
  "scrapedAt": "2026-03-06T12:00:00.000Z"
}
```

### 📋 Use Cases

- **Stock Research** — Complete fundamental analysis with financials, margins, and ratios
- **Portfolio Tracking** — Monitor real-time prices and key metrics for your holdings
- **Analyst Consensus** — Aggregate buy/hold/sell ratings and price targets
- **Earnings Calendar** — Track upcoming earnings dates and dividend schedules
- **Historical Analysis** — Download OHLCV price history for backtesting and charting
- **Sector Screening** — Compare companies within sectors by fundamentals
- **Crypto Tracking** — Monitor cryptocurrency prices alongside traditional equities
- **ETF/Index Monitoring** — Track ETFs, mutual funds, and major indices

### ✅ Capabilities & Limits

Stated up front, so you do not pay a run to find out.

**Built here:** Yahoo's cookie+crumb handshake is proxy-fragile. When the datacenter IP fails to get a crumb, the whole handshake repeats on the bare Apify IP - `fc.yahoo.com`, then `finance.yahoo.com`, then `/v1/test/getcrumb` - before the run gives up. That is why runs still succeed when the proxy pool is the part Yahoo rejects.

| Input / feature | Supported | Notes |
|---|---|---|
| Ticker symbol (`AAPL`, `MSFT`) | ✅ | `symbols` — required field |
| Crypto (`BTC-USD`) and indices (`^GSPC`) | ✅ | same syntax Yahoo Finance uses |
| Search by company name | ❌ | pass the ticker, not the name |
| Historical OHLCV | ✅ | enable `includeHistory`; granularity via `historyInterval` |
| Fundamentals (revenue, margins, debt, analyst targets) | ✅ | enable `includeFundamentals` |
| Real-time / streaming quotes | ❌ | snapshot at run time, not a live feed |
| Yahoo rate limiting | ⚠️ | datacenter proxy is ON by default to reduce throttling |

### ❓ FAQ

**Q: What asset types does this actor support?**
A: Equities (AAPL, MSFT), ETFs (SPY, QQQ), indices (^GSPC, ^DJI), crypto (BTC-USD, ETH-USD), and forex (EURUSD=X). Use the appropriate Yahoo Finance ticker format.

**Q: Does this need a Yahoo Finance API key?**
A: No. The actor authenticates via Yahoo Finance's session mechanism (cookie + crumb) automatically. No API key or premium account required.

**Q: How far back can I get price history?**
A: Up to the full history of the ticker using `historyRange: "max"`. Granularity options are daily (1d), weekly (1wk), or monthly (1mo).

**Q: Why are some fields returning 0 for my symbol?**
A: Some fields only apply to certain asset types. For example, crypto symbols will not have `sector`, `industry`, or `fullTimeEmployees`. ETFs and indices lack earnings data. The actor returns 0 for non-applicable numeric fields.

**Q: How many symbols can I process in one run?**
A: Up to 50 symbols per run. Quotes are fetched in batches of 10, and each symbol gets individual fundamentals and chart requests with rate limiting.

### 💰 Pricing

This actor uses **Pay Per Event (PPE)** pricing:

| Metric | Cost |
|--------|------|
| Per symbol scraped | $0.08 |

For example, processing 10 symbols costs $0.80.

### 🔗 Related Actors

- [TradingView Screener](https://apify.com/viralanalyzer/tradingview-screener) — Technical analysis & market scanner
- [Shopify Store Intelligence](https://apify.com/viralanalyzer/shopify-store-intelligence) — E-commerce competitive analysis
- [Google Maps BR Scraper](https://apify.com/viralanalyzer/google-maps-br-scraper) — Business data extraction
- [CNPJ Enricher](https://apify.com/viralanalyzer/cnpj-enricher) — Brazilian company data

### 📝 Changelog

#### v1.0 (Current)

- ✅ Real-time quotes via Yahoo Finance v7 API
- ✅ Financial fundamentals via v10 quoteSummary
- ✅ OHLCV price history via v8 chart API
- ✅ Analyst recommendations with buy/hold/sell breakdown
- ✅ Dividend history and stock split events
- ✅ Company profile (sector, industry, employees)
- ✅ Multi-asset support (equities, ETFs, indices, crypto, forex)
- ✅ Session authentication (cookie + crumb)
- ✅ Anti-placeholder guardrails for data integrity
- ✅ PPE billing integration

***

<a name="português"></a>

## 💹 Yahoo Finance Intelligence — Cotações, Fundamentos, Ratings de Analistas & Histórico de Preços

> [🇺🇸 English](#-yahoo-finance-intelligence--stock-quotes-fundamentals-analyst-ratings--price-history) | 🇧🇷 Português

Extraia **dados de ações do Yahoo Finance** — cotações em tempo real, fundamentos financeiros, recomendações de analistas, histórico de preços OHLCV, dividendos e desdobramentos. Suporta ações, ETFs, índices, cripto e forex. HTTP puro — sem navegador ou chave de API.

### ✨ Funcionalidades

- 📈 **Cotações em tempo real** — Preço, variação, volume, faixa do dia, estado do mercado
- 💰 **Fundamentos** — Receita, margens, fluxo de caixa, dívida, ROE, ROA
- 🎯 **Ratings de analistas** — Preços-alvo, detalhamento compra/neutro/venda, recomendação
- 📊 **Histórico de preços** — Dados OHLCV com faixa configurável (1d até max) e intervalo
- 💵 **Dividendos & desdobramentos** — Histórico de pagamento de dividendos e splits
- 🏢 **Perfil da empresa** — Setor, indústria, funcionários, site, localização
- 🌍 **Multi-ativos** — Ações, ETFs, índices (^GSPC), cripto (BTC-USD), forex
- ⚡ **HTTP puro** — Sem navegador, rápido e econômico

### 📥 Entrada

| Parâmetro | Tipo | Obrigatório | Padrão | Descrição |
|---|---|---|---|---|
| `symbols` | string\[] | ✅ | — | Códigos dos ativos (ex: `"AAPL"`, `"BTC-USD"`, `"^GSPC"`). Máximo 50. |
| `includeHistory` | boolean | ❌ | `true` | Incluir histórico de preços OHLCV |
| `historyRange` | string | ❌ | `"1mo"` | Faixa do histórico: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, max |
| `historyInterval` | string | ❌ | `"1d"` | Granularidade dos dados: 1d, 1wk, 1mo |
| `includeFundamentals` | boolean | ❌ | `true` | Incluir dados financeiros (receita, margens, alvos de analistas) |
| `proxyConfiguration` | objeto | ❌ | — | Configuração de proxy (residencial recomendado para grandes volumes) |

#### Exemplo de Entrada

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "GOOGL",
    "AMZN",
    "BTC-USD"
  ],
  "includeHistory": true,
  "historyRange": "3mo",
  "historyInterval": "1d",
  "includeFundamentals": true
}
```

### 📤 Saída

Cada símbolo produz um resultado abrangente com 70+ campos:

| Campo | Tipo | Descrição |
|---|---|---|
| `symbol` | string | Código do ativo |
| `shortName` | string | Nome curto |
| `longName` | string | Nome completo da empresa |
| `quoteType` | string | EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY |
| `exchange` | string | Nome da bolsa |
| `currency` | string | Moeda de negociação |
| `regularMarketPrice` | número | Preço atual |
| `regularMarketChange` | número | Variação absoluta |
| `regularMarketChangePercent` | número | Variação % |
| `regularMarketVolume` | número | Volume negociado |
| `regularMarketDayHigh` | número | Máxima do dia |
| `regularMarketDayLow` | número | Mínima do dia |
| `regularMarketOpen` | número | Preço de abertura |
| `marketState` | string | PRE, REGULAR, POST, CLOSED |
| `marketCap` | número | Capitalização de mercado |
| `trailingPE` | número | P/L trailing |
| `forwardPE` | número | P/L forward |
| `priceToBook` | número | Preço/Valor Patrimonial |
| `enterpriseValue` | número | Valor da empresa |
| `epsTrailing` | número | LPA trailing (12 meses) |
| `epsForward` | número | LPA forward estimado |
| `revenueGrowth` | número | Taxa de crescimento de receita |
| `earningsGrowth` | número | Taxa de crescimento de lucro |
| `profitMargin` | número | Margem líquida |
| `operatingMargin` | número | Margem operacional |
| `grossMargin` | número | Margem bruta |
| `returnOnEquity` | número | Retorno sobre patrimônio |
| `returnOnAssets` | número | Retorno sobre ativos |
| `totalRevenue` | número | Receita total |
| `totalCash` | número | Caixa total |
| `totalDebt` | número | Dívida total |
| `debtToEquity` | número | Dívida/Patrimônio |
| `freeCashflow` | número | Fluxo de caixa livre |
| `dividendYield` | número | Dividend yield anual trailing |
| `dividendRate` | número | Taxa de dividendo anual trailing |
| `exDividendDate` | string | Data ex-dividendo (AAAA-MM-DD) |
| `fiftyTwoWeekHigh` | número | Máxima de 52 semanas |
| `fiftyTwoWeekLow` | número | Mínima de 52 semanas |
| `fiftyDayAverage` | número | Média móvel de 50 dias |
| `twoHundredDayAverage` | número | Média móvel de 200 dias |
| `analystTargetMean` | número | Preço-alvo médio |
| `analystTargetHigh` | número | Preço-alvo mais alto |
| `analystTargetLow` | número | Preço-alvo mais baixo |
| `analystRecommendation` | string | buy, hold, sell, strongBuy, etc. |
| `analystCount` | número | Número de analistas |
| `analystBuy` | número | Compra + compra forte |
| `analystHold` | número | Neutro |
| `analystSell` | número | Venda + venda forte |
| `nextEarningsDate` | string | Próxima data de resultados (AAAA-MM-DD) |
| `sector` | string | Setor |
| `industry` | string | Indústria |
| `fullTimeEmployees` | número | Número de funcionários |
| `website` | string | Site da empresa |
| `country` | string | País da sede |
| `sharesOutstanding` | número | Ações em circulação |
| `beta` | número | Coeficiente beta |
| `priceHistory` | objeto\[] | Array OHLCV: {date, open, high, low, close, adjClose, volume} |
| `dividends` | objeto\[] | Eventos de dividendo: {date, amount} |
| `splits` | objeto\[] | Eventos de split: {date, ratio} |
| `platform` | string | Sempre `"yahoo_finance"` |
| `scrapedAt` | string | Timestamp ISO 8601 |

#### Exemplo de Saída

```json
{
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "longName": "Apple Inc.",
  "quoteType": "EQUITY",
  "exchange": "NasdaqGS",
  "currency": "USD",
  "regularMarketPrice": 237.42,
  "regularMarketChange": 3.18,
  "regularMarketChangePercent": 1.3587,
  "regularMarketVolume": 54230000,
  "regularMarketDayHigh": 238.15,
  "regularMarketDayLow": 234.02,
  "regularMarketOpen": 234.85,
  "regularMarketPreviousClose": 234.24,
  "marketState": "REGULAR",
  "marketCap": 3612000000000,
  "trailingPE": 37.4218,
  "forwardPE": 32.1547,
  "priceToBook": 62.45,
  "enterpriseValue": 3680000000000,
  "epsTrailing": 6.34,
  "epsForward": 7.39,
  "revenueGrowth": 0.0487,
  "earningsGrowth": 0.1024,
  "profitMargin": 0.2637,
  "operatingMargin": 0.3142,
  "grossMargin": 0.4612,
  "returnOnEquity": 1.5718,
  "returnOnAssets": 0.2847,
  "totalRevenue": 395000000000,
  "totalCash": 62484000000,
  "totalDebt": 104590000000,
  "debtToEquity": 173.77,
  "currentRatio": 0.988,
  "freeCashflow": 108807000000,
  "dividendYield": 0.0044,
  "dividendRate": 1.0,
  "exDividendDate": "2026-02-10",
  "payoutRatio": 0.1578,
  "fiftyTwoWeekHigh": 260.10,
  "fiftyTwoWeekLow": 169.21,
  "fiftyDayAverage": 232.45,
  "twoHundredDayAverage": 224.18,
  "analystTargetMean": 252.30,
  "analystTargetHigh": 300.00,
  "analystTargetLow": 200.00,
  "analystRecommendation": "buy",
  "analystCount": 42,
  "analystBuy": 34,
  "analystHold": 6,
  "analystSell": 2,
  "nextEarningsDate": "2026-04-24",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "fullTimeEmployees": 164000,
  "website": "https://www.apple.com",
  "country": "United States",
  "city": "Cupertino",
  "sharesOutstanding": 15204100096,
  "floatShares": 15180000000,
  "shortRatio": 1.52,
  "beta": 1.24,
  "priceHistory": [
    {
      "date": "2026-02-06",
      "open": 227.18,
      "high": 229.42,
      "low": 226.35,
      "close": 228.74,
      "adjClose": 228.74,
      "volume": 48120000
    },
    {
      "date": "2026-02-07",
      "open": 229.10,
      "high": 231.85,
      "low": 228.60,
      "close": 231.20,
      "adjClose": 231.20,
      "volume": 51340000
    }
  ],
  "dividends": [
    {
      "date": "2025-11-08",
      "amount": 0.25
    },
    {
      "date": "2026-02-10",
      "amount": 0.25
    }
  ],
  "splits": [],
  "platform": "yahoo_finance",
  "scrapedAt": "2026-03-06T12:00:00.000Z"
}
```

### 📋 Casos de Uso

- **Pesquisa de Ações** — Análise fundamental completa com financeiros, margens e índices
- **Acompanhamento de Carteira** — Monitore preços em tempo real e métricas-chave
- **Consenso de Analistas** — Agregue ratings compra/neutro/venda e preços-alvo
- **Calendário de Resultados** — Acompanhe datas de resultados e dividendos
- **Análise Histórica** — Baixe histórico OHLCV para backtesting e gráficos
- **Screening por Setor** — Compare empresas dentro de setores por fundamentos
- **Rastreamento de Cripto** — Monitore criptomoedas junto com ações tradicionais
- **Monitoramento ETF/Índice** — Acompanhe ETFs, fundos e índices principais

### ❓ Perguntas Frequentes

**P: Quais tipos de ativos este actor suporta?**
R: Ações (AAPL, MSFT), ETFs (SPY, QQQ), índices (^GSPC, ^DJI), cripto (BTC-USD, ETH-USD) e forex (EURUSD=X). Use o formato de ticker adequado do Yahoo Finance.

**P: Preciso de uma chave de API do Yahoo Finance?**
R: Não. O actor autentica automaticamente através do mecanismo de sessão do Yahoo Finance (cookie + crumb). Nenhuma chave de API ou conta premium é necessária.

**P: Até onde vai o histórico de preços?**
R: Até o histórico completo do ticker usando `historyRange: "max"`. As opções de granularidade são diária (1d), semanal (1wk) ou mensal (1mo).

**P: Por que alguns campos retornam 0 para meu símbolo?**
R: Alguns campos se aplicam apenas a certos tipos de ativos. Por exemplo, símbolos de cripto não terão `sector`, `industry` ou `fullTimeEmployees`. ETFs e índices não têm dados de lucro. O actor retorna 0 para campos numéricos não aplicáveis.

**P: Quantos símbolos posso processar em uma execução?**
R: Até 50 símbolos por execução. As cotações são buscadas em lotes de 10, e cada símbolo recebe requisições individuais de fundamentos e gráfico com rate limiting.

### 💰 Preços

Este actor usa precificação **Pay Per Event (PPE)**:

| Métrica | Custo |
|---------|-------|
| Por símbolo extraído | $0.08 |

Por exemplo, processar 10 símbolos custa $0.80.

### 🔗 Actors Relacionados

- [TradingView Screener](https://apify.com/viralanalyzer/tradingview-screener) — Análise técnica & scanner de mercado
- [Shopify Store Intelligence](https://apify.com/viralanalyzer/shopify-store-intelligence) — Análise competitiva e-commerce
- [Google Maps BR Scraper](https://apify.com/viralanalyzer/google-maps-br-scraper) — Dados de empresas
- [CNPJ Enricher](https://apify.com/viralanalyzer/cnpj-enricher) — Dados empresariais brasileiros

### 📝 Changelog

#### v1.0 (Atual)

- ✅ Cotações em tempo real via Yahoo Finance v7 API
- ✅ Fundamentos financeiros via v10 quoteSummary
- ✅ Histórico de preços OHLCV via v8 chart API
- ✅ Recomendações de analistas com detalhamento compra/neutro/venda
- ✅ Histórico de dividendos e eventos de desdobramento
- ✅ Perfil da empresa (setor, indústria, funcionários)
- ✅ Suporte multi-ativos (ações, ETFs, índices, cripto, forex)
- ✅ Autenticação de sessão (cookie + crumb)
- ✅ Guardrails anti-placeholder para integridade de dados
- ✅ Integração com cobrança PPE

# Actor input Schema

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

Ticker symbols to look up (e.g., 'AAPL', 'GOOG', 'MSFT', 'BTC-USD', '^GSPC'). Supports equities, ETFs, indices, crypto, and forex.

## `includeHistory` (type: `boolean`):

Include historical OHLCV price data for each symbol.

## `historyRange` (type: `string`):

Time range for price history data.

## `historyInterval` (type: `string`):

Data granularity for price history.

## `includeFundamentals` (type: `boolean`):

Include financial data: revenue, margins, cash flow, debt, analyst targets.

## `proxyConfiguration` (type: `object`):

Proxy settings. Datacenter proxy is ON by default (rotating IPs reduce Yahoo rate-limiting). For large runs, switch to a residential proxy.

## Actor input object example

```json
{
  "symbols": [
    "AAPL"
  ],
  "includeHistory": true,
  "historyRange": "1mo",
  "historyInterval": "1d",
  "includeFundamentals": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all scraped results. Each item follows the dataset schema.

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

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

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/yahoo-finance-intelligence").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"
  ]
}' |
apify call viralanalyzer/yahoo-finance-intelligence --silent --output-dataset

```

## MCP server setup

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

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/c2QfTV7Gsb5Gs5DKo/builds/ig26iq3325OePQkdA/openapi.json
