API Documentation
Web Scrape
Web Search
Prompt Engine
File Store
Web Search
Search Suggestion
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 australia",
"what is the capital of canada",
"what is the capital of the united states",
"what is the capital of france",
"what is the capital of texas",
"what is the capital of new york",
"what is the capital of florida",
"what is the capital of italy",
"what is the capital of china",
"what is the capital of alaska",
"what is the capital of pennsylvania",
"what is the capital of georgia",
"what is the capital of montana",
"what is the capital of japan"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 135,
"inference_time_tokens": 332,
"total_tokens": 475
}
}
Query
The search value. The maximum query character length is 200.
Header
Your JigsawStack API key
Response
Indicates whether the call was successful.
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 australia",
"what is the capital of canada",
"what is the capital of the united states",
"what is the capital of france",
"what is the capital of texas",
"what is the capital of new york",
"what is the capital of florida",
"what is the capital of italy",
"what is the capital of china",
"what is the capital of alaska",
"what is the capital of pennsylvania",
"what is the capital of georgia",
"what is the capital of montana",
"what is the capital of japan"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 135,
"inference_time_tokens": 332,
"total_tokens": 475
}
}
Was this page helpful?
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 australia",
"what is the capital of canada",
"what is the capital of the united states",
"what is the capital of france",
"what is the capital of texas",
"what is the capital of new york",
"what is the capital of florida",
"what is the capital of italy",
"what is the capital of china",
"what is the capital of alaska",
"what is the capital of pennsylvania",
"what is the capital of georgia",
"what is the capital of montana",
"what is the capital of japan"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 135,
"inference_time_tokens": 332,
"total_tokens": 475
}
}