Core APIs
...
Core Requests
Autocomplete
3 min
google autocomplete parameters get get /search?search type=autocomplete the google autocomplete parameters are applicable when making a request with search type=autocomplete to retrieve autocomplete results for a given search term the keyword searched can be specified in the q parameter and the optional location parameter can be used to geo locate the autocomplete request (locations can be retrieved via the https //docs trajectdata com/scaleserp/locations api/overview ) for example, to request autocomplete results for the keyword tree in the location united states , the request would be http https //api scaleserp com/search?api key=demo\&search type=autocomplete\&q=tree\&location=united+statescurl l get https //api scaleserp com/search \\ d api key="demo" \\ d search type="autocomplete" \\ d q="tree" \\ d location="united+states"const axios = require('axios'); // set up the request parameters const params = { api key "demo", search type "autocomplete", q "tree", location "united+states" } // make the http get request axios get('https //api scaleserp com"/search', { params }) then(response => { // print the json response 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', 'search type' 'autocomplete', 'q' 'tree', 'location' 'united+states' } \# make the http get request api result = requests get('https //api scaleserp com/search', params) \# print the json response print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'search type' => 'autocomplete', 'q' => 'tree', 'location' => 'united+states' ]); \# make the http get request $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 echo $api result; ?> google autocomplete parameters the following parameters are available for all requests made when search type=autocomplete true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type next steps https //docs trajectdata com/scaleserp/search api/results/google/autocomplete