This tutorial shows how to scrape Yahoo Finance data into CSV with the Yahoo Finance Scraper template for UScraper. You will import the workflow, add ticker URLs, confirm the export path, run a small supervised batch, and validate company profile, holders, and ESG-style fields before scaling.
Before you start
Prerequisites and scope
You need UScraper installed as a local desktop app, the Yahoo Finance Scraper template, and a short ticker list you are allowed to process. Start with the bundled KO example before adding your own symbols. The stock workflow visits three Yahoo Finance pages per symbol: profile, holders, and sustainability.
This guide is for visible research pages from Yahoo Finance, not private portfolios, account-only watchlists, paid exchange feeds, CAPTCHA bypassing, high-frequency price capture, or investment advice. If you are unsure about a ticker, use Yahoo Finance symbol lookup first, then open the quote, profile, holders, or historical prices page in a browser before adding it to the workflow.
Technical access is not permission. Review Yahoo's current terms, robots rules, exchange data licenses, and your internal data policy before using exported market data commercially.
Choose an approach
yfinance vs web scraping vs a local scraper
People searching for a Yahoo Finance API alternative usually want one of three outcomes: a Python data feed, a cloud job, or a spreadsheet. The best path depends on who will maintain it.
Use UScraper when an analyst needs a supervised browser run and a CSV deliverable. The template keeps the URL list, waits, selectors, append mode, and export path in one editable workflow.
| Approach | Best fit | Trade-off |
|---|---|---|
| UScraper template | Analyst-led Yahoo Finance to CSV exports | You validate selectors when Yahoo changes layout. |
| yfinance | Python users pulling market data into code | Requires package maintenance and engineering ownership. |
| Custom web scraping | Fully controlled pipelines and enrichment | You own rendering, consent states, retries, pacing, and QA. |
| Hosted scraping tools | Cloud runs and API-oriented delivery | Output shape, pricing, and data custody depend on the vendor. |
Use the local scraper when the deliverable is a reviewable spreadsheet. Move to yfinance, licensed data feeds, or hosted scraping only when the project needs recurring production infrastructure.
Workflow anatomy
What the Yahoo Finance scraper does
The JSON export is the authoritative workflow definition. The template uses a multi-URL loop: Navigate opens each configured page, UScraper waits for the page and quote header, Structured Export reads the current page body, and Loop Continue advances to the next URL.
{
"project": "Yahoo Finance Scraper",
"seed_urls": [
"https://sg.finance.yahoo.com/quote/KO/profile?p=KO",
"https://sg.finance.yahoo.com/quote/KO/holders?p=KO",
"https://sg.finance.yahoo.com/quote/KO/sustainability?p=KO"
],
"flow": [
"Navigate",
"Wait for Page Load",
"Wait for Element",
"Structured Export",
"Loop Continue"
],
"output": {
"fileName": "yahoo_finance_scraper.csv",
"fileMode": "append",
"includeHeaders": true
}
}
The important design choice is three URLs per symbol. A profile page is where company details, sector, industry, employee count, executives, description, and governance text are most likely to appear. A holders page is where major holders, top institutional holders, mutual fund holders, and insider roster text are collected. A sustainability page is where ESG-style risk and controversy fields may appear when Yahoo exposes them.
yahoo_finance_scraper.csvColumn
Keyword
Ticker parsed from the current quote URL.
Column
Company_name
Company name from the title or quote header.
Column
Sector
Sector text from the profile page.
Column
Industry
Industry text from the profile page.
Column
Top_Institutional_Holders
Holder table rows joined into one cell.
Column
Controversy_level
ESG controversy text when available.
Column
Page_URL
Source page for QA and traceability.
Runbook
How to scrape Yahoo Finance data to CSV
Import the template
Open Yahoo Finance Scraper for CSV Export, download the JSON workflow, and import it into UScraper.
Prepare ticker URLs
Keep the KO sample for the first run. For each new symbol, add matching /profile, /holders, and /sustainability URLs to the Navigate block.
Confirm waits and selector
The Wait for Element block looks for Yahoo Finance quote header content. If your browser shows a consent prompt or redirect, handle that before trusting the export.
Set the export folder
Structured Export writes yahoo_finance_scraper.csv with headers enabled and append mode on. Change the save folder to a project-specific location before client work.
Run and validate
Run a small batch, open the CSV, compare several rows against their source URLs, and only then widen the ticker list.
Append mode is useful for multi-symbol batches, but it can also mix test and production rows. Before a rerun, clear the old CSV or use a dated filename.
Quality control
Validate profile, holders, and ESG-style exports
Open the CSV beside the browser. For each symbol, check that the ticker in Keyword matches the source URL, the company name matches the quote header, and fields are populated on the expected page type. Profile fields should mostly appear on profile rows. Holder tables should appear on holders rows. ESG-style fields may be blank when Yahoo redirects the sustainability page or does not expose the metric for that issuer.
| Symptom | Likely cause | Fix |
|---|---|---|
| All cells are blank | Page did not finish rendering or quote header was not found | Run one URL, increase wait time, and inspect the browser state. |
| Company name is wrong | Regional title format changed | Compare the H1 and page title, then update the JavaScript column. |
| Holder fields are blank | The URL is not a holders page or the table layout changed | Open the source URL and confirm the holders table is visible. |
| ESG columns are blank | Sustainability page redirected or has no visible ESG fields | Keep the row, but treat blank ESG fields as an expected QA state. |
| Duplicate rows appear | Append mode reused an old CSV | Clear the file or export to a dated path before rerunning. |
For historical prices, verify the page shape separately on an example such as AAPL historical data. This specific template is tuned for profile, holders, and sustainability pages, not OHLCV history tables.
Frequently asked questions
Yahoo Finance pages may be publicly viewable, but automated collection can still be limited by Yahoo terms, robots directives, exchange data licenses, copyright, privacy rules, and local law. Keep runs modest, avoid restricted content, and get legal review before commercial use.
Next step
Download the Yahoo Finance scraper template
Use this post as the runbook and the template page as the workflow source. Start from the Yahoo Finance Scraper for CSV Export, then browse other finance and research workflows in the UScraper template library or continue reading related tutorials on the UScraper blog.

