Getting Started
Send Requests
7min
send requests scale serp 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 https //docs trajectdata com/scaleserp/search api/searches/common 🔄 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 get /search performing a search is as simple as making a get http request to the scale serp search endpoint the only required parameters are api key ( sign up https //app scaleserp com/signup for free to get an api key) and q (your search query) for example, to search for the phrase pizza the scale serp search request would be http https //api scaleserp com/search?api key=demo\&q=pizza$ curl get https //api scaleserp com/search \\ d api key="demo" \\ d q="pizza"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza" } // make the http get request to scale serp axios get('https //api scaleserp com/search', { params }) then(response => { // print the json response from scale serp console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza' } \# make the http get request to scale serp api result = requests get('https //api scaleserp com/search', params) \# print the json response from scale serp print(json dumps(api result json()))# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'q' => 'pizza' ]); \# make the http get request to scale serp $ch = curl init(sprintf('%s?%s', 'https //api scaleserp 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 scale serp echo $api result; to view scale serp json results clearly in your browser we recommend these extensions for chrome and firefox localize results lets say we want to refine our query to search for pizza within london, uk here's how we could use the scale serp location parameter to achieve just that http https //api scaleserp com/search?api key=demo\&q=pizza\&location=london,england,united kingdom$ curl get https //api scaleserp com/search \\ d api key="demo" \\ d q="pizza" \\ d location="london,england,united kingdom"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", location "london,england,united kingdom" } // make the http get request to scale serp axios get('https //api scaleserp com/search', { params }) then(response => { // print the json response from scale serp console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza', 'location' 'london,england,united kingdom' } \# make the http get request to scale serp api result = requests get('https //api scaleserp com/search', params) \# print the json response from scale serp print(json dumps(api result json()))# 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 scale serp $ch = curl init(sprintf('%s?%s', 'https //api scaleserp 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 scale serp echo $api result; now lets try the same search but in paris, france when we update the location parameter note how scale serp 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) http https //api scaleserp com/search?api key=demo\&q=pizza\&location=paris,ile de france,france$ curl get https //api scaleserp com/search \\ d api key="demo" \\ d q="pizza" \\ d location="paris,ile de france,france"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", location "paris,ile de france,france" } // make the http get request to scale serp axios get('https //api scaleserp com/search', { params }) then(response => { // print the json response from scale serp console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza', 'location' 'paris,ile de france,france' } \# make the http get request to scale serp api result = requests get('https //api scaleserp com/search', params) \# print the json response from scale serp print(json dumps(api result json()))# 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 scale serp $ch = curl init(sprintf('%s?%s', 'https //api scaleserp 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 scale serp echo $api result; this quickstart that will get you up and running with postman and scale serp api paginate through results now lets take a look at how to paginate through results using the page and num parameters page determines the page number of the results (starting from 1) and num determines the number of results to show per page if we wanted to show the 2nd page of results, based on 10 results per page, our query would be http https //api scaleserp com/search?api key=demo\&q=pizza\&page=2\&num=10$ curl get https //api scaleserp com/search \\ d api key="demo" \\ d q="pizza" \\ d page="2" \\ d num="10"const axios = require('axios'); // set up the request parameters const params = { api key "demo", q "pizza", page "2", num "10" } // make the http get request to scale serp axios get('https //api scaleserp com/search', { params }) then(response => { // print the json response from scale serp console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'q' 'pizza', 'page' '2', 'num' '10' } \# make the http get request to scale serp api result = requests get('https //api scaleserp com/search', params) \# print the json response from scale serp print(json dumps(api result json()))# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'q' => 'pizza', 'page' => '2', 'num' => '10' ]); \# make the http get request to scale serp $ch = curl init(sprintf('%s?%s', 'https //api scaleserp 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 scale serp echo $api result;