All Articles

    Options Data in Google Sheets: Import an Options Chain

    How to get options data into Google Sheets: why IMPORTHTML breaks, add-ons and APIs, CSV links with IMPORTDATA, Excel Power Query, and a CSP watch sheet.

    9 min read

    To get options data into Google Sheets you need a source that serves the chain as plain data, usually a CSV or JSON link, and then a formula such as IMPORTDATA or a short Apps Script to pull it in. Scraping a quote page with IMPORTHTML can work for a day and then break, and GOOGLEFINANCE has no options data at all. The most reliable setup for a premium seller is to run the screen somewhere else and import only the filtered results, not whole option chains.

    Below are the options I've seen people use, what goes wrong with each, and then a working layout for a cash-secured put watch sheet you can copy.

    Four ways to get options data into Google Sheets

    MethodSetupReliabilityGood for
    IMPORTHTML / IMPORTXML scrapingOne formulaLow, breaks when the page changesA quick one-off look
    Market data add-onInstall, sign in, often a subscriptionDepends on the vendorPeople who want menus, not code
    Data API plus Apps ScriptAPI key, a script, a triggerGood, if you maintain itCustom calculations on raw chains
    CSV link from a screenerPaste one formulaGood, the data is already filteredWatch lists, trade sizing, logs

    Scraping with IMPORTHTML, and why it breaks

    The classic trick is =IMPORTHTML("quote page URL", "table", 1) pointed at a public options page. When it works, you get one expiration's calls or puts as a table. Then one morning it returns #N/A or an empty cell.

    There are a few reasons. Many finance sites now build their tables with JavaScript after the page loads, and Google's fetcher only sees the raw HTML. Sites also rate-limit or block requests coming from Google's servers, because thousands of spreadsheets hit them from the same addresses. And the table index changes whenever the site adds a banner or rearranges the page. You also only get what the page shows: usually one expiration, prices without your own yield math, and no filtering across tickers. For a single quick check it's fine. For anything you rely on before placing a trade, it isn't.

    Add-ons

    Several Sheets add-ons sell market data, some with options chains and greeks. They're the easiest route if you want menus instead of code. Before paying, check three things: whether options are actually included (many cover only stocks), how often the data refreshes, and whether the licence lets you use the data the way you plan to. Coverage and pricing vary a lot, so I won't recommend a specific one.

    A data API with Apps Script

    If you have API access through a broker or a market data vendor, Apps Script can call it with UrlFetchApp.fetch, parse the response and write rows into a sheet. A time-driven trigger then reruns it every 10, 15 or 30 minutes. This gives you raw chains and full control.

    The catch is that raw chains are big. A single liquid ticker can have thousands of contracts across expirations, and you still have to compute yields, filter out illiquid strikes and skip earnings dates yourself. Apps Script also has execution time limits and daily fetch quotas, so pulling full chains for 50 tickers every few minutes runs into walls quickly. It's a good project if you enjoy building. If you just want a short list of trades to look at, you're rebuilding a screener inside a spreadsheet.

    Import a saved options screen with IMPORTDATA

    The approach I prefer: let a screener do the heavy filtering, then import only the rows that survive. IMPORTDATA takes a URL that returns CSV and fills the sheet starting at the formula cell, header row included.

    In ThetaScanner this is the CSV link feature, part of Pro. You save a screen in the scanner (filters, put or call, ticker or watchlist, sort and visible columns), turn on API link for that screen, and copy the link from Settings → API access. Here's what the link returns, taken from how the feature is built:

    • The screen's current results as CSV, sorted the same way as the screen, at most 1,000 rows.
    • The same columns the scanner shows for that screen, with the scanner's column names as headers. A screen saved with the default columns has 17: Symbol, Strike, Expiration, DTE, Days to ER, Last Price, Bid, Bid Premium, Bid ROC, Bid Ann. Yield, Break-even, Prob. OTM*, Delta, Theta, Open Int, Spread, Sector.
    • Plain numbers, not formatted text. Percentages come through as percent values, so a Bid ROC of 1.38 means 1.38%, and Bid Premium is dollars per contract.
    • Data from the latest intraday snapshot, which updates roughly every 5 to 10 minutes in market hours. Yields are calculated from the bid, not the mid.

    Paste the link into one cell as =IMPORTDATA("your link"). A brand-new link answers with a "not built yet" response until its first build finishes, which can take a few minutes, so give it a moment before assuming something is wrong. If you edit the screen later, use Save changes on the saved screen and the CSV is rebuilt with the new settings.

    Limits that matter in a spreadsheet

    Each token allows 10 requests per hour and 240 per day across all your screens, and you can have up to 10 screens with an API link. Every cell that contains IMPORTDATA pointing at a link is its own request. So the rule is: one IMPORTDATA per screen, in one place, and every other tab references that range. Don't paste the formula into five tabs.

    There's no point requesting more often anyway. The underlying data changes at most about six times an hour, so extra requests return the same CSV and burn your limit. If you go over, the link answers with a rate-limit error until the next hour (or the next UTC day for the daily cap).

    How refresh and caching work in Google Sheets

    This is where most people get confused. Google decides when IMPORTDATA refreshes. In practice it refetches roughly every hour, and also when you change the formula. The "recalculate every minute" option in the spreadsheet settings doesn't speed up import functions. So a Sheets watch list fed by IMPORTDATA is an hourly view, not a live quote screen.

    For a premium seller that's usually fine. You're picking 30 to 45 day puts, not scalping. But if you want fresher pulls, you have two choices:

    1. Force a refetch by editing the formula. People often append a throwaway parameter to the URL, like &r=2, and bump the number. It works because the link ignores parameters other than the token, but each change is a request against your hourly limit.
    2. Use Apps Script with a timed trigger instead of IMPORTDATA. Fetch the CSV URL without the token in it, send the token in an Authorization: Bearer header, parse with Utilities.parseCsv, and write the rows with setValues. Store the token in the script's properties rather than in a cell. A trigger every 10 minutes is six requests an hour for one screen, which fits; two screens on a 10-minute trigger would be 12 and hit the limit.

    The header option also keeps the token out of the sheet itself, which matters if you share it.

    Example: a cash-secured put watch sheet

    Here's a layout I'd actually use. Start with a saved put screen with the default columns, sorted by Bid Ann. Yield, filtered to your DTE and delta ranges. Then build three tabs.

    Tab 1: Raw

    Cell A1 holds the only IMPORTDATA. Nothing else goes on this tab, so you never overwrite the spill range. With default columns, column A is Symbol, B Strike, D DTE, E Days to ER, H Bid Premium, J Bid Ann. Yield and L Prob. OTM*. Check your own header row, because a screen with different columns shifts the letters.

    Tab 2: Watch

    Put your available cash in B1. In A4, filter the raw rows down to the ones you'd consider:

    =FILTER(Raw!A2:Q, Raw!J2:J>=15, Raw!L2:L>=75, (Raw!E2:E="")+(Raw!E2:E>Raw!D2:D))

    That keeps contracts with at least a 15% annualized bid yield, at least a 75% estimated chance of expiring out of the money, and either no earnings date in the data or earnings after expiration. The last condition is the one people forget; see how to avoid earnings risk when selling options for why it matters.

    The filtered rows spill into A to Q, so add your own columns from R:

    • R4, contracts you can afford: =IF(A4="","",FLOOR($B$1/(B4*100)))
    • S4, total premium at that size: =IF(A4="","",R4*H4)
    • T4, already holding the ticker: =IF(A4="","",COUNTIF(Positions!A:A,A4)>0)

    Fill those down as far as the list can run. Say a row shows a hypothetical XYZ $45 put with 30 DTE and a $0.62 bid. Bid Premium is $62 per contract, Bid ROC is 0.62 ÷ 45 = 1.38%, and Bid Ann. Yield is 1.38% × 365 ÷ 30 = 16.8%, so it passes the 15% filter. With $20,000 in B1, R4 shows FLOOR(20,000 ÷ 4,500) = 4 contracts, which ties up $18,000 and collects $248 before fees. Break-even is $44.38.

    Tab 3: Positions

    A plain list of tickers you already have puts or shares on, typed by hand or pasted from your journal. The COUNTIF in column T flags concentration: if four of your top ten rows are the same ticker you already hold, that's one bet, not four. If you want the bigger picture on picking tickers, the cash-secured put screener guide covers the filters in more depth.

    Pull options data into Excel with Power Query

    Excel handles the same CSV link through Power Query. In ThetaScanner the API access page has a ready-made query for each screen. The path is Data → Get Data → From Other Sources → Blank Query → Advanced Editor, then paste. The query loads the CSV from the link and promotes the first row to headers.

    If Excel asks how to authenticate to the web address, anonymous access is right, since the token is already in the link. Then open Query Properties and pick how you want it to refresh: on file open, every N minutes, or only when you click Refresh All. Same rule as Sheets: a refresh every 10 minutes for one screen is fine, while several screens on short timers will hit the hourly limit. Desktop Excel gives you far more control over refresh timing than Sheets does, which is the main reason some sellers keep their watch sheet in Excel.

    For scripts, the same page shows curl and Python (pandas) examples that send the token in a header. That's also how you'd feed screen results to an AI model for analysis, which using ChatGPT or Claude to analyze options screens walks through.

    Keep the token private, and rotate it when it leaks

    The token is read-only and only works for your own saved screens, but anyone who has a link with ?token= in it can read those screens until you change it. Links leak through browser history, screenshots and shared spreadsheets. Treat a sheet that contains the link like a sheet that contains a password.

    Rotating takes one click on the API access page. It stops every existing link right away and gives you a new token, so you then need to update each spreadsheet and script with the new links. Revoking stops all links without issuing a new token; you can create one later. Two more behaviours to know: links only answer for Pro accounts, so they stop if the subscription ends and work again when it's renewed, and turning off a screen's API link makes that one link stop answering.

    A short checklist before you share a sheet or a screen recording:

    • Is the IMPORTDATA link visible in any cell or the formula bar?
    • Does a script file hold the token in plain text rather than in script properties?
    • Would you be fine with that person reading your screens until you rotate?

    If the answer to the last one is no, rotate first and share second. You can try the scanner that saved screens are built from in the live demo, no account needed, and the guide to screening options fast covers building the saved screen itself.

    Frequently Asked Questions

    Does GOOGLEFINANCE return options prices?

    No. GOOGLEFINANCE covers stocks, funds and currencies, but it has no option chains, strikes, bids or greeks. For options data in Sheets you need a CSV or JSON source, an add-on, or a script that calls a data API.

    How often does IMPORTDATA refresh in Google Sheets?

    Google refreshes import functions on its own schedule, roughly once an hour, and also when you edit the formula. You can't make it refresh every minute from the calculation settings, so for fresher data use an Apps Script trigger or check the source directly.

    Why does my IMPORTHTML options formula show #N/A?

    Usually because the page changed its layout, loads the table with JavaScript, or blocked the request from Google's servers. Scraped finance pages break without warning, which is why a real CSV or API source is more dependable.

    Can I pull options data into Excel instead of Sheets?

    Yes. Excel's Power Query can load a CSV from a web address and refresh it on open or on a timer. Any source that serves a plain CSV over HTTPS works the same way in Excel as in Sheets.

    Educational content, not investment advice. Options involve risk and are not suitable for every investor. Examples use hypothetical numbers.

    Ready to find your next trade?

    Screen 100,000+ options contracts by delta, theta, ROI, and annualized yield, with fresh snapshots throughout the trading day. Free plan, no card needed.

    Start Free with ThetaScanner →