GEO-博客文章-保存
接口信息
- 接口地址:
{your-site-url}/api/skill/geo/article-save - 基础 URL:
{your-site-url}需替换为你自己的独立站 URL 地址,如https://your-domain.com/apimanager666 - 请求方式:
POST - Content-Type:
application/json - 说明: 创建或更新博客文章 GEO 数据。
认证
请求头中需要携带 skill-access-token:
| Header | 值 |
|---|---|
skill-access-token |
{your-skill-access-token} (请替换为你自己的 token) |
请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
int | 否 | 主键 ID。传入则按 ID 保存;不传则按 article_id 查找,存在则更新、不存在则创建 |
article_id |
int | 是 | 博客文章 ID |
language_code |
string | 否 | GEO 输出语言代码,缺省为 en |
summary |
string | 否 | AI 生成的文章摘要 |
semantic_content |
string | 否 | AI 生成的文章完整语义化内容 |
article_type |
string | 否 | 文章内容类型,如 How-to Guide、Buying Guide、Tutorial、Comparison、Review |
topic |
string | 否 | 文章核心主题 |
category_path |
array[string] | 否 | 文章语义分类路径(JSON),建议 2-5 级 |
key_topics |
array[string] | 否 | 文章核心主题列表(JSON) |
key_points |
array[string] | 否 | 文章核心观点(JSON) |
key_facts |
array[object] | 否 | 文章重要事实(JSON) |
definitions |
array[object] | 否 | 文章涉及的重要术语及定义(JSON) |
user_questions |
array[string] | 否 | 文章能够回答的用户问题(JSON) |
solution_scenarios |
array[string] | 否 | 文章解决的用户需求和实际场景(JSON) |
target_users |
array[string] | 否 | 文章主要读者(JSON) |
steps |
array[object] | 否 | 文章中的操作步骤或流程(JSON) |
decision_factors |
array[object] | 否 | 文章涉及的选择、判断或决策因素(JSON) |
comparison_dimensions |
array[string] | 否 | 文章实际比较的维度(JSON) |
limitations |
array[string] | 否 | 文章明确说明的限制、例外条件或适用边界(JSON) |
prerequisites |
array[string] | 否 | 执行文章方法或理解结论需要的前提条件(JSON) |
related_products |
array[object] | 否 | 文章涉及的商品语义关系(JSON) |
related_collections |
array[object] | 否 | 文章涉及的商品专辑语义关系(JSON) |
related_articles |
array[object] | 否 | 文章与其他文章之间的语义关系(JSON) |
entities |
array[object] | 否 | 文章涉及的重要实体(JSON) |
search_terms |
array[string] | 否 | AI 检索语义数据(JSON) |
faq |
array[object] | 否 | AI 生成的文章 FAQ(JSON) |
geo_score |
number | 否 | GEO 数据完整度评分(0-100) |
source_content_hash |
string | 否 | 生成 GEO 时文章源数据内容 hash(最大长度 64) |
请求示例
cURL
curl --location --request POST '{your-site-url}/api/skill/geo/article-save' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"article_id": 620,
"summary": "This article explains how to choose a suitable camping tent.",
"semantic_content": "This article is a camping tent selection guide that helps users evaluate different tent options.",
"article_type": "Buying Guide",
"topic": "Camping Tent Selection Guide",
"category_path": ["Sports & Outdoors", "Outdoor Recreation", "Camping & Hiking", "Camping Equipment Selection"],
"key_topics": ["Camping tent selection", "Tent size and capacity"],
"geo_score": 93.5,
"source_content_hash": "a7c92d8f3e5b1a9c7d4e8f6a2b3c5d7e"
}'
返回结果
code 为 200 表示调用成功;code 不为 200 表示调用失败。
成功响应
{
"code": 200,
"data": {
"id": 5,
"shop_id": 359,
"article_id": 620,
"language_code": "en",
"summary": "This article explains how to choose a suitable camping tent.",
"semantic_content": "This article is a camping tent selection guide that helps users evaluate different tent options.",
"article_type": "Buying Guide",
"topic": "Camping Tent Selection Guide",
"category_path": ["Sports & Outdoors", "Outdoor Recreation", "Camping & Hiking", "Camping Equipment Selection"],
"key_topics": ["Camping tent selection", "Tent size and capacity"],
"geo_score": 93.5,
"source_content_hash": "a7c92d8f3e5b1a9c7d4e8f6a2b3c5d7e",
"created_at": "2026-08-20 10:19:52",
"updated_at": "2026-08-20 18:50:22"
},
"message": "success"
}
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
code |
int | 状态码,200 表示成功 |
message |
string | 执行结果的文字描述 |
data |
object | 保存后的博客文章 GEO 数据(字段同请求参数,并包含 id、shop_id、created_at、updated_at) |
注意事项
- 保存逻辑:如果传递了
id且不为空,则通过id保存;如果id为空,则通过article_id查询是否已存在数据,存在则更新、不存在则创建 article_id为必填,其余字段选填- 注意 JSON 格式:
category_path、key_topics、faq等字段为 JSON 数组/对象 一个文章可存在多条不同语言的 GEO 数据
article_id缺失时返回错误码100304008(article geo save fail)