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": 200,
        "total_tokens": 342
  }
}

Query

query
string
required
The search value. The maximum query character length is 200.
x-api-key
string
required
Your JigsawStack API key

Response

success
boolean
Indicates whether the call was successful.
_usage
object
Usage information for the API call.
suggestions
array<string>
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": 200,
        "total_tokens": 342
  }
}