Web Search
Search Suggestion
Get suggestions for a given query in real time.
GET
/
v1
/
web
/
search
/
suggest
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 250,
"total_tokens": 392
}
}
Query
The search value. The maximum query character length is 200.
Header
Your JigsawStack API key
Response
Indicates whether the call was successful.
A unique identifier for the request
Array of search suggestions.
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 250,
"total_tokens": 392
}
}
Was this page helpful?
Previous
Deep ResearchEffortlessly run deep research and get high-quality results powered with AI.
Next
⌘I
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 250,
"total_tokens": 392
}
}