SERPMaster processes search requests in real time, taking care of proxy management, captchas, retries, result localization and many other details in order to return 100% correct results in JSON
or HTML
format. Each search request can be tailored according to certain parameter values.
Performing a search is as simple as making a GET
HTTPS request to the SERPMaster queries
endpoint. In order to make a query, provide q
(search query) and your authentication information (either an access_token
or in your authentication header). With some integration options, you will also have to specify that you're sending application/json
content.
Here's how you can submit a search for the term lorem ipsum
:
https://rt.serpmaster.com/?q=SEARCH_TERM&access_token=ENTER_YOUR_TOKEN
curl -u username:password 'https://rt.serpmaster.com/' -d '{"q": "restaurants near me", "geo": "New York,New York,United States"}' -H "Content-Type: application/json"
{
import requests
from pprint import pprint
// Specify content type and form the request body
headers = {'Content-Type': 'application/json'}
job_params = {
'q': 'SEARCH TERM',
}
// Post job and get response
response = requests.post(
'https://rt.serpmaster.com/',
headers=headers,
json=job_params,
auth=('user', 'pass1')
)
// Print the response body
pprint(response.json())
}
<?php
$ch = curl_init();
#Form the request body
$data = [
"q" => "SEARCH TERM",
];
# Set request headers, authentication and other parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERPWD, "user" . ":" . "pass1");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_URL, "https://rt.serpmaster.com/");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
$response = curl_exec($ch);
curl_close($ch);
$json = json_decode($response);
var_dump($json);
?>
Note that requests that do not specify a value for the parameter "scraper" will default to our Google Search API.
Searches can be tailored according to many different parameters:
Parameter | Value |
---|---|
| Any. |
| Any available Google domain. |
|
|
| Any integer value between |
| Country-, state- or city-level location in Google’s canonical format, or coordinate set with latitude, longitude and radius. |
|
|
|
|
| Your access token. Only required for One-Liner (other methods use Basic Authentication method via username:password combination). |
This should be enough to get you started. To read about all available parameters and their values, check out our Parameter Values page!
We have created a full SERPMaster Walkthrough for those in need of a step-by-step guide!
Updated 26 days ago
What's Next
Integration |