← 返回 Skills 市场
lycici

Keyapi Google Search

作者 lycici · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
84
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install keyapi-google-search
功能描述
Perform Google web and image searches — retrieve ranked web results with titles, snippets, and URLs, or search for images with country and language targeting...
使用说明 (SKILL.md)

keyapi-google-search

Perform Google web and image searches — retrieve ranked web results or search for images with geographic, language, and result-count controls.

This skill provides Google search intelligence using the KeyAPI MCP service. It enables keyword-based web search returning ranked results with titles, URLs, and snippets, and image search with country/language targeting and page-based pagination — all through a unified, cache-first workflow.

Use this skill when you need to:

  • Retrieve ranked Google web search results for any keyword query
  • Search Google Images for visual content matching a keyword
  • Target searches to a specific country or language
  • Control result count (up to 100 for web, up to 20 per page for images)
  • Paginate through image search results

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

Prerequisites

Requirement Details
KEYAPI_TOKEN A valid API token from keyapi.ai. Register at the site to obtain your free token. Set it as an environment variable: export KEYAPI_TOKEN=your_token_here
Node.js v18 or higher
Dependencies Run npm install in the skill directory to install @modelcontextprotocol/sdk

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

MCP Server Configuration

All tool calls in this skill target the KeyAPI Google MCP server:

Server URL : https://mcp.keyapi.ai/google/mcp
Auth Header: Authorization: Bearer $KEYAPI_TOKEN

Setup (one-time):

# 1. Install dependencies
npm install

# 2. Set your API token (get one free at https://keyapi.ai/)
export KEYAPI_TOKEN=your_token_here

# 3. List all available tools to verify the connection
node scripts/run.js --platform google --list-tools

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

Analysis Scenarios

User Need Node(s) Best For
Ranked web search results web_search Content research, competitive analysis, SERP monitoring
Image search results image_search Visual content discovery, brand image monitoring, asset research

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

Workflow

Step 1 — Select the Right Search Node

  • Web content research: Use web_search for any query requiring text results, URLs, and page snippets.
  • Visual content research: Use image_search for queries requiring image URLs and visual asset discovery.

web_search — No Pagination

web_search returns results in a single call. Use the num parameter (1–100) to control how many results are returned. There is no page parameter — all results are delivered at once.

image_search — Page-Based Pagination

image_search supports page (1-indexed) and num (1–20 per page) for pagination. To retrieve more results, increment the page value while keeping num consistent.

Language and Region Targeting

The two endpoints use different parameter conventions for targeting:

Endpoint Language param Format Example
web_search lr Language-region code en-US, zh-CN, de-DE
image_search lr Language prefix code lang_en, lang_zh-CN, lang_de
image_search gl Two-letter country code us, cn, de

For web_search, lr controls both language and regional relevance. For image_search, use gl for country targeting and lr for language filtering — they are independent controls.

Step 2 — Retrieve API Schema

Before calling any node, inspect its input schema to confirm required parameters and available options:

node scripts/run.js --platform google --schema web_search
node scripts/run.js --platform google --schema image_search

Step 3 — Call APIs and Cache Results Locally

Execute tool calls and persist responses to the local cache to avoid redundant API calls.

Calling a tool:

# Single call with pretty output
node scripts/run.js --platform google --tool \x3Ctool_name> \
  --params '\x3Cjson_args>' --pretty

# Force fresh data, skip cache
node scripts/run.js --platform google --tool \x3Ctool_name> \
  --params '\x3Cjson_args>' --no-cache --pretty

Example — web search (English, US, top 10 results):

node scripts/run.js --platform google --tool web_search \
  --params '{"q":"best noise cancelling headphones 2025","lr":"en-US","num":10}' --pretty

Example — web search (more results in one call):

node scripts/run.js --platform google --tool web_search \
  --params '{"q":"competitor analysis tools","lr":"en-US","num":50}' --pretty

Example — image search (first page):

node scripts/run.js --platform google --tool image_search \
  --params '{"q":"wireless earbuds product photography","gl":"us","lr":"lang_en","num":20,"page":1}' --pretty

Example — image search (next page):

node scripts/run.js --platform google --tool image_search \
  --params '{"q":"wireless earbuds product photography","gl":"us","lr":"lang_en","num":20,"page":2}' --pretty

Example — web search in a non-English market:

node scripts/run.js --platform google --tool web_search \
  --params '{"q":"无线耳机推荐","lr":"zh-CN","num":10}' --pretty

Pagination reference:

Endpoint Pagination Notes
web_search None Use num (1–100) to set result count. All results returned in one call.
image_search page (1-indexed) Use num (1–20) per page. Increment page for next batch.

Parameter reference:

Endpoint Parameter Description Example values
Both q Search query (required) "best headphones"
web_search num Result count (1–100, default 10) 10, 50, 100
web_search lr Language and region (default en-US) en-US, zh-CN, de-DE, ja-JP
image_search num Results per page (1–20, default 10) 10, 20
image_search page Page number (1-indexed, default 1) 1, 2, 3
image_search gl Country code for geo-targeting (default us) us, uk, de, cn
image_search lr Language filter (default lang_en) lang_en, lang_zh-CN, lang_de

Cache directory structure:

.keyapi-cache/
└── YYYY-MM-DD/
    ├── web_search/
    │   └── {params_hash}.json
    └── image_search/
        └── {params_hash}.json

Cache-first policy:

Before every API call, check whether a cached result already exists for the given parameters. If a valid cache file exists, load from disk and skip the API call.

Step 4 — Synthesize and Report Findings

After collecting all API responses, produce a structured search intelligence report:

