This page documents an earlier version of the API client. For the latest version, see Delete records.
deleteObject
You can use two methods to delete records:
deleteObject
(this method), which usesobjectID
to identify recordsdeleteBy
, which usesfilters
to identify records.
objectID
that doesn’t exist, it still counts as an operation because Algolia doesn’t know if the record exists when attempting the operation.
Deleting all records in an index doesn’t delete the index.
To delete an index completely, including records, settings, synonyms, and rules, use the deleteIndex
method.
To delete a single record, use the deleteObject
method.
When deleting large numbers of records be aware of the rate limitations on these processes and the impact on your analytics data.
Examples
Delete multiple records
Delete a single record
Parameters
The objectID of the record to delete.
(Required for the
deleteObject
method).List of objectIDs to delete.
(Required for the
deleteObjects
method).A mapping of request options to send along with the query.
Response
List of the objectIDs of the deleted records.
Response as JSON
This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use thegetLogs
method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON