Retrieve Google Spreadsheet Worksheet JSON

roka picture roka · Jul 2, 2014 · Viewed 14.8k times · Source

I try to receive the JSON of a Google Spreadsheet Worksheet. It worked till some days ago. For the default worksheet it still works, but not for all other worksheets.

This is the working URL for the default worksheet: https://spreadsheets.google.com/feeds/list/1caRqAA1TyBoZ0eVZvvKheEBh9SGRmQII4qih9urY70k/od6/public/full?alt=json

And this is the URL for the worksheet that stopped working: https://spreadsheets.google.com/feeds/list/1caRqAA1TyBoZ0eVZvvKheEBh9SGRmQII4qih9urY70k/1416241220/public/full?alt=json

The error message is Invalid query parameter value for grid_id.

Only difference is the worksheet parameter (od6 vs 1416241220).

Any ideas on why that error suddenly occurs?

Answer

LeonardDrs picture LeonardDrs · Jul 2, 2014

ChrisPeterson's note:

You can use worksheet position number (1 for the first/default worksheet, 2 for the second worksheet).

Original answer

I came across the same issue and I managed to find my way out. It seems that they recently changed the id for each worksheet.

You can find the new ID at the following

https://spreadsheets.google.com/feeds/worksheets/YOUR_SPREADSHEET_ID/private/full

I got something like o3laxt8 between <id> tags

Ps: od6 anddefault values will always work and redirect to the first worksheet of your document.

Joe Germuska' note:

od6 doesn't work anymore

Seems to work again.