Batches
...
Batches API
Batches

Start Batch

3min
start batch batches can be started by making an http get request to the /batches/batch id/start endpoint (where batch id is the id of the batch) you must have sufficient search credits available on your account for the number of searches in the batch you would typically start batches that are set to schedule type=manual but you can start a batch with any schedule type , just as long as it isn't currently running example get get /batches/batch id/start in the example below we start a batch with id=123456 http https //api valueserp com/batches/123456/start?api key=demo$ curl "https //api valueserp com/batches/123456/start?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios get('https //api valueserp com/batches/123456/start', { params }) then(response => { const apiresponse = response data; console log('batch started '); }) catch(error => { console log(error); });import requests params = { 'api key' 'demo' } api result = requests get('https //api valueserp com/batches/123456/start', params) api response = api result json() print "batch started "\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api valueserp com/batches/123456/start', $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); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); echo "batch started ", php eol; ?> value serp responds with a json object confirming that the batch has been started, or detailing the error if it has not been possible to start the batch (i e there are insufficient search credits available on your account) next steps get batches https //docs trajectdata com/valueserp/batches api/batches/get list batches https //docs trajectdata com/valueserp/batches api/batches/list