Yahoo SERP API
SERP API provides the Top-100 SERP results for a search term.
The results are specific to the selected search engine
Assumes that you are familiar with SERP Types. On all the search engines we provides Web, Image and News results. You have to take care of `serp_type` param.
Google SERP api you can get below result snippets in JSON response
Recently, We have introduced Image & News API, Where you can perform
search and get result in json resonse
1. TOP STORIES
If there are any trending news stories relevant to your search query, Google will return those in a section called “Top Stories”. This section is returned by the API as a top_stories array.


2. INLINE IMAGE
When doing a standard web search and images are provided by Google within the search results, these images are returned by the API within an inline_image array.
3. INLINE VIDEOS
When doing a standard web search and videos are provided by Google within the search results, these videos are returned by the API within an inline_videos array.


4. PEOPLE ALSO ASK
For many search queries, Google provides an additional set of frequently asked questions related to the search term. These related questions are returned by the API as a people_also_ask array.
5. KNOWLEDGE CARD
A Knowledge Graph is returned by Google whenever there is enough information about the search query from Google directly or from informational sources, such as Wikipedia. Knowledge Graphs will be returned in a knowledge_card object by the API.


6. ADS
If Google returns any sponsored ads for your search query, the API response will come with an ads object, which contains all ads in the order they are shown in the search result. Ads can be shown either at the top or at the bottom of the search result.
7. ORGANIC
Organic search results are the main search results provided by Google and are determined by a series of factors, such as web traffic, back-links, social media presence, and much more. These results are parsed by the API in detail and returned as organic.


8. RELATED SEARCHES
At the bottom of each search result, Google usually suggests other search queries related to the current query. These suggestions are returned by the API as a related_searches array.
9. NEWS RESULTS
To retrive a result from Google News, You will need to change your API request param serp_type to news in order to perform a search on news section.


10. IMAGE RESULTS
To retrive a result from Google Image, You will need to change your API request param serp_type to image in order to perform a search on image section.
Easy Integration
Select your favoured integration method and copy
the provided code.
Curl
Ruby
Python
Node.js
PHP
Java
GO
Curl
curl -X POST \
https://api.serphouse.com/serp/live \
-H 'accept: application/json' \
-H 'authorization: Bearer API_TOKEN' \
-H 'content-type: application/json' \
-d '{
"data": {
"domain":"google.com",
"lang":"en",
"q": "Coffee",
"loc":"Texas,United States",
"device": "desktop",
"serp_type": "web"
}
}'
Ruby
require 'uri'
require 'net/http'
url = URI("https://api.serphouse.com/serp/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer API_TOKEN'
request.body = '{"data": {
"domain": "google.com",
"lang": "en",
"q": "Coffee",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "web"
}}'
response = http.request(request)
puts response.read_body
Python
import requests
url = "https://api.serphouse.com/serp/live"
payload = '{"data": {
"domain": "google.com",
"lang": "en",
"q": "Coffee",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "web"
}}'
headers = {
'accept': "application/json",
'content-type': "application/json",
'authorization': "Bearer API_TOKEN"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Node.js
var http = require("https");
var options = {
"method": "POST",
"hostname": "https://api.serphouse.com",
"port": null,
"path": "/serp/live",
"headers": {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Bearer API_TOKEN"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
data: {
domain: 'google.com',
lang: 'en',
q: 'Coffee',
loc: 'Texas,United States',
device: 'desktop',
serp_type: 'web'
}
}));
req.end();
PHP
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.serphouse.com/serp/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"data": {
"domain":"google.com",
"lang": "en",
"q": "Coffee",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "web"
}}',
CURLOPT_HTTPHEADER => array(
"accept: application/json",
"authorization: Bearer API_TOKEN",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
}
else {
echo $response;
}
Java
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"data": {
"domain": "google.com",
"lang": "en",
"q": "Coffee",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "web"}}
');
Request request = new Request.Builder()
.url("https://api.serphouse.com/serp/live")
.post(body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer API_TOKEN")
.build();
Response response = client.newCall(request).execute();
GO
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.serphouse.com/serp/live"
payload := strings.NewReader('{"data": {
"domain":"google.com",
"lang": "en",
"q": "Coffee",
"loc": "Texas,United States",
"device": "desktop",
"serp_type": "web"}}
')
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept", "application/json")
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "Bearer API_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}

Get in touch with us!
You may contact us from here for any concern.