websearchapi

Web/News/Finance/Video/Maps/Hotels/Flights search tool based on SearchAPI (Google). Supports time filtering, ideal for agents to get real-time web information.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "websearchapi" with this command: npx skills add 1990huwei/searchapi

WebSearchAPI

A multi-type search tool based on SearchAPI (Google), ideal for agents to retrieve real-time web information.

Features

  • Multiple Search Types: Web, News, Video, Finance, Maps, Hotels, Flights
  • Time Filtering: Search by time range
  • Auto Retry: Automatic retry on network errors for stability
  • Structured Output: Agent-ready JSON format
  • Zero Dependencies: Pure Node.js built-in modules

Installation

# Copy tools/websearchapi to your project
# Configure API Key (required)
cd tools/websearchapi
node websearchapi.js config set-key YOUR_API_KEY

Get API Key: https://searchapi.io (Free registration)

⚠️ Important: Use your own API Key, not someone else's

Usage

Call via exec tool:

node <path>/websearchapi.js <command> [keyword] [options]

Search Types

TypeCommandDescription
Webs or searchGeneral web search
NewsnewsLatest news
VideovideoVideo search
FinancefinanceStock/Financial info
MapsmapsPlaces/Business
HotelshotelsHotel search
FlightsflightsFlight search

Options

OptionDescriptionDefault
--numNumber of results5
--langLanguagezh-CN
--glCountrycn
--timeTime rangenone
--jsonJSON outputtext

Time Filtering

ValueDescription
last_hourPast hour
last_dayPast day
last_weekPast week
last_monthPast month
last_yearPast year

Agent Examples

# Web search
node websearchapi.js s "MCP protocol"

# News search (past week)
node websearchapi.js news "AI" --time=last_week

# Finance search
node websearchapi.js finance "AAPL"

# Time filter (past 24 hours)
node websearchapi.js s "keyword" --time=last_day

# JSON format (recommended for parsing)
node websearchapi.js s "keyword" --json

Response Format

JSON mode returns:

{
  "success": true,
  "query": "keyword",
  "type": "google",
  "count": 5,
  "results": [
    {
      "title": "Result Title",
      "link": "URL",
      "snippet": "Summary",
      "source": "Source"
    }
  ],
  "metadata": {
    "totalResults": number,
    "timeTaken": seconds,
    "engine": "google"
  }
}

Configuration

First Time - Configure API Key

cd tools/websearchapi
node websearchapi.js config set-key YOUR_API_KEY

View/Modify Config

# View config (Key hidden)
node websearchapi.js config

# Set API Key
node websearchapi.js config set-key YOUR_API_KEY

# Modify defaults
node websearchapi.js config set-num 10      # Default result count
node websearchapi.js config set-lang en     # Default language
node websearchapi.js config set-gl us       # Default country
node websearchapi.js config set-retry 5     # Retry count

Deployment

# Copy to new machine
scp -r ./tools/websearchapi user@new-server:/path/to/tools/

# Configure your own API Key
cd /path/to/tools/websearchapi
node websearchapi.js config set-key YOUR_API_KEY

# Test
node websearchapi.js test

Troubleshooting

Search Failed

Finance No Results

  • Try stock code: finance "AAPL"
  • Try English: finance "Tesla stock"

Request Timeout

  • Increase retry: config set-retry 5

Security Notes

  • ⚠️ Always use your own API Key
  • 🔐 API Key stored in local config.json
  • 🚫 Don't share packages with API Key included

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Ocean Chat

OceanBus-powered P2P messaging, shared address book, 1v1 meetup negotiation, and conversation threading for AI agents. Use when users want to manage contacts...

Registry SourceRecently Updated
Automation

Remote Skill Test

Use when the user wants to test an agent skill on a remote jump host after updating it locally. Triggers on "test skill remotely", "remote test", "远程测试 skill...

Registry SourceRecently Updated
Automation

Link Midjourney Instagram

Runs the linkmidjourneyinstagram automation — generate four Midjourney images in Chromium via Playwright, then post each PNG as its own Instagram web post wi...

Registry SourceRecently Updated
250Profile unavailable
Automation

NEXO Brain

Cognitive memory system for AI agents — Atkinson-Shiffrin memory model, semantic RAG, trust scoring, and metacognitive error prevention. Gives your agent per...

Registry SourceRecently Updated
2.1K1Profile unavailable