Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ SerpApi search plugin for [OpenClaw](https://docs.openclaw.ai). Registers a

- **`web_search` provider** — "SerpApi Search", backed by SerpApi's Google Light
engine (fastest Google Search API).

Specialized SerpApi verticals (news, flights, maps, shopping, scholar, finance,
YouTube, hotels, events, e-commerce, etc.) follow the same tool pattern and are
added as dedicated tools in subsequent releases, delivered through pull
requests.
- **30 specialized tools** covering Google News, Scholar, Maps (+reviews),
Shopping, Flights, Hotels, Events, Jobs, Trends, Finance, Lens, Autocomplete,
Bing, DuckDuckGo, Yahoo, YouTube (search, video, transcript), Amazon, eBay,
Walmart, Google Immersive Product, Tripadvisor, Weather, and Facebook /
Instagram public profiles.

See [`skills/serpapi/SKILL.md`](skills/serpapi/SKILL.md) for per-tool parameters
and usage guidance.

## Install

Expand Down
88 changes: 87 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,100 @@ import {
type OpenClawPluginDefinition,
} from "openclaw/plugin-sdk/plugin-entry";
import { createSerpApiWebSearchProvider } from "./src/serpapi-search-provider.js";
import {
createSerpApiAmazonTool,
createSerpApiAmazonProductTool,
createSerpApiAutocompleteTool,
createSerpApiBingTool,
createSerpApiDuckDuckGoTool,
createSerpApiEbayTool,
createSerpApiEbayProductTool,
createSerpApiEventsTool,
createSerpApiFacebookProfileTool,
createSerpApiFinanceTool,
createSerpApiFlightsTool,
createSerpApiHotelsTool,
createSerpApiImmersiveProductTool,
createSerpApiInstagramProfileTool,
createSerpApiJobsTool,
createSerpApiLensTool,
createSerpApiMapsTool,
createSerpApiMapsReviewsTool,
createSerpApiNewsTool,
createSerpApiScholarTool,
createSerpApiShoppingTool,
createSerpApiTrendsTool,
createSerpApiTripadvisorTool,
createSerpApiWalmartTool,
createSerpApiWalmartProductTool,
createSerpApiWeatherTool,
createSerpApiYahooTool,
createSerpApiYouTubeTool,
createSerpApiYouTubeTranscriptTool,
createSerpApiYouTubeVideoTool,
} from "./src/tools/index.js";

const plugin: OpenClawPluginDefinition = definePluginEntry({
id: "serpapi",
name: "SerpApi Search",
description:
"Web search provider backed by SerpApi (Google Light). Specialized SerpApi tools for news, flights, hotels, maps, shopping, YouTube, scholar, finance, and more follow in subsequent releases.",
"SerpApi-powered web search provider (Google Light) plus specialized tools for news, flights, hotels, maps, shopping, YouTube, scholar, finance, events, and more.",
register(api) {
api.registerWebSearchProvider(createSerpApiWebSearchProvider());
api.registerTool((ctx) => createSerpApiAmazonTool(api, ctx), { name: "serpapi_amazon" });
api.registerTool((ctx) => createSerpApiAmazonProductTool(api, ctx), {
name: "serpapi_amazon_product",
});
api.registerTool((ctx) => createSerpApiAutocompleteTool(api, ctx), {
name: "serpapi_autocomplete",
});
api.registerTool((ctx) => createSerpApiBingTool(api, ctx), { name: "serpapi_bing" });
api.registerTool((ctx) => createSerpApiDuckDuckGoTool(api, ctx), {
name: "serpapi_duckduckgo",
});
api.registerTool((ctx) => createSerpApiEbayTool(api, ctx), { name: "serpapi_ebay" });
api.registerTool((ctx) => createSerpApiEbayProductTool(api, ctx), {
name: "serpapi_ebay_product",
});
api.registerTool((ctx) => createSerpApiEventsTool(api, ctx), { name: "serpapi_events" });
api.registerTool((ctx) => createSerpApiFacebookProfileTool(api, ctx), {
name: "serpapi_facebook_profile",
});
api.registerTool((ctx) => createSerpApiFinanceTool(api, ctx), { name: "serpapi_finance" });
api.registerTool((ctx) => createSerpApiFlightsTool(api, ctx), { name: "serpapi_flights" });
api.registerTool((ctx) => createSerpApiHotelsTool(api, ctx), { name: "serpapi_hotels" });
api.registerTool((ctx) => createSerpApiImmersiveProductTool(api, ctx), {
name: "serpapi_immersive_product",
});
api.registerTool((ctx) => createSerpApiInstagramProfileTool(api, ctx), {
name: "serpapi_instagram_profile",
});
api.registerTool((ctx) => createSerpApiJobsTool(api, ctx), { name: "serpapi_jobs" });
api.registerTool((ctx) => createSerpApiLensTool(api, ctx), { name: "serpapi_lens" });
api.registerTool((ctx) => createSerpApiMapsTool(api, ctx), { name: "serpapi_maps" });
api.registerTool((ctx) => createSerpApiMapsReviewsTool(api, ctx), {
name: "serpapi_maps_reviews",
});
api.registerTool((ctx) => createSerpApiNewsTool(api, ctx), { name: "serpapi_news" });
api.registerTool((ctx) => createSerpApiScholarTool(api, ctx), { name: "serpapi_scholar" });
api.registerTool((ctx) => createSerpApiShoppingTool(api, ctx), { name: "serpapi_shopping" });
api.registerTool((ctx) => createSerpApiTrendsTool(api, ctx), { name: "serpapi_trends" });
api.registerTool((ctx) => createSerpApiTripadvisorTool(api, ctx), {
name: "serpapi_tripadvisor",
});
api.registerTool((ctx) => createSerpApiWalmartTool(api, ctx), { name: "serpapi_walmart" });
api.registerTool((ctx) => createSerpApiWalmartProductTool(api, ctx), {
name: "serpapi_walmart_product",
});
api.registerTool((ctx) => createSerpApiWeatherTool(api, ctx), { name: "serpapi_weather" });
api.registerTool((ctx) => createSerpApiYahooTool(api, ctx), { name: "serpapi_yahoo" });
api.registerTool((ctx) => createSerpApiYouTubeTool(api, ctx), { name: "serpapi_youtube" });
api.registerTool((ctx) => createSerpApiYouTubeTranscriptTool(api, ctx), {
name: "serpapi_youtube_transcript",
});
api.registerTool((ctx) => createSerpApiYouTubeVideoTool(api, ctx), {
name: "serpapi_youtube_video",
});
},
});

Expand Down
35 changes: 33 additions & 2 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "serpapi",
"name": "SerpApi Search",
"description": "Web search provider backed by SerpApi (Google Light, with 100+ engines). Specialized SerpApi tools follow in subsequent releases.",
"description": "SerpApi-powered web search provider (Google Light) plus specialized tools for news, flights, hotels, maps, shopping, YouTube, scholar, finance, events, and more.",
"activation": {
"onStartup": false
},
Expand Down Expand Up @@ -29,7 +29,38 @@
},
"contracts": {
"webSearchProviders": ["serpapi"],
"tools": []
"tools": [
"serpapi_amazon",
"serpapi_amazon_product",
"serpapi_autocomplete",
"serpapi_bing",
"serpapi_duckduckgo",
"serpapi_ebay",
"serpapi_ebay_product",
"serpapi_events",
"serpapi_facebook_profile",
"serpapi_finance",
"serpapi_flights",
"serpapi_hotels",
"serpapi_immersive_product",
"serpapi_instagram_profile",
"serpapi_jobs",
"serpapi_lens",
"serpapi_maps",
"serpapi_maps_reviews",
"serpapi_news",
"serpapi_scholar",
"serpapi_shopping",
"serpapi_trends",
"serpapi_tripadvisor",
"serpapi_walmart",
"serpapi_walmart_product",
"serpapi_weather",
"serpapi_yahoo",
"serpapi_youtube",
"serpapi_youtube_transcript",
"serpapi_youtube_video"
]
},
"configSchema": {
"type": "object",
Expand Down
Loading