Yahoo Finance Scraper — Quotes, History & Ticker Search avatar

Yahoo Finance Scraper — Quotes, History & Ticker Search

Pricing

from $0.80 / 1,000 results

Go to Apify Store
Yahoo Finance Scraper — Quotes, History & Ticker Search

Yahoo Finance Scraper — Quotes, History & Ticker Search

Scrape live stock quotes, historical OHLCV price data, and ticker symbol search from Yahoo Finance. No login, no API key.

Pricing

from $0.80 / 1,000 results

Rating

0.0

(0)

Developer

Axery

Axery

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Yahoo Finance Quotes & History Scraper

Scrapes live stock quotes, historical OHLCV price data, and ticker symbol search from Yahoo Finance — price, market cap, valuation ratios, analyst targets, and full price history. No login, no API key.

Useful for portfolio tracking, market research, building a price-history archive, and screening on fundamentals across a watchlist.

Three modes

  • Live quote — a current snapshot per symbol: price, day range, volume, market cap, P/E, 52-week range, and optionally sector/industry/analyst targets.
  • Price history — OHLCV candles over a chosen range and interval, one row per candle.
  • Symbol search — look up tickers by company name or keyword.

What makes this different

The crumb requirement is handled for you. Two of Yahoo's own endpoints — the live quote and the fundamentals — return HTTP 401 Invalid Crumb without one, and the fix isn't in Yahoo's docs: fetch a crumb from the same session that first visited fc.yahoo.com, using a plain request with no Accept: application/json header (the crumb endpoint answers 406 if you send one — the one endpoint on this API that wants to be asked differently from every other). Skip either step and the crumb comes back invalid even though the request itself returns 200. This Actor handles both, transparently, and refreshes the crumb automatically if it goes stale mid-run.

Every epoch timestamp is converted. Yahoo mixes Unix-seconds and Unix-milliseconds fields in the same quote response (regularMarketTime, dividendDate, firstTradeDateMilliseconds, ...) with no field-name hint as to which is which. All of them come out as proper ISO-8601 here.

Nothing is silently dropped. A live quote has roughly 90 fields; the ~40 most useful are broken out into named columns, and every other field Yahoo returns is still there in extra_fields rather than discarded.

A bad symbol doesn't break the batch. An unmatched ticker is logged and simply produces no row for that symbol — the rest of your list still comes back.

Input

FieldTypeNotes
modeenumquote, history, or search.
targetsarrayTicker symbols (quote/history) or search queries (search).
includeFundamentalsbooleanSector, industry, analyst targets. Quote mode, one extra request per symbol.
rangeenumHow far back. History mode.
intervalenumCandle size. History mode. Intraday intervals only cover short ranges.
proxyConfigurationobjectNot normally needed.

Output

{
"record_type": "quote",
"symbol": "AAPL",
"longName": "Apple Inc.",
"regularMarketPrice": 309.35,
"regularMarketChangePercent": -0.6264,
"marketCap": 4514709504000,
"trailingPE": 35.475918,
"fiftyTwoWeekHigh": 344.57,
"sector": "Technology",
"target_mean_price": 324.45282,
"recommendation_key": "buy"
}

record_type tells rows from different modes apart if you ever mix runs into one dataset. Each run also writes a RUN_COVERAGE record to the key-value store with what was requested, what came back, and any failure.

Local development

pip install -r requirements.txt
python test_local.py quote AAPL MSFT --fundamentals
python test_local.py history AAPL --range 1y --interval 1wk --out sample_output.json
python test_local.py search apple

sample_output.json is real output from a live history run.