Справочник: SEO
Ручки сайта: $API/site/$SITE/seo и $API/site/$SITE/seo/pages. SEO отдельной страницы задаётся frontmatter публикации. Подробно — SEO.
GET /seo
curl -s -H "Authorization: Bearer $OP_TOKEN" "$API/site/$SITE/seo"
{
"success": true,
"site_id": "x9HTLHECq",
"seo": {
"separator": "sc-dash",
"separator_char": "-",
"titles": { "404": "Page not found %%sep%% %%sitename%%", "home": "%%sitename%% %%page%% %%sep%% %%sitedesc%%", "page": "%%title%% %%page%% %%sep%% %%sitename%%", "post": "%%title%% %%page%% %%sep%% %%sitename%%", "author": "%%name%%, Author at %%sitename%% %%page%%", "archive": "%%date%% %%page%% %%sep%% %%sitename%%", "search": "You searched for %%searchphrase%% %%page%% %%sep%% %%sitename%%" },
"metadesc": { "home": "", "page": "", "post": "", "author": "", "archive": "" },
"noindex": { "archive": true, "author": false, "author_noposts": true, "post_types": { "post": false, "page": false, "tech": false }, "taxonomies": { "category": false, "post_tag": false, "post_format": true } },
"attachments": { "redirect_to_parent": true },
"breadcrumbs": { "enabled": true, "separator": "»", "home": "Home", "prefix": "", "bold_last": false },
"organization": { "type": "company", "name": "", "alternate_name": "", "logo_id": 0, "logo_url": "", "logo_cached": false, "person_user_id": false, "person_name": "", "person_logo_id": 0 },
"social": { "open_graph": true, "twitter": true, "twitter_card": "summary_large_image", "default_image_id": 0, "default_image": "", "profiles": { "facebook": "", "twitter": "", "instagram": "", "linkedin": "", "youtube": "", "wikipedia": "", "mastodon": "", "pinterest": "", "other": [] } },
"sitemap": { "enabled": true, "entries_per_page": 1000, "author": false, "post_types": { "post": true, "page": true, "tech": true }, "taxonomies": { "category": true, "post_tag": true, "post_format": false }, "…": "…" },
"index_now": { "enabled": false, "key": "", "supported": false },
"robots_url": "https://test.onpress.pro/robots.txt",
"yoast_version": "20.7"
}
}
PATCH /seo
Разделы (шлите только меняемые):
| Раздел | Ключи |
|---|---|
separator | ключ разделителя: sc-dash, sc-pipe, sc-middot… |
titles | home, page, post, 404, author, archive, search |
metadesc | home, page, post, author, archive |
noindex | archive, author, author_noposts, post_types {тип: bool}, taxonomies {таксономия: bool} |
attachments | redirect_to_parent |
breadcrumbs | enabled, bold_last, separator, home, prefix |
organization | type (company, person), name, alternate_name, person_name, person_user_id, logo (id), person_logo (id) |
social | open_graph, twitter, twitter_card (summary, summary_large_image), default_image (id), profiles (8 сетей и other — массив) |
sitemap | enabled, author, entries_per_page (1–10000) |
index_now | enabled, key (8–128 hex, "", "auto") |
curl -s -X PATCH "$API/site/$SITE/seo" \
-H "Authorization: Bearer $OP_TOKEN" -H 'Content-Type: application/json' -d '{"breadcrumbs": {"prefix": "Вы здесь:"}}'
{
"success": true,
"site_id": "x9HTLHECq",
"changed": ["breadcrumbs.prefix"],
"seo": { "…": "…" },
"cache": { "yoast_sitemap": true, "object": true, "supercache": { "status": "empty", "dirs": ["…/supercache/test.onpress.pro"] } }
}
Значение, не принятое валидатором Yoast, приходит в changed с пометкой (отклонено валидатором Yoast). Отказы: 400 nothing_to_change, 400 unknown_field (allowed), 400 invalid_separator, 400 invalid_titles, 400 invalid_metadesc, 400 invalid_noindex, 400 invalid_attachments, 400 invalid_breadcrumbs, 400 invalid_sitemap, 400 invalid_organization_type, 400 invalid_person_user, 400 invalid_logo, 400 invalid_default_image, 400 invalid_twitter_card, 400 invalid_profiles, 400 invalid_entries_per_page, 400 sitemap_composition_readonly, 400 invalid_index_now_key, 400 index_now_key_missing, 409 yoast_missing, 409 index_now_unsupported.
GET /seo/pages
| Параметр | По умолчанию | Смысл |
|---|---|---|
lang | all | обходить страницы этого языка |
curl -s -H "Authorization: Bearer $OP_TOKEN" "$API/site/$SITE/seo/pages?lang=ru"
{
"success": true,
"site_id": "x9HTLHECq",
"lang": "ru",
"checked_at": "2026-09-25T20:28:12.689Z",
"took_ms": 2808,
"totals": { "pages": 36, "crawled": 36, "checked": 30, "skipped_noindex": 0, "unreachable": 6 },
"meta": { "count": 0, "pages": [] },
"headings": {
"count": 3,
"pages": [
{ "id": 6234, "title": "Установка", "lang": "ru", "url": "/ru/docs-ru/ustanovka/", "link": "https://test.onpress.pro/ru/docs-ru/ustanovka/", "problems": [ { "kind": "many_h1", "count": 2, "text": "Установка" } ], "outline": [ { "level": 1, "text": "Установка" }, { "level": 1, "text": "Установка" }, { "level": 2, "text": "Требования к окружению" } ] }
]
},
"unreachable": [
{ "id": 6240, "title": "Обработка ошибок", "lang": "ru", "url": "/ru/obrabotka-oshibok/", "link": "https://test.onpress.pro/ru/obrabotka-oshibok/", "reason": "http_error", "status": 404, "message": "the page answered 404" }
]
}
meta.pages[] — missing (title, description), title_text, description_text. headings.pages[].problems[].kind — no_h1, many_h1, jump (from, to). unreachable[].reason — http_error, timeout, unreachable, not_html. Обход — до 2000 страниц, до 8 одновременно, 15 с на страницу; totals.truncated_at, если страниц больше. Отказы: 409 no_public_pages (ни у одной опубликованной страницы нет адреса), 422 unknown_language.