Get KB search and Ask AI analytics
GET https://api.weav.com/v1/kb/search-analytics
Requires a token with the external-api:read or external-api:write ability.
Query parameters
daysintegerDefault: 30Window in days. Query-level lists cover at most the last 90 days.
Minimum: 1.
Maximum: 90.
Request
cURL
curl --request GET \
--url 'https://api.weav.com/v1/kb/search-analytics' \
--header "Authorization: Bearer ${WEAV_API_TOKEN}"
JavaScript
const response = await fetch("https://api.weav.com/v1/kb/search-analytics", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.WEAV_API_TOKEN}`
}
});
console.log(await response.json());
Python
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['WEAV_API_TOKEN']}"}
response = requests.get("https://api.weav.com/v1/kb/search-analytics", headers=headers)
print(response.json())
PHP
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://api.weav.com/v1/kb/search-analytics', [
'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
]);
echo $response->getBody();
Response
200 OK
{}
401Unauthorized422Unprocessable Content

