Batches
...
Batches API
Searches
Find Searches
6min
find searches you can find (or search) the searches in a batch by making making a http get request to the /batches/batch id/searches/page?q=xyz endpoint (where batch id is the id of the batch to get searches for, page is the page of matching searches to get and the q querystring parameter is the search term to search for) this endpoint is particuarly useful if you are allowing your users to modify the searches within batches on your ui as you can allow them to search through all of the searches in the batch to find the one they'd like to modify concurrency when finding searches you should make calls to the find search endpoint sequentially, rather than in parallel if you make too many concurrent calls you will receive an http 429 error example get get /batches/batch id/searches/page?q=xyz in the example below we return page 1 of the searches from the batch with id=123456 that match the search term test (note the search term is specified using the "q" querystring parameter) searching by custom ids serpwow will look for the q parameter in the search and in the custom id (if any) you assigned to the search this way it's easy to find searches using the custom id from your app http https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&q=test$ curl "https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&q=test"const axios = require('axios'); axios get('https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&q=test') then(response => { const apiresponse = response data; }) catch(error => { console log(error); });import requests api result = requests get('https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&q=test'') api response = api result json()\<?php $ch = curl init('https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&q=test'); 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); ?> serpwow responds with the following json showing all the searches on page 1 of the batch { "request info" { "success" true }, "batch id" "123456", "searches page current" 1, "searches page count" 1, "searches total count" 1, "search term" "test", "searches" \[ { "q" "mcdonalds", "location" "united states", "search type" "images", "custom id" "mycustomid 001", "id" "abcdefghijklmnop" } ] } finding by custom id get get /batches/batch id/searches/page?custom id=xyz in the example below we return page 1 of the searches from batch with custom id=123456 this is useful for keeping track of searches and referencing them by the id you passed into the custom id field http https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&custom id=mycustomid 001$ curl "https //api serpwow\ com/live/batches/123456/searches/1?api key=demo\&custom id=mycustomid 001" serpwow responds with the following json showing all the searches matching the passed custom id { "request info" { "success" true }, "batch id" "123456", "searches page current" 1, "searches page count" 1, "searches total count" 1, "search term" "test", "searches" \[ { "q" "mcdonalds", "location" "united states", "search type" "images", "custom id" "mycustomid 001", "id" "abcdefghijklmnop" } ] }