Search Google and retrieve AI Overviews, organic search results, and screenshots via Pangolin APIs.
Activate this skill when the user's intent matches any of these patterns:
Do not use this skill for Amazon product searches, price lookups, or review scraping -- those require a different skill.
pip install needed)
Register at pangolinfo.com to obtain credentials.
Set one of the following:
| Variable | Required | Description |
|----------|----------|-------------|
| PANGOLIN_API_KEY | Option A | API Key (skips login) |
| PANGOLIN_EMAIL | Option B | Account email |
| PANGOLIN_PASSWORD | Option B | Account password |
API key resolution order: PANGOLIN_API_KEY env var > cached ~/.pangolin_api_key > fresh login.
On macOS, Python may fail with CERTIFICATE_VERIFY_FAILED because it ships without root certificates by default.
Symptoms: The script outputs an error with code SSL_CERT.
Solutions (pick one):
```bash
/Applications/Python\ 3.x/Install\ Certificates.command
```
(Replace 3.x with your Python version, e.g. 3.11)
SSL_CERT_FILE environment variable:
```bash
pip3 install certifi
export SSL_CERT_FILE=$(python3 -c "import certifi; print(certifi.where())")
```
When a user tries to use this skill and authentication fails (error code MISSING_ENV), do not just repeat the error hint. Instead, walk the user through the full setup process interactively:
Tell the user (in their language):
> To use this skill, you need a Pangolin API account. Pangolin provides Google search and AI Overview data through its APIs.
>
> 使用本技能需要 Pangolin API 账号。Pangolin 提供 Google 搜索和 AI 概览数据的 API 服务。
> 1. Go to pangolinfo.com and create an account
> 2. After login, find your API Key in the dashboard
>
> 1. 访问 pangolinfo.com 注册账号
> 2. 登录后在控制台找到你的 API Key
When the user provides their credentials, you (the AI agent) should configure them securely. The script will automatically cache the API key at ~/.pangolin_api_key for all future calls.
If user provides an API key (recommended):
Write it directly to the cache file — avoids shell history entirely:
echo "<api_key>" > ~/.pangolin_api_key
chmod 600 ~/.pangolin_api_key 2>/dev/null
python3 scripts/pangolin.py --auth-only
If user provides email + password:
Set env vars in the session and clean up after auth:
export PANGOLIN_EMAIL="user@example.com"
export PANGOLIN_PASSWORD="their-password"
python3 scripts/pangolin.py --auth-only
unset PANGOLIN_EMAIL PANGOLIN_PASSWORD
This avoids passwords appearing in shell history (unlike inline VAR=x command syntax) and cleans up credentials after the API key is cached.
Both methods cache the API key automatically. After this one-time setup, no environment variables are needed — all future calls will use the cached API key at ~/.pangolin_api_key.
After auth returns "success": true:
~/.pangolin_api_key
.bashrc or .zshrc — the script handles persistence automatically
2001), tell the user to top up at pangolinfo.com
The main script is located at scripts/pangolin.py relative to this skill directory.
Path resolution: When invoking the script, resolve the absolute path from this skill's directory. Example:
SKILL_DIR="$(cd "$(dirname "$0")" && pwd)"
python3 "$SKILL_DIR/scripts/pangolin.py" --q "your query"
Or invoke directly:
python3 scripts/pangolin.py --q "your query"
User wants AI-generated answers with references. This is the default mode.
python3 scripts/pangolin.py --q "what is quantum computing"
User wants traditional Google search results (organic links + optional AI overview).
python3 scripts/pangolin.py --q "best databases 2025" --mode serp
User wants to see the actual Google results page.
python3 scripts/pangolin.py --q "best databases 2025" --mode serp --screenshot
User wants SERP results from a specific geographic region.
python3 scripts/pangolin.py --q "best databases 2025" --mode serp --region us
User wants to ask follow-up questions in an AI Mode conversation.
python3 scripts/pangolin.py --q "kubernetes" --follow-up "how to deploy" --follow-up "monitoring tools"
Verify credentials are working without consuming credits.
python3 scripts/pangolin.py --auth-only
| Parameter | Default | Notes |
|-----------|---------|-------|
| --mode | ai-mode | AI Mode with Google AI Overviews |
| --num | 10 | Number of results to request |
| --screenshot | off | Pass flag to enable |
| --follow-up | none | Repeatable; keep to 5 or fewer for speed |
When the user simply says "search for X" without specifying a mode, use the default ai-mode.
The script outputs JSON to stdout on success and structured error JSON to stderr on failure.
{
"success": true,
"task_id": "1768988520324-766a695d93b57aad",
"results_num": 1,
"ai_overview_count": 1,
"ai_overview": [
{
"content": ["Quantum computing uses quantum bits (qubits)..."],
"references": [
{
"title": "Quantum Computing - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Quantum_computing",
"domain": "Wikipedia"
}
]
}
],
"screenshot": "https://image.datasea.network/screenshots/..."
}
{
"success": true,
"task_id": "1768988520324-abcdef123456",
"results_num": 3,
"ai_overview_count": 1,
"ai_overview": [
{
"content": ["Java works by compiling source code..."],
"references": [
{"title": "How Java Works", "url": "https://docs.oracle.com/...", "domain": "Oracle"}
]
}
],
"organic_results": [
{
"title": "Java Tutorial for Beginners",
"url": "https://example.com/java-tutorial",
"text": "Learn how Java works from the ground up..."
}
]
}
{
"success": false,
"error": {
"code": "MISSING_ENV",
"message": "No authentication credentials found.",
"hint": "Set PANGOLIN_API_KEY, or both PANGOLIN_EMAIL and PANGOLIN_PASSWORD environment variables."
}
}
When presenting results to the user:
hint field.
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| --q | string | required | Search query |
| --mode | ai-mode \| serp | ai-mode | API mode |
| --screenshot | flag | off | Capture page screenshot |
| --follow-up | string (repeatable) | none | Follow-up question (ai-mode only) |
| --num | int | 10 | Number of results |
| --region | string | none | Geographic region for SERP results (e.g., us, uk). SERP mode only. |
| --auth-only | flag | off | Auth check only (no query needed) |
| --raw | flag | off | Output raw API response |
See references/output-schema.md for the complete JSON output schema documentation.
Credits are only consumed on successful requests (API code 0). Auth checks (--auth-only) do not consume credits.
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | API error (non-zero code from Pangolin) |
| 2 | Usage error (bad arguments) |
| 3 | Network error (connection, SSL, timeout, rate limit) |
| 4 | Authentication error |
| Error Code | Meaning | User-Facing Message | Resolution |
|------------|---------|---------------------|------------|
| MISSING_ENV | No credentials | "Authentication credentials are not configured." | Set PANGOLIN_EMAIL + PANGOLIN_PASSWORD or PANGOLIN_API_KEY. |
| AUTH_FAILED | Wrong credentials | "Authentication failed. Please check your credentials." | Verify email and password are correct. |
| RATE_LIMIT | Too many requests | "The API is rate-limiting requests. Please wait and try again." | Wait a moment, then retry. |
| NETWORK | Connection issue | "A network error occurred. Please check your connection." | Check internet, firewall, proxy settings. |
| SSL_CERT | Certificate error | "SSL certificate verification failed." | See macOS SSL Certificate Fix section above. |
| API_ERROR | Pangolin API error | "The search API returned an error." | Check the hint field; see references/error-codes.md. |
| API Code | Meaning | Resolution |
|----------|---------|------------|
| 1004 | Invalid/expired API key | Auto-retried by the script. If persistent, delete ~/.pangolin_api_key and retry. |
| 2001 | Insufficient credits | Top up credits at pangolinfo.com. |
| 2007 | Account expired | Renew subscription at pangolinfo.com. |
| 10000 | Task execution failed | Retry the request. Check query format. |
| 10001 | Task execution failed | Retry. May be a temporary server issue. |
--auth-only first if you are unsure whether credentials are configured, before spending credits on a real query.
ai-mode unless the user explicitly asks for standard/traditional search results.
hint to the user.
--screenshot when the user explicitly wants to see the rendered page or when visual context is needed.
--follow-up with --mode serp.
共 1 个版本