The SERP Master Developer Hub

Welcome to the SERP Master developer hub. You'll find comprehensive guides and documentation to help you start working with SERP Master as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    API Reference

Callback method is intended for intensive and consistent scraping (e.g. 5+ SERPs per second) or for those looking to maximize efficiency.

  • Send a POST with a payload to the SERPMaster’s system.
  • Receive a job ID in the response. Connection can then be closed
POST https://api.serpmaster.com/cb
curl -X POST -u username:password 'https://api.serpmaster.com/cb' -d '{"q": "lorem ipsum"}' -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': 'lorem ipsum',
}
// Post job and get response
response = requests.post(
    'https://api.serpmaster.com/cb',
    headers=headers,
    json=job_params,
    auth=('username', 'password')
)
// Print the response body
pprint(response.json())
}
<?php
$ch = curl_init();
#Form the request body
$data = [
    "q" => "lorem ipsum",
];
# Set request headers, authentication and other parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_USERPWD, "username" . ":" . "password");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_URL, "https://api.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);
?>
  • Once the job is finished we will send a notification to your callback endpoint.
  • Data can then be downloaded by making a GET request to the results API endpoint:
https://api.serpmaster.com/{id}/results
curl --u username:password 'https://api.serpmaster.com/cb/{ID}/results'
{
import requests
from pprint import pprint

// Get the result
response = requests.get(
    'https://api.serpmaster.com/cb/{JOB}/results',
    auth=('username', 'password')
  
// Print the response body
pprint(response.json())
}
<?php
$ch = curl_init();

# Set request headers, authentication and other parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "username" . ":" . "password");
curl_setopt($ch, CURLOPT_URL, "https://api.serpmaster.com/cb/{ID}/results");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
$json = json_decode($response);
var_dump($json);
?>

If you are familiar with Webhook, integrating through Callback will be easy. If not, you can just try downloading your results in about 10 seconds after request submission and retry every few seconds if you get a 204 (No Content) response.

Updated 2 months ago


What's Next

Parameter values

Callback


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.