/docs/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
Retrieving data from Sheets results in 404 error 50% of the time
1
In past 48hrs I'm seeing JS libraries that normally retrieve data from Google Sheets resulting in a 404. 
or datatables.js: https://carbonbrief.github.io/ipcc-ar6-observations/ (shows "No data available in table").

Data is published to web, and we have used this method for years, but suddenly charts/tables only correctly displaying 50% of the time. Please refresh a few times to see issue. Have tested across Firefox, Chrome, Safari and on mobile Safari all with same results/errors. Inspect the source code to see methods of calling data from Sheets, and you can see json is valid ie: https://spreadsheets.google.com/feeds/list/1D8EpqaTT0MqllKCjugcqS2Ej6N97FOw7Ml9H4mRSlno/1/public/full?alt=json

Any support really appreciated - currently affecting ~500 or so data visualisations!!
Details
Pinned
Locked
Latest Update Latest Updates (0)
Relevant Answer Relevant Answers (0)
All Replies (40)
Top Contributor since 12 January 2013
Relevant Answer
Hi Tom,
 
You may want to upgrade to Google Sheets API v4. The GData API Directory tells:
 
Google Spreadsheets Data API: GData version is still live. Replaced by the Google Sheets API v4.
 
 
Cheers --Hyde
marked this as an answer
Relevant Answer
@Tom I had the same issue suddenly appear as well and was frustrated by the lack of notice and messaging for the errors I was receiving. Beyond updating to use the new v4 formatting of the JSON, make sure to check your permissions on the underlying Sheets as you might need up update their levels/access.
marked this as an answer
Relevant Answer
We're experiencing the same issue. I'm glad I stumbled upon this report as I've been pulling my hair out over the last two days trying to figure out what changed to cause this issue.

In our case we have a couple of websites that rely heavily on spreadsheets.google.com/feeds/list for data retrieval, and the sites are experiencing the same error the OP described over 90% of the time. 

What is strange is I can open the feeds/list url (example below) in another tab just fine, it's just the $.getJSON() call that is now throwing off the 404 error where it's been working fine for years.

The above feed is used on the home page for:

Another data point, I have noticed over the past several months an increasing frequency of pages not loading the data because of the 404 error, but prior to the last couple of days a simple page refresh would resolve the issue. That is no longer the case.

Any help in resolving this issue would be greatly appreciated.

Edited to add: I've recoded most of the above website to work with the new output format. For those that might still be looking on how to parse the new format, I would suggest using Chrome's Inspect to examine the js used on our website. I have also made a post below in this topic with a sample code snippet that we use to parse the data.
marked this as an answer
Relevant Answer
I am also experiencing the same issue. I am new to sheet API but it worked well for at least a month for me. I found that in these few days there are around 70% of chance that the data retrieve request will return a 404 error. 
As I am new to this, I believe I am in sheet API v4. Or any hints on how to update the API version?
Any information about the problem is appreciated.
marked this as an answer
Relevant Answer
Thanks @Hyde. To follow up that advice and repeat other people's concerns/questions - what would updating from v3 to v4 look like? I have tried following the Migrating from a previous API documentation, but can only produce 404s eg (v3) https://spreadsheets.google.com/feeds/cells/{spreadsheetID}/2/public/values?alt=json becomes (v4) https://sheets.googleapis.com/v4/spreadsheets/cells/{spreadsheetID}/2/public/values?alt=json but does not work. No doubt I am missing something here...

Secondly, updating the API's of 100s of different files is not a feasible path to go down. This recent issue mostly impacts our data visualisations rendered with the Highcharts.js library, which only requires a Google Spreadsheet key to retrieve the data. 

I've also noticed since my original post that the API addresses that were valid a couple days ago now direct to a "Sorry, unable to open the file at present" message...
marked this as an answer
Top Contributor since 12 January 2013
Relevant Answer
Hi Tom,
 
The old Gdata API is simply put a special endpoint that returns the data you asked for. The only code you need to write is to parse and use the data. The GData API has the downside that the spreadsheet must be publicly available in the internet. The advantage is that no authentication is required.
 
The new Sheets API v4 is a modern RESTful interface where you need to write code to authenticate to Google and retrieve the data in addition to the code to parse and use the data. One advantage is that you do not need to make the spreadsheet publicly available. The primary downside is that you need additional code to authenticate — but you may avoid the need to authenticate if your spreadsheet is shared to "anyone with the link".
 
It is not simple migration. Your existing libraries may not work. See the Google Sheets API Overview.
 
Cheers --Hyde
marked this as an answer
Relevant Answer
@Hyde Does that mean that the old direct url for retrieving a JSON response will no longer work? If not, is there any similar alternative regarding v4?

Thank you in advance.
marked this as an answer
Top Contributor since 12 January 2013
Relevant Answer
Does that mean that the old direct url for retrieving a JSON response will no longer work?
 
Hi Nuno,
 
I do not have any information other than what the GData API Directory and the other resources I linked tell. The GData v3 JSON API may or may not continue to work. The upgrade path Google recommends is Google Sheets API v4. It is not a simple migration.
 
Cheers --Hyde
marked this as an answer
Relevant Answer
@Andy Hopkins Just click the right top "Deploy" button and create a new deployment. Besides, you will need to create a new deployment if there is any update of your AppScript.
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/docs/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Removed from Updates
Marked as Recommended Answer
Marked as Update
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
Known Issue
Fixed
Marked Fixed
Unmarked Fixed
Unable to mark fixed
Unable to unmark fixed
/profile/0
false
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
35
false