Google Sheets allows you to filter data in grid. 
Sometimes you need to filter and use data with API.
https://developers.google.com/sheets/api
 Google Sheets API has endpoint with array rowMetadata. 
You can iterate over the all rows and check if property hiddenByFilter is setup.
Here is a snippet how to get filtered rows with Google Apps Script





 
 
 
