AI Traffic History
const url = 'https://sitechecker.pro/api/v1/ai-visibility/ai-traffic/history?project_id=12345&date_from=2026-02-19&date_to=2026-05-19&scope=overview&dimension=none&metric=sessions&history_grouping=daily&include_comparison=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://sitechecker.pro/api/v1/ai-visibility/ai-traffic/history?project_id=12345&date_from=2026-02-19&date_to=2026-05-19&scope=overview&dimension=none&metric=sessions&history_grouping=daily&include_comparison=false' \ --header 'Authorization: Bearer <token>'Returns time-series points for one selected AI referral traffic metric over the selected date range. One metric per request, and the previous-period series is returned only when comparison is included.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
12345Project ID.
Example
2026-02-19Start of the monitoring period (inclusive), ISO date (UTC).
Example
2026-05-19End of the monitoring period (inclusive), ISO date (UTC).
Which AI Traffic dataset to chart: overview compares AI chats against the other channels, ai_sources breaks AI referrals down by source, pages charts landing pages.
How the series is split: none for a single total line, or one line per channel group, AI source or page.
Engagement_rate not available for scope=overview
The single metric to chart. One request returns one metric.
Bucket size for the returned points.
Adds previous_series[] (previous same-length period).
Also return the previous-period series. It doubles the payload, so it is off by default.
Overview only: ai_chats,organic_search,other_channels,total
For scope=overview, which lines to return: ai_chats, organic_search, other_channels, total.
Ai_sources+ai_source only: chatgpt,perplexity,…
For scope=ai_sources, comma-separated ai_source values to chart.
Pages scope only
Filter to one AI referral source.
Pages scope only (alpha-2)
Filter by country.
Pages scope only
Filter to one landing page URL.
Pages scope: top-N pages cap
Maximum number of lines to return when the series is split by a dimension.
Responses
Section titled “Responses”AI Traffic time-series
object
AI Traffic time-series for one requested metric. previous_series appears only when include_comparison=true (previous same-length period).
object
The dataset that was charted, echoed back from the request.
How the series was split, echoed back from the request.
The metric that was charted. One request returns one metric.
One entry per line in the chart.
One time-series line. series_type is dimension_value for a real dimension value, synthetic for the overview Total series, or aggregate for the all-AI-sources total.
object
Machine value the line is keyed on — the AI source, channel group or page.
Display label for the line.
Dimension_value for a real dimension value, synthetic for the overview Total line, aggregate for an undivided series.
The line itself, one point per bucket.
object
First day of the bucket.
Value of the requested metric in this bucket.
The same lines over the previous period, present only when comparison was requested.
One time-series line. series_type is dimension_value for a real dimension value, synthetic for the overview Total series, or aggregate for the all-AI-sources total.
object
Machine value the line is keyed on — the AI source, channel group or page.
Display label for the line.
Dimension_value for a real dimension value, synthetic for the overview Total line, aggregate for an undivided series.
The line itself, one point per bucket.
object
First day of the bucket.
Value of the requested metric in this bucket.
AI Traffic meta block for the history endpoint: the standard block plus the bucket size that was applied to the points.
object
Project the response was built for.
Start of the period the response covers.
End of the period the response covers.
The dataset that was queried, echoed back from the request.
Start of the previous period the *_change fields were computed against. Present only when comparison was included.
End of the previous period the *_change fields were computed against. Present only when comparison was included.
Whether GA4 is connected and usable for this project.
object
Latest GA4 data date available for this project, null when there is none.
object
Bucket size the points were grouped by.
Example
{ "data": { "scope": "overview", "dimension": "none", "metric": "sessions", "series": [ { "series_key": "chatgpt", "series_label": "chatgpt", "series_type": "dimension_value", "points": [ { "date": "2026-05-02", "value": 1240 } ] } ], "previous_series": [ { "series_key": "chatgpt", "series_label": "chatgpt", "series_type": "dimension_value", "points": [ { "date": "2026-05-02", "value": 1240 } ] } ] }, "meta": { "project_id": 12345, "date_from": "2026-05-01", "date_to": "2026-05-31", "scope": "overview", "resolved_compare_from": "2026-04-01", "resolved_compare_to": "2026-04-30", "source_status": { "ga4": "connected" }, "data_freshness": { "ga4_date": "2026-06-30" }, "history_grouping": "daily" }}Missing or invalid API key
Returned as INVALID_API_KEY when the key is missing or unknown, and as REVOKED_API_KEY when the key exists but was revoked — the latter needs a new key.
object
object
Example
{ "error": { "code": "INVALID_API_KEY", "message": "Invalid or missing API key." }}No active API entitlement for the account, or the project belongs to another account
Returned as MISSING_PUBLIC_API_ACCESS when the account has no active API entitlement, and as ACCESS_DENIED when the requested project belongs to another account.
object
object
Example
{ "error": { "code": "MISSING_PUBLIC_API_ACCESS", "message": "API access is not available: the account has no active API entitlement." }}Project not found
The exact missing resource is in error.code: PROJECT_NOT_FOUND, SEGMENT_NOT_FOUND, CRAWL_NOT_FOUND, KEYWORD_NOT_FOUND, OPPORTUNITY_NOT_FOUND, SNAPSHOT_UNAVAILABLE or NOT_FOUND.
object
object
Example
{ "error": { "code": "PROJECT_NOT_FOUND", "message": "Project not found." }}GA4 is not connected
object
object
Example
{ "error": { "code": "GA4_NOT_CONNECTED", "message": "Google Analytics 4 is not connected for this project." }}Validation error, unsupported scope / dimension / metric
Rejected query parameters. error.code is VALIDATION_ERROR for parameter validation (including a query parameter the endpoint does not accept), or INVALID_DATE_RANGE / INVALID_FILTER / INVALID_EVENT_TYPE / UNSUPPORTED_FILTER / UNSUPPORTED_DIMENSION / UNSUPPORTED_METRIC / UNSUPPORTED_SCOPE / SEGMENT_FILTER_UNSUPPORTED for module-specific rules.
object
object
Example
{ "error": { "code": "VALIDATION_ERROR", "message": "project_id is required." }}Rate limit exceeded — retry after the interval in the Retry-After header
object
object
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded. Try again later." }}Internal server error
object
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error." }}