Batches
...
Batches API
Searches
Delete Search
4min
delete search searches can be deleted by making an http delete request to the /batches/batch id/search id endpoint (where search id is the id of the search to delete and batch id is the id of the batch the search belongs to) batch status searches can only be deleted from a batch when it is not running to check whether a batch is currently running use the get batch https //docs trajectdata com/serpwow/batches api/batches/get endpoint deleting multiple searches you should make calls to the delete search endpoint sequentially, rather than in parallel, as it is designed to remove searches one by one if you make too many concurrent calls you will receive an http 429 error for mass delete operations consider deleting and re creating the batch as this is typically quicker alternatively if your use case requires mass deletion of searches you may make an http delete request to the /batches/batch id/searches endpoint with the content type http header set to application/json and the body of the request being an array of search id strings the platform will then delete each of the ids specified example delete delete /batches/batch id/search id in the example below we delete a search with id=abcdefghijklmnop from batch with id=123456 $ curl x delete "https //api serpwow\ com/live/batches/123456/abcdefghijklmnop?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios delete('https //api serpwow\ com/live/batches/123456/abcdefghijklmnop', { params }) then(response => { console log('search deleted '); }) catch(error => { console log(error); });import requests api result = requests delete('https //api serpwow\ com/live/batches/123456/abcdefghijklmnop?api key=demo') print ("search deleted ")\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api serpwow\ com/live/batches/123456/abcdefghijklmnop', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); curl setopt($ch, curlopt customrequest, "delete"); $json = curl exec($ch); curl close($ch); echo "search deleted ", php eol; ?> serpwow responds with a json object confirming that the search has been deleted, or detailing the error if it has not been possible to delete the search ✅success json { "request info" { "success" true, "message" "search deleted" } } ❌no search { "request info" { "success" false, "message" "no search with id 'abcdefghijklmnop' was found in this batch, please check the id and try again" } } ❌no batch { "request info" { "success" false, "message" "batch with id '123456' was not found" } } next steps update search https //docs trajectdata com/serpwow/batches api/searches/update list search https //docs trajectdata com/serpwow/batches api/searches/list