Send Requests
Send Requests
SerpWow executes search requests in real time returning clean, structured JSON HTML or CSV results. You can achieve fine-grained control over your search query using the search parameters.
🔄 This API endpoint uses a synchronous request model. The response will be delivered immediately upon completion of the request.
If you prefer to collect responses later, you have two options:
- Batch Processing: Send requests in batches and use a webhook to retrieve batch results as they become available.
- Download from UI: Access completed results directly from the UI for later processing.
Making a Request
GET /search
Performing a search is as simple as making a GET HTTP request to the SerpWow search endpoint. The only required parameters are api_key (sign up for free to get an API key) and q (your search query).
For example, to search for the phrase pizza the SerpWow search request would be:
https://api.serpwow.com/search?api_key=demo&q=pizzaLocalize Results
Lets say we want to refine our query to search for pizza within London, UK . Here's how we could use the SerpWow location parameter to achieve just that:
# set up the request parameters
$queryString = http_build_query([
'api_key' => 'demo',
'q' => 'pizza',
'location' => 'London,England,United Kingdom'
]);
# make the http GET request to SerpWow
$ch = curl_init(sprintf('%s?%s', 'https://api.serpwow.com/search', $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);
$api_result = curl_exec($ch);
curl_close($ch);
# print the JSON response from SerpWow
echo $api_result;Now lets try the same search but in Paris, France . When we update the location parameter note how SerpWow automatically changes the google_domain parameter to google.fr and the gl (country) and hl (language) parameters to hl=fr (so you see localized results exactly as a human user in Paris would):
# set up the request parameters
$queryString = http_build_query([
'api_key' => 'demo',
'q' => 'pizza',
'location' => 'Paris,Ile-de-France,France'
]);
# make the http GET request to SerpWow
$ch = curl_init(sprintf('%s?%s', 'https://api.serpwow.com/search', $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);
$api_result = curl_exec($ch);
curl_close($ch);
# print the JSON response from SerpWow
echo $api_result;
This quickstart that will get you up and running with Postman and SerpWow API
Paginate through Results
Now lets take a look at how to paginate through results using the page parameters. page determines the page number of the results (starting from 1). If we wanted to show the 2nd page of results, our query would be:
https://api.serpwow.com/search?api_key=demo&q=pizza&page=2