Get time series
GET https://datafa.st/api/v1/analytics/timeseries
Return time-bucketed analytics metrics for charts, reports, and custom dashboards. Choose which metrics to include and how to group them by hour, day, week, or month.
If you omit
startAt and endAt, DataFast applies a default window based on interval: last 24 hours for hour, last 30 days for day/week, and last 12 months for month.Requesting
revenue automatically includes payments in the response. Same-day date ranges upgrade the interval to hour automatically.Related: Filter your data
Request
Query parameters
fieldsrequired
name, visitors, sessions, revenue, payments, conversion_rate. Example: fields=visitors,sessions,revenue.intervalrequired
hour, day, week, month. Example: interval=day.websiteIddft_ account token on Website API routes. Omit with a df_ website key. Example: ?websiteId=665f0b3c4d2e1a0012345678.startAtYYYY-MM-DD for calendar days or an ISO timestamp. Must be provided together with endAt. Example: startAt=2026-05-01.endAtstartAt. Example: endAt=2026-05-21.timezone"America/New_York", "Europe/Paris", "UTC". Defaults to the website timezone when omitted.limit100, maximum 1000 on analytics endpoints and 250 on list visitors. Example: limit=50.offsetlimit for pagination. Default 0. Example: offset=50.filter_countryis, is_not. Accepts country names or codes. Example: filter_country=US,Canada or filter_country=is_not:France.filter_regionfilter_region=California.filter_cityfilter_city=San Francisco.filter_devicedesktop, mobile, or tablet. Example: filter_device=mobile.filter_browserSafari also includes Mobile Safari. Example: filter_browser=Chrome,Safari.filter_osfilter_os=iOS,Android.filter_referrerGoogle or Direct/None. Example: filter_referrer=Google.filter_pageis, is_not, contains, does_not_contain. Example: filter_page=contains:/docs.filter_entry_pagefilter_page. Example: filter_entry_page=/pricing.filter_hostnamefilter_hostname=app.example.com.filter_goalfilter_goal=signup.filter_utm_sourcefilter_utm_source=google.filter_utm_mediumfilter_utm_medium=cpc.filter_utm_campaignfilter_utm_campaign=launch.filter_utm_termfilter_utm_term=brand-keyword.filter_utm_contentfilter_utm_content=hero-cta.filter_refref URL parameter. Example: filter_ref=twitter.filter_sourcesource URL parameter. Example: filter_source=newsletter.filter_viavia URL parameter. Example: filter_via=partner.Example query
GET /api/v1/analytics/timeseries?fields=visitors,sessions,revenue&interval=day&startAt=2026-05-01&endAt=2026-05-21&filter_device=mobile
Example filters
Combine
filter_* query params with date ranges:GET /api/v1/analytics/timeseries?fields=visitors,revenue&interval=day&startAt=2026-05-01&endAt=2026-05-21&filter_device=mobile&filter_country=US
Response
Returns a JSON object with
status: "success" and endpoint-specific fields in data (and pagination when the endpoint is paginated).Response fields
fieldsrevenue also includes payments.intervalday returns one row per day and hour returns one row per hour.timezonecurrencyUSD or EUR.totalsdata[].timestampdata[].visitorsdata[].sessionsvisitors.data[].revenuedata[].paymentsdata[].conversion_ratepaginationAuthentication
df_website API key: The website is inferred from the key. You do not need awebsiteIdquery parameter.dft_account token: Requiresanalytics:readpermission and?websiteId=on every request. The token must be allowed to access that website.
Read authentication and scopes for token creation, permission lists, and scoped tokens.
Errors
400 — Missing or invalid
fields or interval, partial date range (only one of startAt/endAt), or invalid filter_* value.404 — Website not found.
See API errors for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.