Yahoo Finance Scraper avatar

Yahoo Finance Scraper

Pricing

from $4.00 / 1,000 results

Go to Apify Store
Yahoo Finance Scraper

Yahoo Finance Scraper

Scrape stock quotes, company profiles, and historical price data from Yahoo Finance. Get real-time prices, market cap, P/E ratios, dividends, and OHLCV history.

Pricing

from $4.00 / 1,000 results

Rating

0.0

(0)

Developer

cloud9

cloud9

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

3 days ago

Last modified

Share

Scrape stock quotes, company profiles, and historical price data from Yahoo Finance. Get real-time prices, market cap, P/E ratios, dividends, and OHLCV history.

Use cases

  • Pull live quotes and valuation ratios for a watchlist
  • Build a portfolio dashboard with P/E, market cap, and 52-week range
  • Screen stocks on dividend yield or volume
  • Automate a daily market snapshot
  • Enrich financial models with current market data

Input

ParameterTypeRequiredDefaultDescription
symbolsarrayYes["AAPL","GOOGL","MSFT"]List of stock ticker symbols to scrape (e.g., AAPL, GOOGL, MSFT)
modestringYes"quote"Type of data to scrape Allowed: quote, profile, history.
periodstringNo"1mo"Time period for historical data (only used in history mode) Allowed: 1d, 5d, 1mo, 3mo, 6mo, 1y, 5y.
maxResultsintegerNo10Maximum number of results to return per symbol (for history mode)
proxyConfigurationobject (proxy)No{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]}Proxy configuration for requests. Residential proxies recommended to avoid blocks.

Example input

{
"symbols": [
"AAPL",
"GOOGL",
"MSFT"
],
"mode": "quote",
"period": "1mo",
"maxResults": 3,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
}

Output

The exact fields depend on the mode you run. This is real output from an actual run of this Actor:

{
"symbol": "AAPL",
"shortName": "Apple Inc.",
"longName": "Apple Inc.",
"regularMarketPrice": 319.97,
"regularMarketChange": -8.23999,
"regularMarketChangePercent": -2.51058,
"regularMarketVolume": 38272821,
"marketCap": 4669700046848,
"trailingPE": 36.60984,
"forwardPE": 33.4195,
"dividendYield": 0.34,
"fiftyTwoWeekHigh": 344.57,
"fiftyTwoWeekLow": 225.95,
"currency": "USD"
}
FieldType
symbolstring
shortNamestring
longNamestring
regularMarketPricenumber
regularMarketChangenumber
regularMarketChangePercentnumber
regularMarketVolumenumber
marketCapnumber
trailingPEnumber
forwardPEnumber
dividendYieldnumber
fiftyTwoWeekHighnumber
fiftyTwoWeekLownumber
currencystring

Results are exportable from Apify Console or the API as JSON, CSV, Excel, or XML.

How to run it

In Apify Console — open the Actor, fill in the input form, click Start, then download the results from the Dataset tab.

With the JavaScript client

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('cloud9_ai/yahoo-finance-scraper').call({
"symbols": [
"AAPL",
"GOOGL",
"MSFT"
],
"mode": "quote",
"period": "1mo",
"maxResults": 3,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

With the Python client

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('cloud9_ai/yahoo-finance-scraper').call(run_input={
"symbols": [
"AAPL",
"GOOGL",
"MSFT"
],
"mode": "quote",
"period": "1mo",
"maxResults": 3,
"proxyConfiguration": {
"useApifyProxy": True,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
print(item)

With the APIPOST https://api.apify.com/v2/acts/cloud9_ai~yahoo-finance-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN with the input JSON as the body.

Notes and limits

  • No API key, account, or login is needed — just the input above.
  • maxResults caps how much a single run collects, which is also what caps the run's cost.
  • Requests are paced and failed requests are retried automatically, so runs stay inside the source's rate limits.
  • Supports Apify Proxy via proxyConfiguration; the default is fine for most runs.
  • Only publicly available data is collected. How you use the output is your responsibility, including the source's terms of use and any applicable data-protection law.

Support

Found a bug, or need a field that isn't in the output? Open an issue on the Issues tab of this Actor in Apify Console. Issues there are read and answered.

License

Apache-2.0