curl --request GET \
--url https://api.athenahq.ai/api/v1/seo/analytics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/seo/analytics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/seo/analytics', 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://api.athenahq.ai/api/v1/seo/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.athenahq.ai/api/v1/seo/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.athenahq.ai/api/v1/seo/analytics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"period": {
"start_date": "<string>",
"end_date": "<string>",
"previous_start_date": "<string>",
"previous_end_date": "<string>"
},
"ga4": {
"connected": true,
"available": true,
"property_name": "<string>",
"ai_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ai_engagement_rate": 123,
"ai_key_events": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"organic_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"total_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ai_share_pct": 123,
"ai_daily": [
{
"date": "<string>",
"value": 123
}
],
"sources": [
{
"name": "<string>",
"sessions": 123,
"previous": 123
}
],
"ai_landing_pages": [
{
"url": "<string>",
"sessions": 123,
"previous": 123
}
],
"organic_landing_pages": [
{
"url": "<string>",
"sessions": 123,
"key_events": 123
}
]
},
"gsc": {
"connected": true,
"available": true,
"site_url": "<string>",
"clicks": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"impressions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ctr": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"position": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"daily": [
{
"date": "<string>",
"clicks": 123,
"impressions": 123
}
],
"queries": [
{
"clicks": 123,
"impressions": 123,
"ctr": 123,
"position": 123,
"previous_clicks": 123,
"query": "<string>"
}
],
"pages": [
{
"clicks": 123,
"impressions": 123,
"ctr": 123,
"position": 123,
"previous_clicks": 123,
"url": "<string>"
}
]
},
"cited_pages": {
"available": true,
"pages": [
{
"url": "<string>",
"citations": 123,
"prompts": 123,
"ai_sessions": 123,
"clicks": 123,
"impressions": 123,
"position": 123
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Get Site Health analytics
Live Google Analytics 4, Google Search Console and AI-citation figures for a website over the last 28 complete days, each beside the 28 days before (period gives both ranges; change_pct is null when the earlier period was zero). ga4: AI-referred sessions, their engagement rate and key events, organic and total sessions, AI share of sessions in percent, daily AI sessions, and the top 10 AI sources, AI landing pages and organic landing pages. gsc: clicks, impressions, CTR in percent and average position, a daily series, and the top 10 queries and pages. cited_pages: the website’s pages AI answers cited most, with the Google figures for the same page. connected false means no Google property is linked for that provider; available false means it is linked but the read failed. Read live from Google, so a connection made a moment ago shows at once. Requires Site Health on the website’s plan; otherwise the call fails with 403.
curl --request GET \
--url https://api.athenahq.ai/api/v1/seo/analytics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/seo/analytics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/seo/analytics', 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://api.athenahq.ai/api/v1/seo/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.athenahq.ai/api/v1/seo/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.athenahq.ai/api/v1/seo/analytics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"period": {
"start_date": "<string>",
"end_date": "<string>",
"previous_start_date": "<string>",
"previous_end_date": "<string>"
},
"ga4": {
"connected": true,
"available": true,
"property_name": "<string>",
"ai_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ai_engagement_rate": 123,
"ai_key_events": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"organic_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"total_sessions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ai_share_pct": 123,
"ai_daily": [
{
"date": "<string>",
"value": 123
}
],
"sources": [
{
"name": "<string>",
"sessions": 123,
"previous": 123
}
],
"ai_landing_pages": [
{
"url": "<string>",
"sessions": 123,
"previous": 123
}
],
"organic_landing_pages": [
{
"url": "<string>",
"sessions": 123,
"key_events": 123
}
]
},
"gsc": {
"connected": true,
"available": true,
"site_url": "<string>",
"clicks": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"impressions": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"ctr": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"position": {
"current": 123,
"previous": 123,
"change_pct": 123
},
"daily": [
{
"date": "<string>",
"clicks": 123,
"impressions": 123
}
],
"queries": [
{
"clicks": 123,
"impressions": 123,
"ctr": 123,
"position": 123,
"previous_clicks": 123,
"query": "<string>"
}
],
"pages": [
{
"clicks": 123,
"impressions": 123,
"ctr": 123,
"position": 123,
"previous_clicks": 123,
"url": "<string>"
}
]
},
"cited_pages": {
"available": true,
"pages": [
{
"url": "<string>",
"citations": 123,
"prompts": 123,
"ai_sessions": 123,
"clicks": 123,
"impressions": 123,
"position": 123
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Query Parameters
Was this page helpful?