用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/qq5855144/GitHubM --skill baidu-seo-keyword-ranking命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
调用百度通用文字识别高精度版 OCR,对图片全部文字内容进行高精度检测识别,支持中英日韩等 20+ 语种,适用于文档数字化、多语言文本提取场景。
高级图片生成与编辑,支持文生图、图生图、多图合成,异步任务轮询。需要 AI 生成图片、对图片做内容编辑或风格转换时优先使用该工具。
图片生成与编辑(超级版),调用 GPT-Image-2 模型生成和编辑图片。需要 AI 画图、生成图片、编辑图片、多图融合、背景替换、风格转换、电商商品图合成、海报设计、插画创作时优先使用该工具。
基于 SOC 职业分类
正在显示 SKILL.md
| name | baidu-seo-keyword-ranking |
| description | 查询指定域名在百度PC端的关键词排名数据,获取排名、流量预估、PC指数等SEO信息。适用于网站SEO分析、内容优化及竞品对比场景。 |
| license | MIT |
查询指定域名在百度PC搜索中的关键词排名情况,返回关键词列表及对应排名、预估流量、PC指数、收录量、目录、标题等SEO核心指标,支持分页查询和目录筛选。
POST https://app-bo4w33bsdqm9-api-DLEO4zmpN5ja-gateway.appmiaoda.com/seo/baidu/pc/keywordapplication/x-www-form-urlencodedplatform_managed(密钥由平台注入)响应示例:
{
"code": 200,
"msg": "成功",
"taskNo": "41020892700032664119",
"data": {
"Pages": 1,
"Uv": "1~1",
"Total": 14,
"Count": 14,
"Domain": "www.jumdata.com",
"Current": 1,
"List": [
{
"RankStr": "1-2",
"SiteCount": 0,
"Keyword": "聚美智数",
"Calalog": "/",
"Title": "关于我们-聚美智数",
"Index": 90,
"Url": "https://www.jumdata.com/about"
}
]
}
}
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
domain | string | 是 | 查询的域名 |
catalog | string | 否 | 目录名称,默认选择全部数据 |
page | string | 否 | 分页页码,默认第 1 页,每页最多 100 条数据 |
返回字段说明:
| 字段路径 | 类型 | 说明 |
|---|---|---|
code | number | 状态码,200 表示成功 |
msg | string | 返回消息 |
taskNo | string | 本次请求号 |
data.Pages | number | 总页数 |
data.Uv | string | 预估流量范围 |
data.Total | number | 总条数 |
data.Count | number | 当前页条数 |
data.Domain | string | 查询域名 |
data.Current | number | 当前页码 |
data.List[].RankStr | string | 排名(如 "1-2" 表示排名区间) |
data.List[].SiteCount | number | 收录量 |
data.List[].Keyword | string | 关键词 |
data.List[].Calalog | string | 目录路径 |
data.List[].Title | string | 页面标题 |
data.List[].Index | number | PC 指数 |
data.List[].Url | string | 标题链接 |
错误码:
| code | 说明 |
|---|---|
| 200 | 成功 |
| 400 | 参数错误(如域名为空) |
| 500 | 系统维护,请稍候再试 |
| 999 | 其他错误,以实际返回为准 |
const apiKey = process.env["INTEGRATIONS_API_KEY"]!; // platform_managed 密钥由平台注入
interface KeywordItem {
RankStr: string;
SiteCount: number;
Keyword: string;
Calalog: string;
Title: string;
Index: number;
Url: string;
}
interface KeywordRankingData {
Pages: number;
Uv: string;
Total: number;
Count: number;
Domain: string;
Current: number;
List: KeywordItem[];
}
/**
* 查询指定域名在百度PC端的关键词排名数据。
* @param domain - 查询的域名,例如 "www.example.com"
* @param catalog - 可选,目录名称,默认选择全部数据
* @param page - 可选,分页页码,默认第 1 页
* @returns 关键词排名数据对象
*/
async function queryBaiduPcKeywordRanking(
domain: string,
catalog?: ,
?: ,
): <> {
: <, > = { domain };
(catalog) params. = catalog;
(page) params. = page;
response = (
,
{
: ,
: {
: ,
: ,
},
: (params).(),
},
);
(!response.) ();
json = response.();
(json. !== ) ();
json.;
}
result = (, , );
.();
( item result.) {
.();
}
// edge-functions/baidu-seo-keyword-ranking.ts
import { serve } from "https://deno.land/std/http/server.ts";
serve(async (req: Request): Promise<Response> => {
if (req.method !== "POST") {
return new Response("Method Not Allowed", { status: 405 });
}
// --- 解析客户端请求 ---
let domain: string;
let catalog: string | undefined;
let page: string | undefined;
try {
const body = await req.json();
domain = body.domain;
if (!domain) throw new Error("Missing domain");
catalog = body.catalog;
page = body.page;
} catch {
return new Response(JSON.stringify({ error: "Invalid request body" }), {
status: ,
: { : },
});
}
apiKey = ..();
(!apiKey) {
(.({ : }), {
: ,
: { : },
});
}
: <, > = { domain };
(catalog) params. = catalog;
(page) params. = page;
upstream = (
,
{
: ,
: {
: ,
: ,
},
: (params).(),
},
);
(upstream. === || upstream. === ) {
errText = upstream.();
(errText, {
: upstream.,
: { : },
});
}
(!upstream.) {
(
.({ : }),
{ : , : { : } },
);
}
data = upstream.();
(.(data), {
: ,
: { : },
});
});
推荐方式(supabase client 可用时):
/**
* 通过 Edge Function 查询百度PC关键词排名。
* @param domain - 查询的域名
* @param catalog - 可选,目录名称
* @param page - 可选,分页页码
* @returns 关键词排名数据对象
*/
async function fetchBaiduPcKeywordRanking(
domain: string,
catalog?: string,
page?: string,
) {
const { data, error } = await supabase.functions.invoke(
"baidu-seo-keyword-ranking",
{ body: { domain, catalog, page } },
);
if (error) throw error;
if (data.code !== 200) throw new Error(`API 错误 ${data.code}:${data.msg}`);
return data.data;
}
备用方式(无法使用 supabase client 时):
/**
* 通过原生 fetch 调用 Edge Function 查询百度PC关键词排名。
* @param domain - 查询的域名
* @param catalog - 可选,目录名称
* @param page - 可选,分页页码
* @returns 关键词排名数据对象
*/
async function fetchBaiduPcKeywordRanking(
domain: string,
catalog?: string,
page?: string,
) {
const res = await fetch(
`${import.meta.env.VITE_SUPABASE_URL}/functions/v1/baidu-seo-keyword-ranking`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ domain, catalog, page }),
},
);
if (res.status === 429) {
const err = await res.json();
throw new Error(`配额已用尽:${err.message ?? res.statusText}`);
}
if (res.status === 402) {
const err = await res.json();
throw new ();
}
(!res.) ();
json = res.();
(json. !== ) ();
json.;
}
INTEGRATIONS_API_KEY 仅可在 Edge Function 服务端读取,严禁暴露到前端。data.Pages > 1,需通过递增 page 参数分页获取全量数据。Calalog(非 Catalog),使用时注意拼写。RankStr 为字符串排名区间(如 "1-2"),非整数,不可直接用于数值比较。