curl --request POST \
--url https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"previews": true,
"query": {
"dataset": "searches",
"from": "2026-08-10T12:00:00Z",
"to": "2026-08-10T12:00:00Z",
"search": "<string>",
"filters": [
{
"field": "<string>",
"operator": "eq",
"value": null
}
],
"groupBy": "<string>",
"order": "newest",
"page": 1
}
}'
import requests
url = "https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
payload = {
"previews": True,
"query": {
"dataset": "searches",
"from": "2026-08-10T12:00:00Z",
"to": "2026-08-10T12:00:00Z",
"search": "<string>",
"filters": [
{
"field": "<string>",
"operator": "eq",
"value": None
}
],
"groupBy": "<string>",
"order": "newest",
"page": 1
}
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.text)
const response = await fetch('https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore', {
method: 'POST',
headers: {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"previews": true,
"query": {
"dataset": "searches",
"from": "2026-08-10T12:00:00Z",
"to": "2026-08-10T12:00:00Z",
"search": "<string>",
"filters": [
{
"field": "<string>",
"operator": "eq",
"value": null
}
],
"groupBy": "<string>",
"order": "newest",
"page": 1
}
})
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"previews": true,
"query": {
"dataset": "searches",
"from": "2026-08-10T12:00:00Z",
"to": "2026-08-10T12:00:00Z",
"search": "<string>",
"filters": [
{
"field": "<string>",
"operator": "eq",
"value": null
}
],
"groupBy": "<string>",
"order": "newest",
"page": 1
}
}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore"
payload := strings.NewReader("{\n \"previews\": true,\n \"query\": {\n \"dataset\": \"searches\",\n \"from\": \"2026-08-10T12:00:00Z\",\n \"to\": \"2026-08-10T12:00:00Z\",\n \"search\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"eq\",\n \"value\": null\n }\n ],\n \"groupBy\": \"<string>\",\n \"order\": \"newest\",\n \"page\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"previews\": true,\n \"query\": {\n \"dataset\": \"searches\",\n \"from\": \"2026-08-10T12:00:00Z\",\n \"to\": \"2026-08-10T12:00:00Z\",\n \"search\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"operator\": \"eq\",\n \"value\": null\n }\n ],\n \"groupBy\": \"<string>\",\n \"order\": \"newest\",\n \"page\": 1\n }\n}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'uri'
require 'net/http'
url = URI('https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Post.new(url)
request['Authorization'] = 'Bearer <token>'
request['Content-Type'] = 'application/json'
request.body = '{
"previews": true,
"query": {
"dataset": "searches",
"from": "2026-08-10T12:00:00Z",
"to": "2026-08-10T12:00:00Z",
"search": "<string>",
"filters": [
{
"field": "<string>",
"operator": "eq",
"value": null
}
],
"groupBy": "<string>",
"order": "newest",
"page": 1
}
}'
response = http.request(request)
puts response.read_body