Export Insights
Download a project's insights for a time window as CSV or JSON.
Downloads one report for the window: summary totals, top pages, popular and zero-result searches, and open documentation gaps. CSV opens straight in a spreadsheet; JSON carries the same data nested.
Session JWT and org membership required. Any role can export — an API key gets 401, a non-member 403. Any plan.
Path Parameters
projectIdQuery Parameters
days30formatcsv or json."csv"The summary response's exportUrl is this endpoint with days already set.
Example
-OJ saves the file under the name the server suggests.
Response — 200 OK
The body is the file itself, not a { data } envelope. Headers:
| Header | Value |
|---|---|
Content-Type | text/csv; charset=utf-8 or application/json; charset=utf-8 |
Content-Disposition | attachment; filename="<project-slug>-insights-<days>d-<YYYY-MM-DD>.csv" (.json for JSON) |
Cache-Control | no-store |
CSV
Three columns, section,label,value, so you can filter by section:
| Section | label | value |
|---|---|---|
meta | days, generated_at | The window and when the file was made |
summary | page_views, unique_visitors, avg_duration_seconds, searches, zero_result_searches, assistant_questions, assistant_avg_confidence (0–1), assistant_thumbs_up, assistant_thumbs_down | The total |
top_pages | Page path | Views |
popular_searches | Search text | Times searched |
zero_result_searches | Search text | Times searched with no results |
open_gaps | Gap topic | Times asked |
Each list section has at most 100 rows. Search text and gap topics are typed by your visitors, so any cell that starts with =, +, -, @, a tab or a carriage return is prefixed with ' — a spreadsheet shows it as text instead of running it as a formula. Cells containing commas, quotes, line breaks or ' are quoted.
JSON
openGaps lists the gaps open now, whatever the window; frequency counts since each gap was created.
Error Responses
400 Bad Request
days is not a whole number from 1 to 365, or format is not csv or json:
401 Unauthorized
Missing, invalid or expired session JWT, or an API key.
403 Forbidden
You are not a member of the organization that owns the project.
404 Not Found
The project does not exist or has been deleted.