exports

Your raw data, streamed

Pull raw events or payments as CSV or NDJSON. The response streams, so large windows never blow up memory on either side. Needs the export scope.

GET/api/v1/sites/{id}/export
ParamTypeDescription
datasetstringevents (default) or payments.
formatstringcsv (default) or ndjson.
fromdateWindow start (YYYY-MM-DD). Defaults to 7 days ago.
todateWindow end. Defaults to now.
cursordate-timeResume after this timestamp when a previous export hit the 500k-row cap.
curl "https://datalenk.com/api/v1/sites/3/export?dataset=events&format=csv&from=2026-07-01&to=2026-07-08" \
  -H "Authorization: Bearer dlk_live_…" -o events.csv

Columns

Public columns only. We never export raw IP, session id or user id. Each row carries a visitorId, a short non-reversible hash that is stable per visitor so you can group without identifying anyone.

events.csv
timestamp,type,event_name,pathname,channel,country,region,city,device,browser,os,language,referrer,utm_source,utm_medium,utm_campaign,revenue,currency,props,visitorId
2026-07-08 05:38:26,event,purchase,/pricing,Organic Search,US,,,Desktop,Safari,macOS,en,,,,,49,USD,,a3f9c1d20e7b

Large exports

A single request returns up to 500,000 rows. If you hit that cap, note the last timestamp in the file and call again with ?cursor= set to it to fetch the next slice.