Links

Live (Using HTTP GET method)

Performing a realtime search is as simple as making a GET HTTP request to the SERPHouse live endpoint. The only required parameters are api_token (sign up for free to get an API token ) and q (your search query).
Requires authentication
get
https://api.serphouse.com/serp/live
Parameters
Path
responseType
responseType can be 'html' or 'json'
Query
q*
Search phrase that you want to search
domain*
Choose google ,bing or yahoo domain.
You can get the list of available search engines by making a separate request to the List of Search Engines
lang*
You can set language for e.g. en for english fr for french. Get the list of available languages by making a separate request to the List of Language
device*
Device can be desktop To extract desktop result tablet To extract tablet result mobile To extract mobile result
serp_type*
Serp type can be web get structured json result search engines web result
news Get news result from search engines image Search image over searchengines and get json result
loc*
Optional field if you specify loc_id when choose yahoo domain then field is optional You must choose one of the fields: loc_id or loc You can receive the list of available locations of search engines with their loc_id by making a separate request to the List of Locations
loc_id*
Optional field if you specify loc you must choose one of the fields: loc_id or loc You can receive the list of available locations of search engines with their loc_id by making a separate request to the List of Locations
verbatim
Set Google Verbatim search, Parameter value can be 0 or 1
gfilter
Parameter defines if the filters for 'Similar Results' and 'Omitted Results' are on or off. It can be set to 1 (default) to enable these filters, or 0 to disable these filters.
date_range
Sometimes you may want to only find information published during a specific time frame. To limit Google results by date
Parameter values can be comma seprated date range YYYY-MM-DD,YYYY-MM-DD OR
h Past hour
d Past 24 hours
w Past week
m Past month
y Past year
page
Give specific page to get the result of that page number. By default it will get you first page.
num_result
Define number of result you want to get per page. By default you will get top 100 results.
api_token*
Your API key
Optional if you specify a Authorization header in request
Header
Authorization*
Bearer <YOUR_API_TOKEN>
Responses
200: OK
Successful operation for web
200: OK
Successful operation for news
200: OK
Successful operation for image
200: OK
Successful operation for shop
401: Unauthorized
Unauthenticated

Example request:

BASH
RUBY
PYTHON
NODE.JS
PHP
JAVA
JAVASCRIPT
GO
C#/.NET
curl --location --request GET 'https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
require "uri"
require "net/http"
url = URI("https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <YOUR_API_TOKEN>"
response = https.request(request)
puts response.read_body
import requests
url = "https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10"
payload={}
headers = {
'Authorization': 'Bearer <YOUR_API_TOKEN>'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10',
headers: {
'Authorization': 'Bearer <YOUR_API_TOKEN>'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$client = new GuzzleHttp\Client();
$headers = [
'Authorization' => 'Bearer <YOUR_API_TOKEN>'
];
$request = new GuzzleHttp\Psr7\Request('GET', 'https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10")
.get()
.addHeader("Authorization", "Bearer <YOUR_API_TOKEN>")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_TOKEN>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United%20States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <YOUR_API_TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var client = new RestClient("https://api.serphouse.com/serp/live?q=apple&domain=google.com&lang=en&device=desktop&serp_type=web&loc=Alba,Texas,United States&loc_id=1026201&verbatim=0&gfilter=0&page=1&num_result=10");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <YOUR_API_TOKEN>");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);