/Docs
Register

Project API

Query analytics data for a specific project — stats, timeseries, pages, referrers, geo, and devices.

Replace {domain} in each endpoint with your project's domain, e.g. example.com. All endpoints require a Bearer token; see Authentication.
GET/v1/projects/{domain}/stats

Returns aggregate stats for a project over the given period: total pageviews, unique visitors, sessions, and average session duration in seconds.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/stats?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const stats = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/stats?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "pageviews": 130,  "visitors": 35,  "sessions": 48,  "avgDurationSeconds": 94}

Response fields

period

string

Resolved reporting period.

pageviews

number

Total pageview events in the period.

visitors

number

Unique visitors in the period.

sessions

number

Unique browser sessions in the period.

avgDurationSeconds

number | null

Average visit duration from leave events, in seconds.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/timeseries

Returns pageviews and unique visitors bucketed over time. Granularity is hourly for the 24h period and daily for all others.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/timeseries?period=7d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const timeseries = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/timeseries?period=7d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "7d",  "granularity": "day",  "data": [    { "date": "2026-05-19T00:00:00.000Z", "pageviews": 18, "visitors": 7 },    { "date": "2026-05-20T00:00:00.000Z", "pageviews": 22, "visitors": 9 },    { "date": "2026-05-21T00:00:00.000Z", "pageviews": 15, "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

granularity

"hour" | "day"

Time bucket size used for the response.

data[].date

string

ISO timestamp for the bucket start.

data[].pageviews

number

Pageviews in the bucket.

data[].visitors

number

Unique visitors in the bucket.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/pages

Returns the top pages for the project ranked by pageviews, along with unique visitor counts per page.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/pages?period=7d&limit=5", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const pages = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/pages?period=7d&limit=5" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "7d",  "data": [    { "path": "/", "pageviews": 80, "visitors": 25 },    { "path": "/contact/", "pageviews": 14, "visitors": 6 },    { "path": "/work-folio/", "pageviews": 8, "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

data[].path

string

Tracked page path.

data[].pageviews

number

Pageviews for the path.

data[].visitors

number

Unique visitors for the path.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/referrers

Returns traffic sources ranked by pageviews. Direct traffic (no referrer) is returned as (direct).

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/referrers?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const referrers = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/referrers?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "data": [    { "referrer": "(direct)", "pageviews": 62, "visitors": 20 },    { "referrer": "https://l.instagram.com/", "pageviews": 19, "visitors": 18 },    { "referrer": "https://www.google.com/", "pageviews": 7, "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

data[].referrer

string

Referrer URL or (direct).

data[].pageviews

number

Pageviews from the referrer.

data[].visitors

number

Unique visitors from the referrer.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/countries

Returns visitor breakdown by country, ranked by pageviews. Includes ISO country codes.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/countries?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const countries = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/countries?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "data": [    { "country": "Morocco", "country_code": "MA", "pageviews": 114, "visitors": 27 },    { "country": "United States", "country_code": "US", "pageviews": 8, "visitors": 3 },    { "country": "United Kingdom", "country_code": "GB", "pageviews": 4, "visitors": 2 }  ]}

Response fields

period

string

Resolved reporting period.

data[].country

string

Country name.

data[].country_code

string

ISO 3166-1 alpha-2 country code.

data[].pageviews

number

Pageviews from the country.

data[].visitors

number

Unique visitors from the country.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/cities

Returns visitor breakdown by city, ranked by unique visitors. Only cities with known geo data are returned.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/cities?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const cities = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/cities?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "data": [    { "city": "Casablanca", "country": "Morocco", "country_code": "MA", "visitors": 14, "pageviews": 38 },    { "city": "Rabat",      "country": "Morocco", "country_code": "MA", "visitors": 8,  "pageviews": 21 },    { "city": "New York",   "country": "United States", "country_code": "US", "visitors": 3, "pageviews": 5 }  ]}

Response fields

period

string

Resolved reporting period.

data[].city

string

City name.

data[].country

string

Country name.

data[].country_code

string

ISO 3166-1 alpha-2 country code.

data[].visitors

number

Unique visitors from the city.

data[].pageviews

number

Pageviews from the city.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/devices

Returns visitor breakdown by device type, browser, and operating system — all in a single response.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/devices?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const devices = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/devices?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "devices": [    { "name": "Mobile", "visitors": 28 },    { "name": "Desktop", "visitors": 7 }  ],  "browsers": [    { "name": "Chrome", "visitors": 18 },    { "name": "Safari", "visitors": 12 },    { "name": "Firefox", "visitors": 5 }  ],  "os": [    { "name": "Android", "visitors": 16 },    { "name": "iOS", "visitors": 11 },    { "name": "Windows", "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

devices[].name

string

Device type such as Mobile, Desktop, Tablet, or Unknown.

devices[].visitors

number

Unique visitors for that device type.

browsers[].name

string

Browser name.

browsers[].visitors

number

Unique visitors for that browser.

os[].name

string

Operating system name.

os[].visitors

number

Unique visitors for that operating system.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/browsers

Returns visitor breakdown by browser, ranked by unique visitors.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/browsers?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const browsers = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/browsers?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "data": [    { "name": "Chrome",  "visitors": 18 },    { "name": "Safari",  "visitors": 12 },    { "name": "Firefox", "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

data[].name

string

Browser name.

data[].visitors

number

Unique visitors for that browser.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.

GET/v1/projects/{domain}/os

Returns visitor breakdown by operating system, ranked by unique visitors.

Parameters

periodoptional

Time period. See Periods on Account API page. Defaults to 30d.

string

limitoptional

Max results to return. Maximum 100, default 10.

integer

JavaScript

index.ts
const res = await fetch("https://api.www.reignat.com/v1/projects/example.com/os?period=30d", {  headers: { Authorization: `Bearer ${REIGNAT_API_KEY}` },}) const operatingSystems = await res.json()

cURL

bash
curl "https://api.www.reignat.com/v1/projects/example.com/os?period=30d" \  -H "Authorization: Bearer reignat_your_key"

Response

json
{  "period": "30d",  "data": [    { "name": "Android", "visitors": 16 },    { "name": "iOS",     "visitors": 11 },    { "name": "Windows", "visitors": 5 }  ]}

Response fields

period

string

Resolved reporting period.

data[].name

string

Operating system name.

data[].visitors

number

Unique visitors for that operating system.

Errors

401
Invalid or missing API key

The Authorization header is missing or the Bearer token is invalid.

404
Project not found

No project with that domain exists for the authenticated user.