chinaz-baidupc-ranking
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "chinaz-baidupc-ranking" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a1334cab83c68272640efc2fe07cb84309ab8b0c4c08fd278cf6762162958b56. Verify the upstream source and version against https://skillhub.cn/skills/org-1qazsc77/chinaz-baidupc-ranking before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Purpose: Check a domain’s ranking in Baidu PC search for specified keywords, including ranking position (page-number–result-number), page title, page URL, and indexed count. Applicable to requests like “check domain Baidu ranking,” “view keyword ranking position,” or “assess a domain’s SEO performance on Baidu.” Implementation: performed via a local Python script that calls the Baidu PC ranking API and uses a dedicated API key stored in environment variables.
Introduction source: third_party · org-1qazsc77 · 1.0.3 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: chinaz-baidupc-ranking
description: 查询域名在百度PC搜索引擎中指定关键词的排名情况,包括排名位置(页数-条数)、页面标题、页面链接、收录量等。适用于"查询域名百度排名""查看关键词排名位置""查询某域名在百度的SEO表现"等请求。通过本地 Python 脚本调用 百度PC排名接口,并使用环境变量中的专属 API Key。百度PC排名查询
查询一个域名在百度PC搜索引擎中指定关键词的排名数据。排名只返回前 50 名数据,50 名后不体现。本 Skill 只覆盖"百度PC排名"接口,不用于移动端排名、搜狗排名或其他搜索引擎排名查询。
运行要求
- 支持标准 Agent Skills 的 AI 客户端,且允许执行本地命令。
- Python 3;脚本只使用 Python 标准库,无需安装第三方依赖。
- 能够向
https://openapi.chinaz.net发起 HTTPS 请求。 - 运行 AI 客户端的环境可读取环境变量。
如果使用的 AI 服务不支持本地命令或环境变量,请改用该服务支持的本地客户端、沙盒密钥管理或安全环境变量注入方式;不要在聊天中发送 API Key。
获取与配置 API Key
- 在 百度PC排名接口购买页 购买接口并获取专属 API Key。该接口提供 0 元/10 次的免费体验额度。
- 将 Key 保存为环境变量,变量名必须是:
CHINAZ_BAIDUPC_API_KEY
- 重新启动你的 AI 客户端或其运行环境,使新环境变量生效。
Windows 图形界面:搜索并打开"编辑账户的环境变量",在"用户变量"中新增该变量,变量值填入购买后获得的 Key。
macOS/Linux 当前终端会话:
export CHINAZ_BAIDUPC_API_KEY='你的专属APIKey'
不要把真实 Key 写入 SKILL.md、源代码、命令行参数、日志、仓库或聊天记录。若 AI 客户端提供"Secrets""Environment Variables"或"Credentials"配置页,优先使用其安全存储功能。
查询流程
- 从用户请求中提取两个必填参数:
domain:待查询域名,例如chinaz.com。可使用 URL 输入;脚本会去除协议、路径、查询参数和片段。keyword:待查询的关键词,例如站长工具。
- 在 Skill 根目录执行脚本:
python scripts/query_baidupc_ranking.py --domain "chinaz.com" --keyword "站长工具"
如果系统将 Python 3 命令命名为 python3,使用 python3 代替 python。
- 脚本读取环境变量中的 Key,并调用原始 GET 接口
https://openapi.chinaz.net/v1/1001/baidupc_keywordranking,发送domain、keyword、ChinazVer=1.0与APIKey。 - 从脚本输出的 JSON 读取结果;仅依据实际返回回答用户。
结果解读
StateCode: 1表示查询成功。- 成功结果包含以下字段:
RankStr:排名位置,格式为"页数-条数",如1-3表示第 1 页第 3 条Title:排名页面的标题Url:排名页面的链接地址SiteCount:该关键词的收录量(搜索结果总数)
- 若未进入前 50 名,接口不返回排名数据,应如实说明"该域名未进入该关键词前 50 名"。
- 排名存在异地排名现象,不保证数据与查询 IP 百分百一致;结果仅供参考。
XiongzhangID字段已不再返回,可忽略。
推荐答复格式:
百度PC排名查询结果
- 域名:chinaz.com
- 关键词:站长工具
- 查询状态:成功 / 未进入前50名 / 失败原因
- 排名位置:第1页第3条
- 页面标题:接口返回的标题
- 页面链接:接口返回的URL
- 收录量:接口返回的收录量
错误处理
missing_api_key:环境变量未设置。按"获取与配置 API Key"创建变量后,重启运行环境。- HTTP
431、432、433、434:Key 缺失、格式不正确或无效。确认 Key 来自购买页的"百度PC排名"产品。 - HTTP
436:Key 不存在或额度不足。检查账户剩余额度;免费体验额度用完后可前往购买页购买付费套餐。 - 业务码表示未查询到排名时:如实说明"未进入该关键词前 50 名",不推断具体排名。
network_error或timeout:检查网络、DNS、代理或防火墙后重试。- 其他失败状态:按返回的
Reason或 JSON 错误信息说明问题,不得编造排名数据。
使用边界
- 一次只查询一个域名的一个关键词;批量任务须逐条执行。
- 排名数据仅供参考,存在异地排名差异,不保证与实际搜索结果完全一致。
- 不输出、复述或保存 API Key。
应用场景
场景一:查询域名关键词排名
适用问题:"我的域名在百度上搜某个关键词排第几?"
建议输入:--domain "example.com" --keyword "目标关键词"
结果用途:从 RankStr 获取排名位置(页数-条数),判断是否在首页及具体排名位次。若未返回排名数据则说明未进入前 50 名。
场景二:监控SEO关键词表现
适用问题:"这个关键词的排名页面是什么?收录量多少?"
建议输入:--domain "example.com" --keyword "目标关键词"
结果用途:从 Title 和 Url 获取排名页面的标题和链接,确认是哪个页面获得了排名;从 SiteCount 了解该关键词的竞争程度(收录量越大竞争越激烈)。
场景三:竞品排名对比
适用问题:"竞品域名在这个关键词上的排名如何?"
建议输入:--domain "competitor.com" --keyword "目标关键词"
结果用途:查询竞品域名的排名位置和页面信息,与自身域名排名进行对比分析,了解竞争格局。
Current listing version
1.0.3
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供SEO关键词排名查询的实用功能
- 解决站长和SEO从业者的具体痛点
- 数据来源明确,结果解读清晰
Highlights
- 触发词覆盖多种常见表述变体
- 明确界定适用范围和边界
- description位置正确且内容完整
Highlights
- 文档结构清晰,步骤划分合理
- 包含完整的使用示例和场景说明
- frontmatter完整,便于理解执行流程
Highlights
- API来源明确,参数说明完整
- 异常处理覆盖全面,包括网络错误和业务错误
- 安全考虑周到,强调环境变量使用
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 3, 17, 19, 21, 38
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- openapi.chinaz.net
- www.chinaz.net
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.