2
votes

Is there a way to get a subset of data using Google Sheets API v4 by modifying the URL https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEET_ID/values/Sheet1?key=APIKEY[something added to this URL]?

Specifically, I know that you can restrict the result by setting the range. But is there a way to filter the data in other ways through modifying the URL, say returning all rows containing 'John', or something like that?

This question is about Google Sheets API v4.

Many thanks.

2

2 Answers

6
votes

Nope, there is no way to do that. According to the documentation the only parameters for this endpoint other than spreadsheet ID and range are:

  • majorDimension
  • valueRenderOption
  • dateTimeRenderOption

However, all of these control rendering of the returned data and not filtering of the data.

0
votes

It seems this feature is not supported yet. I suggest you specify a range i.e., A1:K10, and after procuring all data, perform a search. You can also check this SO thread for additional insight.