I am attempting to pull from https://research.investors.com/stock-quotes/nasdaq-apple-inc-aapl.htm I want to get the EPS Rating which is the 305th list item, which I found using var i = 1; [].forEach.call(document.getElementsByTagName("table"), function(x) { console.log(i++, x); }); in the console.

This is the importhtml i have used: =IMPORTHTML("https://research.investors.com/stock-quotes/nasdaq-apple-inc-aapl.htm","list",305)

and the importxml i have used: =IMPORTXML("https://research.investors.com/stock-quotes/nasdaq-apple-inc-aapl.htm","/html/body/div[1]/div[9]/div/form/div[2]/div[3]/section/div/div[9]/div[1]/div/div[2]/ul[3]/li[2]") but all of them return "#N/A"

Error reads "Could not fetch url: https://research.investors.com/stock-quotes/nasdaq-apple-inc-aapl.htm"

Am I approaching the IMPORT functions incorrectly? Or is the structure of this page not compatible with these functions? Any help is appreciated!

I should note that other domain prefixes import fine, such as "in.investors.com" tested with =IMPORTHTML("https://in.investing.com/equities/jagson-airlines-bo", "table",2)


1 Answer 1


It looks like the site you mention is behind a cookie wall, and thus cannot be accessed programmatically with any Google Sheets spreadsheet function.

See How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website?

  • are cookie walls sitewide? as mentioned in the post, I am able to use the import functions for other subdomains of the site such as "in.investors.com". is there no workaround for this?
    – JishCodes
    Nov 30, 2021 at 20:05
  • I do not know how the website you mention uses cookies, or whether their cookie wall is sitewide. See the answer I linked for more resources. Dec 1, 2021 at 9:16
  • I gather that this is your first question at Stack Exchange. See What should I do when someone answers my question? Dec 1, 2021 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.