Search the web
Run one web search through the selected provider. Specify a provider to override the configured default.
POST
/api/websearchQuery parameters
locationobject | anyRequest body
requiredapplication/jsonquerystringrequiredproviderIDstringResponses
200Success
locationLocation.InforequiredShow propertiesHide properties
directorystringrequiredworkspaceIDobjectShow propertiesHide properties
objectprojectobjectrequiredShow propertiesHide properties
idstringrequireddirectorystringrequireddataWebSearch.ResponserequiredShow propertiesHide properties
providerIDstringrequiredresultsWebSearch.Result[]requiredShow propertiesHide properties
Array of
WebSearch.ResulturlstringrequiredtitlestringcontentstringtimeobjectrequiredShow propertiesHide properties
publishednumber400InvalidRequestError
Any of:
InvalidRequestError1
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
anyInvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequired503ServiceUnavailableError
_tagstringrequiredAllowed:
ServiceUnavailableErrormessagestringrequiredservicestring | anyShow propertiesHide properties
Any of:
string
stringany
anyRequest
curl -X POST "/api/websearch" \
-H "Content-Type: application/json" \
-d '{
"query": "string",
"providerID": "string"
}'const response = await fetch("/api/websearch", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"query": "string",
"providerID": "string"
})
});import requests
response = requests.post(
"/api/websearch",
headers={
"Content-Type": "application/json"
},
json={
"query": "string",
"providerID": "string"
},
)Response
{
"location": {
"directory": "string",
"workspaceID": {},
"project": {
"id": "string",
"directory": "string"
}
},
"data": {
"providerID": "string",
"results": [
{
"url": "string",
"title": "string",
"content": "string",
"time": {
"published": 0
}
}
]
}
}{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}{
"_tag": "ServiceUnavailableError",
"message": "string",
"service": "string"
}