curl --request GET \
--url https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups \
--header 'Authorization: Bearer <token>'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"source": "gsc",
"aggregates": {
"avgPosition": 123,
"clicks": 123,
"ctr": 123,
"impressions": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 30,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
},
"items": [
{
"source": "analytics",
"id": "<string>",
"day_bucket": "2023-12-25",
"domain_canonical": "<string>",
"landing_page_path": "<string>",
"source_class": "<string>",
"llm_platform": "<string>",
"sessions": 123,
"engaged_sessions": 123,
"synced_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "<string>",
"limit": 123,
"offset": 123,
"nextOffset": 123,
"generation": "<string>"
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}Get Search Console and analytics totals
Returns fixed-window totals for Google Search Console (gsc), legacy GA4 (ga4) or the selected analytics provider (analytics). Read the returned source window dates instead of assuming the requested window: Search Console days are Pacific-time days ending three days before today, and coverage is limited to the days available at the last successful sync. Totals are current only when every contributing connection that is not paused or disconnected covers the whole window; coverage is reported per contributor. When current totals are unavailable, the most recent totals DevTune has are returned with their own dates, availability partial, isCurrent false, status unmeasured and asOfDate; they are not current evidence or a verified comparison. A project with no earlier totals returns unavailable coverage and null totals. measurement.availability and explanation distinguish unavailable verification, partial evidence, a verified zero and fully measured totals; a null total is unmeasured. The analytics source also returns paginated daily session rows: limit (default 25, maximum 100) and cursor apply only to those rows. Pass pagination.nextCursor as cursor while pagination.hasMore. An import, a provider change or UTC midnight ends a continuation; start again without cursor. storedData dates show when DevTune holds data, not that every day between them is covered. Requires the traffic.read scope.
curl --request GET \
--url https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups \
--header 'Authorization: Bearer <token>'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/traffic/search-rollups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"source": "gsc",
"aggregates": {
"avgPosition": 123,
"clicks": 123,
"ctr": 123,
"impressions": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 30,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
},
"items": [
{
"source": "analytics",
"id": "<string>",
"day_bucket": "2023-12-25",
"domain_canonical": "<string>",
"landing_page_path": "<string>",
"source_class": "<string>",
"llm_platform": "<string>",
"sessions": 123,
"engaged_sessions": 123,
"synced_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "<string>",
"limit": 123,
"offset": 123,
"nextOffset": 123,
"generation": "<string>"
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}