Guide: export to a spreadsheet or data warehouse
Goal: get analysis or ranking data out as CSV/Excel for downstream use.
Two ways to get tabular data
| Method | Output | Best for |
|---|---|---|
.csv execute suffix | Raw CSV inline in the response | Automated pulls into a warehouse or script |
| Export endpoint | A named file (Excel or CSV) | People downloading and opening in a spreadsheet |
Inline CSV (programmatic)
Append .csv to any execute path — the request body is unchanged:
POST /v1/analyses/execute.csv
POST /v1/rankings/execute.csv
For analyses, the CSV has one row per date × metric × series. Columns:
date, analysis_id, region, sector_id, brand_id, custom_sector_uuid,
query_id, query_index, metric,
volume, score, positives, negatives, neutrals,
positives_neutrals, negatives_neutrals
Load this straight into a warehouse table; query_id/query_index let you
trace each row back to its query.
File download (Excel or CSV)
Use the export endpoint for a named file. The definition is nested inside
data (as analysis or ranking), alongside the export options — and the
body uses the standard meta/data envelope like every other request:
POST /v1/analyses/export
{
"meta": { "version": "v1" },
"data": { "analysis": { …analysis definition… }, "format": "excel", "force_daily": false }
}
POST /v1/rankings/export
{
"meta": { "version": "v1" },
"data": { "ranking": { …ranking definition… }, "format": "excel" }
}
The response carries a Content-Disposition filename — save the bytes under
that name. Set format to csv or excel (the default). For analyses only,
force_daily: true exports at daily granularity, clearing any resampling and
moving average in the definition.