Create a query
curl --request POST \
--url https://api.webless.ai/api/v1/queries \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does Webless do?"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does Webless do?'})
};
fetch('https://api.webless.ai/api/v1/queries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/queries"
payload = { "query": "What does Webless do?" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"responses": [
{
"id": "<string>",
"link": "<string>",
"score": 123,
"image": "<string>",
"title": "<string>",
"description": "<string>",
"label": [
"<string>"
],
"gated": 123,
"highlight_list": [
"<string>"
]
}
],
"marketing_message": {
"message": "<string>",
"link": "<string>"
},
"highlights": [
{
"text": "<string>",
"url": "<string>"
}
],
"sales_cta": {
"text": "<string>",
"url": "<string>",
"open_type": "self"
}
}{
"detail": [
{}
]
}Search API
Create query
Returns content tiles, highlights, a marketing message, and a CTA for the given query. The v1 route resolves company configuration from the runtime package for the selected version pointer.
POST
/
api
/
v1
/
queries
Create a query
curl --request POST \
--url https://api.webless.ai/api/v1/queries \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does Webless do?"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does Webless do?'})
};
fetch('https://api.webless.ai/api/v1/queries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/queries"
payload = { "query": "What does Webless do?" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"responses": [
{
"id": "<string>",
"link": "<string>",
"score": 123,
"image": "<string>",
"title": "<string>",
"description": "<string>",
"label": [
"<string>"
],
"gated": 123,
"highlight_list": [
"<string>"
]
}
],
"marketing_message": {
"message": "<string>",
"link": "<string>"
},
"highlights": [
{
"text": "<string>",
"url": "<string>"
}
],
"sales_cta": {
"text": "<string>",
"url": "<string>",
"open_type": "self"
}
}{
"detail": [
{}
]
}Use the same
requestId and sessionId for queries, the WebSocket summary
stream, cta-selection, and suggestions for a single user action.Body
application/json
Was this page helpful?