---
title: "Explore analytics records"
method: POST
path: "/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore"
tags: ["Docs7 Analytics"]
---

# Explore analytics records

`POST /v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/analytics/explore`
- Auth: HTTP bearer

Query the raw records of one dataset (`searches`, `questions`, `ai-requests`, `page-views`) in a time range, with filters and an optional group, 20 rows per page. Send `Accept: text/csv` to download up to 10,000 rows as CSV. The range must be inside the plan's history (7 days on Free, 90 on Pro). Any member.

## Path parameters

- `teamspaceId` string, uuid, required
- `siteId` string, uuid, required

## Request body

- Docs7ExploreRequest
  - `previews` boolean, required: Include branch preview traffic.
  - `query` object, required: `from` to `to` is at most 90 days.
    - `dataset` 'searches' | 'questions' | 'ai-requests' | 'page-views', required
    - `from` string, date-time, required
    - `to` string, date-time, required
    - `search` string, required: Free text; empty for none.
    - `filters` object[], required
      - `field` string, required: A field of the dataset, for example `path`, `country`, `company`, `verified`, `found`, `turn`.
      - `operator` 'eq' | 'neq' | 'contains' | 'notContains' | 'startsWith' | 'gt' | 'gte' | 'lt' | 'lte', required: Text fields: eq, neq, contains, notContains, startsWith. Number fields: eq, neq, gt, gte, lt, lte. Boolean fields: eq.
      - `value` unknown, required
    - `groupBy` string, nullable, required: A group field of the dataset.
    - `order` 'newest' | 'oldest', required
    - `page` integer, required

## Response `200`

Records, or CSV with `Accept: text/csv`

- Docs7ExploreResponse
  - `rows` object[], required
  - `totalRows` integer, required
  - `totalEvents` integer, required
  - `series` object[], required
    - `date` string
    - `group` string, nullable
    - `count` integer
  - `from` string, date-time, required
  - `to` string, date-time, required

## Other responses

- `400`: Invalid query, a range outside the history, or a CSV over 10,000 rows (`export_too_large`)
- `401`: Missing or invalid bearer
- `403`: Not a member, missing role, or an API key of another teamspace
- `404`: No such site in this teamspace
- `500`: Internal error
- `503`: Analytics is not configured or the query failed

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/sites/:siteId/analytics/explore/post.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
