title: Google Sheet API batchUpdateByDataFilter PHP Function
body: <p><a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter" rel="nofollow noreferrer">https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter</a></p>
  
  <p>We have used above function in our code, while we are passing the more than 50 or 100 records within the array records then given 400 bad request array in response.</p>
  
  <p>Can anyone describe the limit of the total values that we are going to pass within the above function?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$batchupdate = array("valueInputOption" =&gt; "RAW", "data" =&gt; $dataarray);
  try {
      $requestBody = new Google_Service_Sheets_BatchUpdateValuesByDataFilterRequest($batchupdate);
      $response = $service-&gt;spreadsheets_values-&gt;BatchUpdateByDataFilter($spreadsheetId, $requestBody);
  }
  catch(Exception $e) {
      echo 'Message: ' . $e-&gt;getMessage();
  }
  </code></pre>