GEO-自定义页面-保存

接口信息

  • 接口地址: {your-site-url}/api/skill/geo/page-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 保存;不传则按 page_id 查找,存在则更新、不存在则创建
page_id int 是 自定义页面 ID。一个页面只允许存在一份 GEO 数据
language_code string 否 GEO 语言代码,缺省为 en
summary string 否 AI 生成的页面简洁摘要
semantic_content string 否 AI 生成的页面完整语义化内容
page_type string 否 页面核心类型,如 About Us、Contact、Shipping Policy、FAQ 等
topic string 否 页面核心主题
category_path array[string] 否 页面语义分类路径(JSON),建议 2-5 级
key_topics array[string] 否 页面核心主题列表(JSON)
key_facts array[string] 否 页面可被 AI 直接引用的重要事实(JSON)
benefits array[string] 否 页面能够为用户提供的实际价值(JSON)
applications array[string] 否 页面适用的信息场景(JSON)
target_users array[string] 否 页面主要服务对象(JSON)
user_questions array[string] 否 用户可能通过该页面解决的问题(JSON)
solution_scenarios array[string] 否 用户需求与页面信息的解决关系(JSON)
search_terms array[string] 否 AI 检索相关语义数据(JSON)
entities array[object] 否 页面涉及的重要实体(JSON)
related_topics array[string] 否 与页面主题直接相关的语义主题(JSON)
faq array[object] 否 页面 FAQ(JSON)
related_products array[object] 否 页面与商品的语义关系(JSON)
related_collections array[object] 否 页面与商品专辑的语义关系(JSON)
commercial_info object 否 页面涉及的商业和采购语义信息(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/page-save' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "page_id": 20001,
  "summary": "This page provides information about the company, its background, business scope, and services.",
  "page_type": "Company Profile",
  "topic": "Company Background and Business Information",
  "category_path": ["Business", "Company Information"],
  "key_topics": ["Company Background", "Business Scope"],
  "geo_score": 85.0,
  "source_content_hash": "a1b2c3d4e5f678901234567890abcdef"
}'

返回结果

code 为 200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": {
        "id": 5,
        "shop_id": 359,
        "page_id": 20001,
        "language_code": "en",
        "summary": "This page provides information about the company, its background, business scope, and services.",
        "page_type": "Company Profile",
        "topic": "Company Background and Business Information",
        "category_path": ["Business", "Company Information"],
        "key_topics": ["Company Background", "Business Scope"],
        "geo_score": 85,
        "source_content_hash": "a1b2c3d4e5f678901234567890abcdef",
        "created_at": "2026-08-20 19:59:36",
        "updated_at": "2026-08-20 19:59:39"
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code int 状态码,200 表示成功
message string 执行结果的文字描述
data object 保存后的页面 GEO 数据(字段同请求参数,并包含 id、shop_id、created_at、updated_at)

注意事项

  1. 保存逻辑:如果传递了 id 且不为空,则通过 id 保存;如果 id 为空,则通过 page_id 查询是否已存在数据,存在则更新、不存在则创建
  2. page_id 为必填,其余字段选填
  3. 一个页面只允许存在一份 GEO 数据

  4. page_id 缺失时服务端返回 500 HTML 错误(PHP 致命异常),请务必传 page_id

Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-08-23 16:17:26

results matching ""

    No results matching ""