Deleting Rows (DELETE)
DELETE removes rows from your sheet. You can target a single row by index or
delete every row that matches a column filter.
Deletes require edit access on the underlying Google Sheet, just like POST.
Delete a row by index
Append the zero-based row index to the URL. /2 deletes the third data row.
- cURL
- JavaScript
- Python
curl 'https://api.sheetbest.com/sheets/<api-id>/2' -X DELETE
fetch('https://api.sheetbest.com/sheets/<api-id>/2', { method: 'DELETE' });
import requests
requests.delete('https://api.sheetbest.com/sheets/<api-id>/2')
Filtered delete
Delete every row that matches a column filter using
/<Column>/<Value>. Wildcards (*) are supported.
- cURL
- JavaScript
- Python
# Delete every row whose Name contains "Jane"
curl 'https://api.sheetbest.com/sheets/<api-id>/Name/*Jane*' -X DELETE
fetch('https://api.sheetbest.com/sheets/<api-id>/Name/*Jane*', {
method: 'DELETE',
});
requests.delete('https://api.sheetbest.com/sheets/<api-id>/Name/*Jane*')
The filter syntax matches the read API. For exact match, prefix/suffix
wildcards, case-insensitive matching, and multi-column filters via /search,
see Filtering Data.
To delete from a tab other than the first, prepend /tabs/<TabName>:
curl 'https://api.sheetbest.com/sheets/<api-id>/tabs/Admin/Name/*Jane*' \
-X DELETE
See Working with Tabs.