# Stock Market Data Scraper (`mina_safwat/stock-market-scraper`) Actor

Live prices, company profiles, financial statements, dividends, news, and analyst ratings for shares, ETFs, indices, currencies, and crypto

- **URL**: https://apify.com/mina\_safwat/stock-market-scraper.md
- **Developed by:** [Mina](https://apify.com/mina_safwat) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Get **live stock prices, company profiles, and financial data** for shares, ETFs, indices, currencies, and crypto — from Yahoo Finance, with no API key.

### What does Stock Market Data Scraper do?

Give it a list of tickers and it returns the current price and daily move, the company profile, and whichever extras you switch on: price history, dividends, financial statements, news, major shareholders, and analyst ratings.

It covers far more than US shares. ETFs (`VOO`), indices (`^GSPC`), currencies (`EURUSD=X`), and crypto (`BTC-USD`) all work, as do international listings using their exchange suffix — `VOD.L` for London, `SAP.DE` for Frankfurt, `7203.T` for Tokyo.

### Why use Stock Market Data Scraper?

- **Portfolio tracking** — price a whole watchlist on a schedule and keep the history.
- **Screening and research** — pull P/E, market cap, margins, and growth across hundreds of tickers at once.
- **Dashboards and reports** — feed live figures into Sheets, a BI tool, or your own app.
- **Backtesting** — download years of daily bars for any symbol.
- **Dividend planning** — get the complete payment history for income stocks.

Running it on Apify adds scheduling, an API, integrations (Sheets, Slack, Zapier, S3), and run monitoring.

### How to use Stock Market Data Scraper

1. Enter your **Tickers**, one per line — e.g. `AAPL`, `MSFT`, `BTC-USD`.
2. Leave **Include company profile** on for sector, industry, and valuation ratios.
3. Switch on any **Extras** you need.
4. Click **Start**.

Results appear in the Output tab as they are fetched, and download as JSON, CSV, Excel, or XML.

### Input

| Field | Description |
| --- | --- |
| `tickers` | Symbols to look up, one per line or comma-separated. |
| `include_profile` | Sector, industry, headquarters, employees, business summary, and valuation ratios. On by default. |
| `include_history` + `history_period` + `history_interval` | Historical open, high, low, close, and volume. |
| `include_news` | Recent headlines with publisher and link. |
| `include_dividends` | Full dividend and stock-split history. |
| `include_financials` | Income statement, balance sheet, and cash flow for the last four reporting periods. |
| `include_holders` | Largest institutional shareholders and the ownership split. |
| `include_analyst_ratings` | Buy/hold/sell breakdown and upcoming earnings dates. |

### Output

```json
{
  "ticker": "AAPL",
  "long_name": "Apple Inc.",
  "price": 311.3,
  "previous_close": 309.15,
  "change": 2.15,
  "change_percent": 0.6955,
  "currency": "USD",
  "exchange": "NMS",
  "market_cap": 4543168055848,
  "day_high": 312.4,
  "day_low": 307.9,
  "year_high": 320.5,
  "year_low": 198.2,
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "country": "United States",
  "full_time_employees": 164000,
  "trailing_pe": 36.37,
  "dividend_yield": 0.42,
  "beta": 1.13,
  "target_mean_price": 295.4,
  "recommendation_key": "buy"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Data fields

| Field | Description |
| --- | --- |
| `ticker`, `long_name`, `exchange`, `currency` | What the symbol is and where it trades. |
| `price`, `previous_close`, `change`, `change_percent` | Latest price and the move since the previous close. |
| `open`, `day_high`, `day_low`, `volume` | Today's trading. |
| `year_high`, `year_low` | The 52-week range. |
| `market_cap`, `enterprise_value` | Company size. |
| `sector`, `industry`, `country`, `city`, `website`, `full_time_employees`, `long_business_summary` | Company profile. |
| `trailing_pe`, `forward_pe`, `price_to_book`, `dividend_yield`, `beta`, `profit_margins`, `return_on_equity`, `debt_to_equity`, `revenue_growth` | The usual screening ratios. |
| `target_mean_price`, `recommendation_key`, `number_of_analyst_opinions` | What analysts expect. |
| `history` | Daily (or intraday) bars for the period you chose. |
| `dividends`, `splits` | Payment and split history. |
| `income_statement`, `balance_sheet`, `cash_flow` | One entry per reporting period. |
| `news` | Recent headlines with publisher and link. |
| `institutional_holders`, `major_holders` | Ownership. |
| `error` | Present only when a symbol could not be resolved. |

### How much does it cost to scrape stock data?

Cost tracks how many tickers you look up. The profile and each extra add to the work per ticker, so a plain price check across a long watchlist is very cheap, while full financials for every symbol costs more.

### Tips

- **A watchlist on a schedule** turns the dataset into your own price history — run it daily with the same tickers.
- **Non-US symbols need their suffix.** `VOD` and `VOD.L` are different things; without the suffix you may get the wrong listing or none at all.
- **Intraday intervals only cover recent days.** Ask for `1m` bars over `5y` and you will get far less than you expect — that is Yahoo's limit.
- **Bad symbols are never dropped.** They come back with an `error`, so you always know which of your inputs failed.

### FAQ and support

**Does it need an API key or account?** No.

**Is the price live?** It is the latest figure Yahoo publishes, which for most exchanges runs a short delay behind the live market. It is not suitable for trading on tick-by-tick.

**Why is a field empty?** Not every figure exists for every instrument. ETFs have no income statement, crypto has no sector, and many smaller companies do not report every ratio. Missing values come back empty rather than guessed.

**Can I use this data commercially?** The data comes from Yahoo Finance and is intended for personal and informational use. Redistributing it or building a commercial data product on it may breach Yahoo's terms. You are responsible for how you use it — and none of it is financial advice. Consult a lawyer if you are unsure.

Found a bug or want a field that is missing? Open an issue on the Actor's Issues tab.

### SEO Keywords

stock market scraper, stock price api, financial data scraper, company financial statements, dividend data scraper, etf and index data, analyst ratings scraper, crypto price data, market data extraction, financial news scraper, real time quotes api

# Actor input Schema

## `tickers` (type: `array`):

Symbols to look up, one per line (or comma-separated). Works for shares, ETFs, indices, currencies, and crypto — e.g. AAPL, VOO, ^GSPC, EURUSD=X, BTC-USD. Non-US listings need their exchange suffix, such as VOD.L for London or SAP.DE for Frankfurt.

## `include_profile` (type: `boolean`):

Add sector, industry, headquarters, employee count, business summary, and the headline valuation ratios such as P/E and price-to-book.

## `include_history` (type: `boolean`):

Add historical open, high, low, close, and volume.

## `history_period` (type: `string`):

How far back to go, e.g. 1mo for a month, 1y for a year, max for everything available.

## `history_interval` (type: `string`):

How granular each bar is. Intraday intervals such as 1m only cover recent days.

## `include_news` (type: `boolean`):

Add recent headlines for each ticker, with publisher and link.

## `include_dividends` (type: `boolean`):

Add the full dividend payment history and any stock splits.

## `include_financials` (type: `boolean`):

Add the income statement, balance sheet, and cash flow for the last four reporting periods.

## `include_holders` (type: `boolean`):

Add the largest institutional shareholders and the insider/institution ownership split.

## `include_analyst_ratings` (type: `boolean`):

Add the buy/hold/sell breakdown from analysts and upcoming earnings dates.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT",
    "BTC-USD"
  ],
  "include_profile": true,
  "include_history": false,
  "history_period": "1mo",
  "history_interval": "1d",
  "include_news": false,
  "include_dividends": false,
  "include_financials": false,
  "include_holders": false,
  "include_analyst_ratings": false
}
```

# Actor output Schema

## `dataset` (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 = {
    "tickers": [
        "AAPL",
        "MSFT",
        "BTC-USD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mina_safwat/stock-market-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 = { "tickers": [
        "AAPL",
        "MSFT",
        "BTC-USD",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/stock-market-scraper").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 '{
  "tickers": [
    "AAPL",
    "MSFT",
    "BTC-USD"
  ]
}' |
apify call mina_safwat/stock-market-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/ceVB9NrHqTIqcJO8p/builds/DUU5QQqqVQP9LmE6U/openapi.json
