Help Center Integrations Webservice Delete

Spotzi API



The delete data request can be used to delete data from one of the datasets available in your Spotzi Mapbuilder Account. You can delete a single record or the dataset as a whole. You can execute a delete data request by adding a DELETE request with the ‘q’ parameter.

DELETE FROM dataset_name
WHERE id = 12

The above statement is divided into:

  • a dataset list (the part that lists the datasets from which to delete the data)
  • an optional qualification (the part that specifies one or more restrictions)

Dataset list

The first part of the select query, the dataset list:

DELETE FROM dataset_name

states which dataset is used for the delete statement.

Please note that no fields are specified. This means that the whole record will be deleted. If you want to empty specific fields, please use an UPDATE statement.

Optional Qualification

The last part of the query is optional:

WHERE type = 'A'

It specifies which rows are deleted. All rows that meet the requirements of the WHERE statement are deleted.


Below you will find some example queries that can be used with the Spotzi Webservice. The dataset names and fields that are used in these examples must be available in the requested webservice account to show a valid result.

DELETE FROM neighbourhood

The above statement deletes all records of the table neighbourhood. After executing the query the table will still exist. It will however be empty.

DELETE FROM neighbourhood
WHERE type = 'urban'

The above statement deletes all records of the dataset neighbourhoods where the type = ‘urban’

For more information about SQL DELETE statements, please consult the SQL section in our help center or see the official PostgreSQL tutorial.

Related blog posts

Try Spotzi for free and start finding your best-fit customers