Who’s it for
- Folks who need live options chains and intraday OHLCV from Yahoo Finance without third-party APIs.
- Builders creating dashboards, alerts, or research pipelines inside n8n.
- Anyone who’s been blocked by Yahoo’s cookie + crumb requirement and wants a reliable pattern to fetch data.
How it works / What it does
This workflow mimics what a browser does so Yahoo’s endpoints will respond with data:
- Symbol Configuration (Code node) – Sets the ticker (default
^SPX). - Get Yahoo Cookies (HTTP Request) – Grabs initial cookies from
https://fc.yahoo.com. - Prepare Cookie Jar (Code node) – Cleans cookies into a usable string and adds a User-Agent.
- Get Crumb (HTTP Request) – Retrieves the required “crumb” token from Yahoo.
- Fetch Options (HTTP Request) – Gets the options chain for the symbol using UA, Cookie, and Crumb.
- Map Calls/Put Options (Code node) – Extracts clean
callsandputsarrays. - Fetch Stock Data (HTTP Request) – Gets intraday stock chart data.
- Map Stock (Code node) – Outputs OHLCV points (time, open, high, low, close, volume).
Outputs:
- Calls/Puts (1 item with calls & puts arrays)
- Stock data (OHLCV items for 1-minute, 1-day range)
How to set up
- Import the JSON into n8n (Workflows → Import from File/Clipboard).
- Open “Symbol Configuration” and set your ticker (e.g.
AAPL,BTC-USD). - Click Execute Workflow.
- View results:
- “Map Calls/Put Options” → option chains
- “Map Stock” → OHLCV intraday series
To run automatically, swap the Manual Trigger for a Cron node.
Requirements
- n8n (no external credentials needed).
- Outbound HTTPS access to:
https://fc.yahoo.comhttps://query2.finance.yahoo.com/*
Note: Yahoo may rate-limit or update its API. This workflow ensures cookies, UA, and crumb handling, but adjustments may be needed over time.
How to customize the workflow
- Change the symbol → Edit the “Symbol Configuration” node.
- Chart granularity → In “Fetch Stock Data”, update
interval(1m,5m,1d, etc.) andrange(1d,1mo,1y, etc.). - Options expiries → Modify “Map Calls/Put Options” to select or return multiple expiration dates.
- Store data → Add a database node (e.g. PostgreSQL, MySQL, SQLite) after “Map Stock” or “Map Options”.
- Alerts & automation → Connect to Slack, Telegram, Email, or dashboards.
- Production-ready → Add retries, error handling, or cache crumb/cookies across runs.
Disclaimer: Data is provided for personal/educational purposes. Review Yahoo Finance’s Terms of Service before redistribution or commercial use.