API Reference
Autocomplete Search
Search autocomplete to retrieve query suggestions in real-time.
The autocomplete search endpoint delivers real-time search query auto-completions and search trail predictions.
It returns a ranked string array of popular, contextually relevant search phrases matching the input prefix as users type.
Returned Autocomplete Suggestions
The response contains a suggestions array of string predictions ranked by search frequency:
{
"q": "how to scrape",
"num": 5
}
{
"searchParameters": {
"q": "how to scrape",
"num": 3,
"type": "autocomplete"
},
"suggestions": [
"how to scrape a website",
"how to scrape javascript web pages",
"how to scrape search results"
]
}
Authorizations
X-API-KEYstringheaderrequired
Passed via request headers. Your secret API key for SerperMatrix (e.g.
sm_live_...).Body
application/json
qstringrequired
Query snippet or keyword starting term (e.g.
"how to scrape").glstring
Country code targeting search trend context.
hlstring
Host language code targeting localized predictions.
numintegerdefault: 10
Number of predictions to retrieve.
use_cachebooleandefault: true
Retrieve cached response if available.
Request
curl -X POST https://serpermatrix.com/api/v1/autocomplete \
-H "X-API-KEY: sm_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"q":"how to scrape","num":5}'{
"searchParameters": {
"q": "how to scrape",
"num": 3,
"type": "autocomplete"
},
"suggestions": [
"how to scrape a website",
"how to scrape javascript web pages",
"how to scrape search results"
]
}