# Yahoo Finance Markets Scraper (`santamaria-automations/yahoo-finance-markets-scraper`) Actor

Read the public Yahoo Finance market lists: most active, gainers, losers, trending, 52-week gainers and losers, ETFs and crypto. Price, change, volume, market cap, P/E and 52-week range as numbers, with the raw text kept. No login needed.

- **URL**: https://apify.com/santamaria-automations/yahoo-finance-markets-scraper.md
- **Developed by:** [NanoScrape](https://apify.com/santamaria-automations) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 row delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Markets Scraper

Read the public market lists of Yahoo Finance (finance.yahoo.com) and get one record per row, with the numbers already parsed. No login and no API key are needed.

### What you get

- Every supported list type in one run: most active, gainers, losers, trending, 52-week gainers, 52-week losers, most active ETFs and all crypto currencies. Put several list names in `lists` and each one is read in turn.
- Page 2 and later pages of each list, up to the list total or the `maxResults` you set (up to 1,000 rows per list). The actor asks for 100 rows per page, so a 300-row list takes three page requests.
- Clean numeric fields. Volume, average volume, market cap, change percent, the 52-week change and the 52-week range (low and high) are returned as numbers, so `4.314T` becomes `4314000000000` and `-1.39%` becomes `-1.39`.
- The raw text kept alongside, in fields such as `volumeRaw`, `marketCapRaw`, `changePercentRaw` and `fiftyTwoWeekRangeRaw`, so you can always compare with what the page shows.
- Missing values (`--` on the page) come back as null, never as zero.
- The list name and the rank of each row, so you can rebuild the order of the list.
- A symbol that appears twice in the same list is returned once.
- A run that is interrupted continues where it stopped. Rows already delivered are not delivered or charged again.

### Use with AI agents (MCP)

Connect this actor to any MCP-compatible AI client, such as Claude Desktop, Cursor, VS Code, LangChain or LlamaIndex.

**MCP server URL:**

```
https://mcp.apify.com?tools=santamaria-automations/yahoo-finance-markets-scraper
```

**Example prompt once connected:**

> "Use `yahoo-finance-markets-scraper` to read the 50 biggest gainers and losers today and show the ones with a market cap above 10 billion."

### Data extracted

| Field | Example |
|-------|---------|
| `symbol`, `name` | `"NVDA"`, `"NVIDIA Corporation"` |
| `assetClass` | `"stock"`, `"etf"` or `"crypto"` |
| `list`, `rank`, `page` | `"most-active"`, `1`, `1` |
| `quoteUrl` | `"https://finance.yahoo.com/quote/NVDA/"` |
| `currency` | `"USD"` |
| `price`, `change`, `changePercent` | `176.18`, `-2.49`, `-1.39` |
| `volume`, `avgVolume3m`, `marketCap` | `416216000`, `122713000`, `4314000000000` |
| `volumeRaw`, `avgVolume3mRaw`, `marketCapRaw`, `changePercentRaw` | `"416.216M"`, `"122.713M"`, `"4.314T"`, `"-1.39%"` |
| `peRatioTtm` | `23.6` |
| `fiftyTwoWeekChangePercent`, `fiftyTwoWeekChangePercentRaw` | `-7.5`, `"-7.50%"` |
| `fiftyTwoWeekLow`, `fiftyTwoWeekHigh`, `fiftyTwoWeekRangeRaw` | `164.27`, `243.37`, `"164.27 - 243.37"` |
| ETF lists only | `fiftyDayAverage`, `twoHundredDayAverage`, `return3mPercent`, `returnYtdPercent` |
| Crypto lists only | `volume24h`, `volume24hRaw`, `volumeAllCurrencies`, `circulatingSupply`, `circulatingSupplyRaw` |
| `scrapedAt` | `"2026-11-10T14:00:00Z"` |

Fields that the list does not show are returned empty (null). Prices on the stock and ETF lists are in US dollars. On the crypto list the currency is the quote side of the pair, for example `USD` for `BTC-USD`.

### Pricing

Pay-per-event pricing. You pay only for rows that were saved to the dataset.

| Event | Price |
|-------|-------|
| Actor start (`actor-start`) | $0.001 per run |
| Row scraped (`stock-result`) | $0.0009 per row |

The start event is charged once per run, together with the first saved row. A run that returns nothing is not charged. If you set a maximum cost per run, the actor stops before it goes over that limit. The same row event applies to stock, ETF and crypto rows.

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `lists` | string\[] | List names: `most-active`, `gainers`, `losers`, `trending`, `52-week-gainers`, `52-week-losers`, `etf-most-active`, `crypto-all`. | `most-active` |
| `maxResults` | integer | Most rows to return from each list, up to the list total. 0 uses 100. Maximum 1000. | `100` |

### Usage examples

#### Most active stocks, first 100

```json
{
  "lists": ["most-active"],
  "maxResults": 100
}
```

#### Gainers and losers together

```json
{
  "lists": ["gainers", "losers"],
  "maxResults": 60
}
```

#### Several list types, deeper pages

```json
{
  "lists": ["most-active", "52-week-gainers", "etf-most-active", "crypto-all"],
  "maxResults": 300
}
```

### Output

Results are saved to the default dataset. Export them as JSON, CSV or Excel, or read them through the API.

Sample record:

```json
{
  "symbol": "NVDA",
  "name": "NVIDIA Corporation",
  "assetClass": "stock",
  "list": "most-active",
  "rank": 1,
  "quoteUrl": "https://finance.yahoo.com/quote/NVDA/",
  "currency": "USD",
  "price": 176.18,
  "change": -2.49,
  "changePercent": -1.39,
  "changePercentRaw": "-1.39%",
  "volume": 416216000,
  "volumeRaw": "416.216M",
  "avgVolume3m": 122713000,
  "avgVolume3mRaw": "122.713M",
  "marketCap": 4314000000000,
  "marketCapRaw": "4.314T",
  "peRatioTtm": 23.6,
  "fiftyTwoWeekChangePercent": -7.5,
  "fiftyTwoWeekChangePercentRaw": "-7.50%",
  "fiftyTwoWeekLow": 164.27,
  "fiftyTwoWeekHigh": 243.37,
  "fiftyTwoWeekRangeRaw": "164.27 - 243.37",
  "page": 1,
  "scrapedAt": "2026-11-10T14:00:00Z"
}
```

### Limitations

- Only the market list pages are read. Single quote pages, news, charts, history and financial statements are not collected.
- The lists show a snapshot of the moment the page was read. Prices are as the site shows them and can be delayed.
- The `trending` list has one page of 100 rows. The other lists continue to their total, up to `maxResults`.
- The `gainers` list is short on some days, so it can return fewer rows than `maxResults`.
- The crypto list has thousands of rows. Rows are returned in the list order, up to `maxResults`.
- Some values are not shown for some rows, for example the P/E ratio of a company without earnings. They are returned as null.
- Only the lists named above are supported. Other list names are refused before the run starts.
- If the site refuses every request, the run fails and nothing is charged.

### FAQ

**Which pages does it read?**
The market list pages of finance.yahoo.com under `/markets/`, one request per 100 rows. It does not use the site search or any data service behind the pages.

**Why both a number and a raw text?**
The page writes large values in short form. You get the number for calculations and the raw text to compare with the page.

**How many rows do I get per list?**
Up to the list total or `maxResults`, whichever is smaller, with a ceiling of 1,000 per list.

**What happens when a symbol appears on two pages?**
It is returned once per list.

**What does a run cost?**
The start price plus the price per row, see the pricing table.

**What status does a run end with?**
The run status says how many rows were delivered. If the site refuses every request, the run fails and nothing is charged.

# Actor input Schema

## `lists` (type: `array`):

Market lists to read: most-active, gainers, losers, trending, 52-week-gainers, 52-week-losers, etf-most-active, crypto-all. Every list is read page by page up to its total. Leave empty to read most-active.

## `maxResults` (type: `integer`):

Most rows to return from each list, up to the list total. 0 or empty uses 100. Maximum 1000.

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

Connection settings. The default works for most runs; the actor chooses the level it needs.

## Actor input object example

```json
{
  "lists": [
    "most-active"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

Dataset containing one record per list row (stock, ETF or crypto)

# 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 = {
    "lists": [
        "most-active"
    ],
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("santamaria-automations/yahoo-finance-markets-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 = {
    "lists": ["most-active"],
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("santamaria-automations/yahoo-finance-markets-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 '{
  "lists": [
    "most-active"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call santamaria-automations/yahoo-finance-markets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,santamaria-automations/yahoo-finance-markets-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/BO7TfL27cWk9dB22c/builds/imzxUechMLkcxCmeP/openapi.json