For web search results:

  1. SERP Overview — Total result count, top-ranking domains, result type distribution (organic, featured snippets, knowledge panels).
  2. Content Analysis — Key themes across top results, common title patterns, snippet sentiment.
  3. Competitive Landscape — Dominant domains, content authority signals, outranking opportunities.
  4. Research Findings — Synthesized answer from top results relevant to the query intent.

For image search results:

  1. Image Inventory — Result count, image source domains, image type distribution (product photos, infographics, logos).
  2. Visual Themes — Common subjects, color patterns, composition styles.
  3. Source Attribution — Top domains providing images, licensing signals where available.

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

Common Rules

Rule Detail
web_search has no pagination Use num (max 100) to retrieve all desired results in one call. There is no page parameter for web search.
image_search pagination Use page (1-indexed) with consistent num to paginate through image results.
lr format difference web_search uses en-US format; image_search uses lang_en format. Do not mix them.
gl is image-search only The gl country-targeting parameter is available on image_search only, not web_search.
num limits web_search: 1–100. image_search: 1–20 per page.
Success check code = 0 → success. Any other value → failure. Always check the response code before processing data.
Retry on 500 If code = 500, retry the identical request up to 3 times with a 2–3 second pause between attempts before reporting the error.
Cache first Always check the local .keyapi-cache/ directory before issuing a live API call.

author: KeyAPI license: MIT repository: https://github.com/EchoSell/keyapi-skills

Error Handling

Code Meaning Action
0 Success Continue workflow normally
400 Bad request — invalid or missing parameters Ensure q is provided; check num range (web: 1–100, image: 1–20); verify lr format
401 Unauthorized — token missing or expired Confirm KEYAPI_TOKEN is set correctly; visit keyapi.ai to renew
403 Forbidden — plan quota exceeded or feature restricted Review plan limits at keyapi.ai
429 Rate limit exceeded Wait 60 seconds, then retry
500 Internal server error Retry up to 3 times with a 2–3 second pause; if it persists, log the full request and response and skip this node
Other non-0 Unexpected error Log the full response body and surface the error message to the user
安全使用建议
This skill appears to be what it says: a KeyAPI-based Google web/image search CLI. Before installing or running it: 1) Verify you trust the KeyAPI service (https://keyapi.ai) and the repository owner; 2) Be aware the script will save your KEYAPI_TOKEN into a .env file in the skill directory if you provide it interactively — run it from a directory where you’re comfortable storing that token or manually set the environment variable instead; 3) The tool writes a local cache (.keyapi-cache) and can write output files — check/clean those if needed; 4) Review or audit the included scripts (scripts/run.js) yourself if you have concerns (the code is present and readable); 5) Confirm the MCP server URL is correct before use (the script accepts KEYAPI_SERVER_URL override — don’t point it at untrusted endpoints, as that would send your token elsewhere). If you need higher assurance, verify the package maintainer and upstream repository and/or run the code in an isolated environment first.
功能分析
Type: OpenClaw Skill Name: keyapi-google-search Version: 1.0.0 The skill provides Google web and image search capabilities via the KeyAPI MCP service. The 'scripts/run.js' file is a functional runner that handles authentication, local caching in '.keyapi-cache/', and pagination. It includes a helper to save the required 'KEYAPI_TOKEN' to a local '.env' file. The 'SKILL.md' file contains standard operational instructions for an AI agent to utilize the search tools and format reports. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found; the code and instructions are consistent with the stated purpose of providing a search interface.
能力评估
Purpose & Capability
The skill name/description (Google web/image search) align with the code and declared dependency (@modelcontextprotocol/sdk) that call a KeyAPI MCP server. Minor inconsistency: the run.js help defaults the platform to 'tiktok' while the SKILL.md focuses on the 'google' platform — this is likely a harmless default mismatch but worth noting.
Instruction Scope
SKILL.md and scripts instruct the user to run npm install and node scripts/run.js; the script reads/writes a .env file in the skill directory (can save your KEYAPI_TOKEN), creates a .keyapi-cache directory, and can write output files. These behaviors are within the expected scope for a client tool, but the token persistence and local caching are operational side-effects the user should expect.
Install Mechanism
No automated install spec is included; the package uses a single npm dependency (@modelcontextprotocol/sdk) declared in package.json. Requiring npm install is proportionate for a Node-based client. This is a standard, moderate-risk install model (npm registry dependency).
Credentials
Only KEYAPI_TOKEN (primaryEnv) and an optional KEYAPI_SERVER_URL are referenced. These match the stated purpose. No unrelated credentials or system-wide secrets are requested.
Persistence & Privilege
The skill does not request 'always: true' and cannot autonomously gain extra privileges beyond running when invoked. It does persist the token to a local .env and writes cache/output files in the skill directory — normal for a CLI client but something to be aware of.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install keyapi-google-search
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /keyapi-google-search 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of keyapi-google-search — unified Google web and image search skill. - Supports ranked Google web search with titles, snippets, URLs, and result count control (up to 100). - Provides Google image search with country and language targeting, pagination (page, count), and filtering options. - Cache-first workflow: persists API responses locally to minimize redundant calls. - Simple command-line usage with schema introspection, example queries, and flexible parameterization. - Practical analysis scenarios for content research, competitive analysis, and visual asset discovery.
元数据
Slug keyapi-google-search
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Keyapi Google Search 是什么?

Perform Google web and image searches — retrieve ranked web results with titles, snippets, and URLs, or search for images with country and language targeting... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 84 次。

如何安装 Keyapi Google Search?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install keyapi-google-search」即可一键安装,无需额外配置。

Keyapi Google Search 是免费的吗?

是的,Keyapi Google Search 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Keyapi Google Search 支持哪些平台?

Keyapi Google Search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Keyapi Google Search?

由 lycici(@lycici)开发并维护,当前版本 v1.0.0。

💬 留言讨论