For the complete documentation index, see llms.txt.

Overview

Last updated View as Markdown

Use the Data Export API to programmatically create export jobs and retrieve the exported files. You can't update an existing export job through the API: edit export jobs for your project in the Contentsquare console (Data Export tab).

  • Base URL of the API: https://api.contentsquare.com/
  • Current Version of the API: 1.0
  • Authentication: see Authentication — use the data-export scope.

This API allows for extracting raw data, as opposed to aggregated data. To retrieve the aggregated data of your Contentsquare analyses modules, use the Metrics API.

You can extract raw data at the pageview or session level.

By extracting raw data in downloadable files, clients can perform their own analyses for business intelligence or data science use cases, for example. And they can store this data in their own infrastructure, allowing to go beyond the contractual data retention period provided by Contentsquare.

To understand how the export API works, you should understand the basic objects that you will manipulate via the provided endpoints.

A job is the abstract definition of an extraction task. A job definition includes:

  • A name for the job
  • A file format ("CSV" or "JSONL")
  • A scope ("sessions" or "views")
  • A frequency ("daily", "hourly", or "once"): a daily job will run every day to extract the last day of data (the job is triggered every day at midnight UTC + 4 hours); a "once" job is triggered immediately after creation or is queued if another once job is running.
  • A date range: only required for a "once" job, and not to exceed 7 days; not required for daily jobs (extraction is automatically run for the last day everyday)
  • The fields to extract (example: session_id): extractable fields will depend on the scope
  • The filters (example: "deviceId")

A job run is a specific instance of a job. For example, if a daily job has been defined, a job run represents the execution of this job on a specific day.

Job runs will generate several files to be downloaded. A job run part corresponds to a specific file.