Submit SEO recommendations
curl --request POST \
--url https://api.athenahq.ai/api/v1/seo/recommendations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "<string>",
"request_id": "<string>",
"source": {
"kind": "draft",
"title": "<string>",
"meta_description": "<string>",
"markdown": "<string>"
},
"target_queries": [
"<string>"
],
"locale": "<string>",
"local_context": "<string>"
}
'import requests
url = "https://api.athenahq.ai/api/v1/seo/recommendations"
payload = {
"website_id": "<string>",
"request_id": "<string>",
"source": {
"kind": "draft",
"title": "<string>",
"meta_description": "<string>",
"markdown": "<string>"
},
"target_queries": ["<string>"],
"locale": "<string>",
"local_context": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '<string>',
request_id: '<string>',
source: {
kind: 'draft',
title: '<string>',
meta_description: '<string>',
markdown: '<string>'
},
target_queries: ['<string>'],
locale: '<string>',
local_context: '<string>'
})
};
fetch('https://api.athenahq.ai/api/v1/seo/recommendations', 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/recommendations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'website_id' => '<string>',
'request_id' => '<string>',
'source' => [
'kind' => 'draft',
'title' => '<string>',
'meta_description' => '<string>',
'markdown' => '<string>'
],
'target_queries' => [
'<string>'
],
'locale' => '<string>',
'local_context' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/seo/recommendations"
payload := strings.NewReader("{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.athenahq.ai/api/v1/seo/recommendations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/recommendations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"contract_version": "seo-recommendations/v1",
"poll_after_seconds": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}SEO Recommendations
Submit SEO recommendations
Submit one draft or public HTTPS page for asynchronous SEO and AI-search recommendations. Partner activation and website content administration access are required. Reuse request_id with identical input for retries; changed input returns 409. A website may have 1,000 outstanding jobs, with up to four active analyses and 16 across all websites. The website submit ceiling is 120 requests/minute, subject to the organization-wide API budget (default 60 requests/minute shared by submissions, polling and other API calls). Honor Retry-After on 429. Pace submissions and reserve request budget for polling a bounded subset of jobs; do not poll an entire backlog every poll_after_seconds. Polling never starts another analysis.
POST
/
api
/
v1
/
seo
/
recommendations
Submit SEO recommendations
curl --request POST \
--url https://api.athenahq.ai/api/v1/seo/recommendations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "<string>",
"request_id": "<string>",
"source": {
"kind": "draft",
"title": "<string>",
"meta_description": "<string>",
"markdown": "<string>"
},
"target_queries": [
"<string>"
],
"locale": "<string>",
"local_context": "<string>"
}
'import requests
url = "https://api.athenahq.ai/api/v1/seo/recommendations"
payload = {
"website_id": "<string>",
"request_id": "<string>",
"source": {
"kind": "draft",
"title": "<string>",
"meta_description": "<string>",
"markdown": "<string>"
},
"target_queries": ["<string>"],
"locale": "<string>",
"local_context": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '<string>',
request_id: '<string>',
source: {
kind: 'draft',
title: '<string>',
meta_description: '<string>',
markdown: '<string>'
},
target_queries: ['<string>'],
locale: '<string>',
local_context: '<string>'
})
};
fetch('https://api.athenahq.ai/api/v1/seo/recommendations', 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/recommendations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'website_id' => '<string>',
'request_id' => '<string>',
'source' => [
'kind' => 'draft',
'title' => '<string>',
'meta_description' => '<string>',
'markdown' => '<string>'
],
'target_queries' => [
'<string>'
],
'locale' => '<string>',
'local_context' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/seo/recommendations"
payload := strings.NewReader("{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.athenahq.ai/api/v1/seo/recommendations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/recommendations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"kind\": \"draft\",\n \"title\": \"<string>\",\n \"meta_description\": \"<string>\",\n \"markdown\": \"<string>\"\n },\n \"target_queries\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\",\n \"local_context\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"contract_version": "seo-recommendations/v1",
"poll_after_seconds": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Was this page helpful?