Nimbryxo Studio

Use Yahoo Finance Market Data & Fundamentals Scraper with Python

Pull live quotes, historical OHLCV candles, financial statements, dividends, splits, news, analyst ratings and holder data from Yahoo Finance for any ticker, ETF, index, currency pair or crypto symbol.

1. Choose the data you need

Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.

2. Prepare a source-based input

This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.

{
  "concurrency": 1,
  "includeAnalystPriceTargets": false,
  "includeDividends": false,
  "includeEarningsCalendar": false,
  "includeEarningsEstimates": false,
  "includeEarningsHistory": false,
  "includeFinancials": false,
  "includeFundData": false,
  "includeHistory": false,
  "includeHolders": false,
  "includeInsiders": false,
  "includeInsights": false,
  "includeNews": false,
  "includeOptions": false,
  "includePrePost": false,
  "includeQuarterlyFinancials": false,
  "includeRecommendations": false,
  "includeRelatedSymbols": false,
  "includeSecFilings": false,
  "includeSplits": false,
  "includeUpgradesDowngrades": false,
  "interval": "1d",
  "language": "en-US",
  "maxNews": 10,
  "maxOptionContracts": 50,
  "maxResults": 1,
  "maxSearchResults": 10,
  "mode": "tickers",
  "optionContractType": "both",
  "optionExpirations": 1,
  "range": "5d",
  "region": "US",
  "screenerId": "day_gainers",
  "screenerSort": "intradaymarketcap",
  "searchQuery": "Apple",
  "tickers": [
    "AAPL"
  ]
}

Download input.example.json and save your reviewed copy as input.json.

FieldTypeRequiredDescription
modestringrequiredWhat to scrape.
tickersarrayoptionalSymbols or Yahoo Finance quote URLs (mode=tickers). Examples: `AAPL`, `BRK.B`, `^GSPC`, `EURUSD=X`, `BTC-USD`, `7203.T`, `https://finance.yahoo.com/quote/AAPL/`.
searchQuerystringoptionalCompany, fund, index, currency or crypto name to search for (mode=search).
maxSearchResultsintegeroptionalMaximum number of search results to return (mode=search).
screenerIdstringoptionalYahoo predefined screener to run (mode=screener). Predefined screeners are US-centric; use mode=customScreener for a region-aware list.
screenerSortstringoptionalSort field for mode=customScreener.
regionstringoptionalYahoo market region used for quotes, search, trending, localization and mode=customScreener.
languagestringoptionalLanguage used for names, news and localized labels.
rangestringoptionalHistory range used when no start/end dates are supplied (mode=tickers).
startDatestringoptionalEarliest date for historical bars (`YYYY-MM-DD`). Overrides `range` (mode=tickers).
endDatestringoptionalLatest date for historical bars (`YYYY-MM-DD`). Overrides `range` (mode=tickers).
intervalstringoptionalCandle interval. Intraday intervals have shorter Yahoo range limits; incompatible combinations are clamped and reported in the run status.
includePrePostbooleanoptionalInclude extended-hours bars for intraday history.
includeHistorybooleanoptionalInclude historical bars with adjusted close.
includeDividendsbooleanoptionalInclude the full dividend history from Yahoo chart events.
includeSplitsbooleanoptionalInclude stock-split history with numerator and denominator.
includeNewsbooleanoptionalInclude ticker-related news headlines.
maxNewsintegeroptionalMaximum news items per ticker. Yahoo's news graph serves 200+ items through cursor pagination; the actor caps this request at 200.
includeFinancialsbooleanoptionalInclude annual income statement, balance sheet and cash-flow statement.
includeQuarterlyFinancialsbooleanoptionalAdd quarterly statements under `financials.quarterly`. Takes effect only when `includeFinancials` is also on.
includeHoldersbooleanoptionalInclude institutional, mutual-fund, major-holder and insider-holder summaries.
includeInsidersbooleanoptionalInclude insider transactions, insider holders and net share-purchase activity.
includeOptionsbooleanoptionalInclude option chains for optionable symbols.
optionExpirationsintegeroptionalHow many upcoming option expirations to fetch (mode=tickers, includeOptions=true).
maxOptionContractsintegeroptionalMaximum calls and maximum puts per expiration.
optionContractTypestringoptionalWhich option sides to return.
minStrikenumberoptionalDrop option contracts below this strike.
maxStrikenumberoptionalDrop option contracts above this strike.
minVolumeintegeroptionalDrop option contracts below this volume. Contracts with no volume are excluded when this is set.
minOpenInterestintegeroptionalDrop option contracts below this open interest. Contracts with no open interest are excluded when this is set.
minImpliedVolatilityPercentnumberoptionalDrop contracts below this implied volatility in percent, e.g. 25 means 25%.
includeRecommendationsbooleanoptionalInclude the analyst recommendation summary and four-period recommendation trend.
includeUpgradesDowngradesbooleanoptionalInclude the latest analyst rating changes.
includeAnalystPriceTargetsbooleanoptionalInclude the analyst price-target summary.
includeEarningsHistorybooleanoptionalInclude recent quarters with EPS actual, estimate, difference and surprise.
includeEarningsEstimatesbooleanoptionalInclude EPS and revenue estimates plus growth estimates.
includeEarningsCalendarbooleanoptionalInclude upcoming earnings dates, estimates and dividend dates.
includeFundDatabooleanoptionalInclude fund profile, top holdings and performance for ETFs and mutual funds.
includeSecFilingsbooleanoptionalInclude recent SEC filings with EDGAR links and exhibits.
includeInsightsbooleanoptionalInclude technical outlook, research reports and significant developments.
includeRelatedSymbolsbooleanoptionalInclude Yahoo's related-symbol recommendations.
maxResultsintegeroptionalMaximum records for screener, customScreener, trending and marketSummary modes. Search uses maxSearchResults.
concurrencyintegeroptionalNumber of tickers fetched in parallel (mode=tickers).

3. Start an Actor run

Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.

Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.

import json
import os
import urllib.request

# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
    actor_input = json.load(stream)

token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
    "https://api.apify.com/v2/acts/pKSuSrtPEecMXeM4a/runs?timeout=120&maxTotalChargeUsd=0.50",
    data=json.dumps(actor_input).encode("utf-8"),
    headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
    method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
    run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.

4. Inspect the actual results

Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.

Dataset with ticker quotes (including US post-market fields), OHLCV history, expanded financial statements, dividends, splits, up to 200 news items, analyst and earnings data, holders, options, fund data with bond ratings and sector weights, SEC filings, insights, search results, custom and predefined screener rows, trending symbols and market summary rows.

Questions before you run

Which inputs are required?

The published required fields are mode

What does this guide verify?

The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.

What if the run request times out?

Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.

Generated from source build z23J6rGwf21tmdpCT and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.