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>"
}Obtener analíticas de Estado del sitio
Cifras en vivo de Google Analytics 4, Google Search Console y citas de IA de un sitio web en los últimos 28 días completos, cada una junto a los 28 días anteriores (period indica ambos rangos; change_pct es null cuando el periodo anterior fue cero). ga4: sesiones procedentes de IA, su tasa de interacción y eventos clave, sesiones orgánicas y totales, cuota de sesiones de IA en porcentaje, sesiones de IA diarias y las 10 principales fuentes de IA, páginas de destino de IA y páginas de destino orgánicas. gsc: clics, impresiones, CTR en porcentaje y posición media, una serie diaria y las 10 principales consultas y páginas. cited_pages: las páginas del sitio web que más citan las respuestas de IA, con las cifras de Google de la misma página. connected en false significa que no hay ninguna propiedad de Google vinculada para ese proveedor; available en false significa que está vinculada pero la lectura falló. Se lee en vivo desde Google, así que una conexión hecha hace un momento aparece de inmediato. Requiere Estado del sitio en el plan del sitio web; de lo contrario, la llamada falla con 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>"
}Parámetros de consulta
¿Esta página le ayudó?