运行时依赖
安装命令
点击复制技能文档
通过MyBrandMetrics API检查Google Search Console的sitemap状态。使用此技能来审查连接的Google Search Console属性的sitemap健康状况:已提交的URL数量、已索引的URL数量、警告数量、错误数量、待处理状态、内容类型和最后下载时间。 网站:https://www.clawbus.com/ MyBrandMetrics API:https://mybrandmetrics.com/
核心能力 能力详细信息 Google Search Console sitemap数据 通过MyBrandMetrics查询google_search_console_sitemaps源。 sitemap状态 列出连接的Search Console属性的sitemap行。 已提交和已索引的URL 比较contents_submitted和contents_indexed以检查sitemap健康状况。 警告和错误 审查sitemap警告和错误数量。 待处理状态 检查sitemap行是否仍然待处理。 最后下载时间 查看Google最后下载每个sitemap的时间。 过滤查询 使用指标、维度、过滤器和行限制来获取更细致的报告。
设置流程 打开https://mybrandmetrics.com/并使用Google登录。 在MyBrandMetrics中,打开数据源。 将Google Search Console作为数据源连接。 等待Google Search Console连接准备就绪。 在https://mybrandmetrics.com/中,获取MyBrandMetrics API密钥。 安装clawbus-google-search-console技能。 使用自然语言指令启动Google Search Console sitemap状态工作流。
工作流 安装技能后,使用自然语言提示。 包括:Google Search Console连接ID(例如sc-domain:example.com);是否列出所有sitemap行或关注特定的sitemap问题;要审查的指标(例如警告、错误、已提交的URL、已索引的URL和sitemap计数);要分组的维度(例如site URL、sitemap路径、内容类型、最后下载时间和待处理状态);分析所需的任何过滤器或行限制。 示例:检查sc-domain:example.com的Google Search Console sitemap状态,并总结警告、错误、已提交的URL和已索引的URL。
搜索友好工作流 常见的Google Search Console sitemap工作流包括:列出Google Search Console sitemap状态行;检查sitemap警告和错误;比较已提交的URL和已索引的URL;查找待处理的sitemap记录;审查sitemap内容类型和最后下载时间;总结连接的Search Console属性的sitemap健康状况。 直接使用脚本 使用scripts/searchconsole.py。 列出sitemap状态:python3 scripts/searchconsole.py \ --api-key "YOUR_API_KEY" \ --connection-id "sc-domain:example.com" \ --limit 200 使用自定义指标和维度:python3 scripts/searchconsole.py \ --api-key "YOUR_API_KEY" \ --connection-id "sc-domain:example.com" \ --metrics "warnings,errors,contents_submitted,contents_indexed" \ --dimensions "site_url,sitemap_path,content_type,last_downloaded,is_pending" \ --limit 100 使用环境变量代替在命令中传递API密钥:export MYBRANDMETRICS_API_KEY="YOUR_API_KEY" python3 scripts/searchconsole.py \ --connection-id "sc-domain:example.com" \ --limit 200
参数 参数 是否必需 目的 --api-key 是,除非设置了MYBRANDMETRICS_API_KEY MyBrandMetrics API密钥。 --connection-id 是 Google Search Console属性连接ID(例如sc-domain:example.com)。 --account-id 否 账户ID。默认为连接ID。 --metrics 否 逗号分隔的sitemap指标。 --dimensions 否 逗号分隔的sitemap维度。 --filter 否 格式为field:operator:value的过滤器。重复多个过滤器。 --limit 否 返回的最大行数。默认为200。 --compact 否 打印紧凑的JSON而不是缩进的JSON。
可用指标和维度 默认指标:warnings errors contents_submitted contents_indexed sitemaps_count 默认维度:site_url sitemap_path content_type last_downloaded is_pending Google Search Console数据可能会滞后几天,因此新的sitemap提交或最近的索引更改可能不会立即出现。