mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 07:38:29 +00:00
* docs(cli): document device-code login and config reset guidance; renumber sections * docs(cli): fix duplicate numbering (renumber Login/API Keys/Configuration sections) * docs: Fix webhook documentation to include meta dict in all webhook payloads - Add note explaining that meta objects from kickoff requests are included in all webhook payloads - Update webhook examples to show proper payload structure including meta field - Fix webhook examples to match actual API implementation - Apply changes to English, Korean, and Portuguese documentation Resolves the documentation gap where meta dict passing to webhooks was not documented despite being implemented in the API. * WIP: CrewAI docs theme, changelog, GEO, localization * docs(cli): fix merge markers; ensure mode: "wide"; convert ASCII tables to Markdown (en/pt-BR/ko) * docs: add group icons across locales; split Automation/Integrations; update tools overviews and links
63 lines
1.4 KiB
Plaintext
63 lines
1.4 KiB
Plaintext
---
|
|
title: SerpApi Google Shopping Tool
|
|
description: The `SerpApiGoogleShoppingTool` searches Google Shopping results using SerpApi.
|
|
icon: cart-shopping
|
|
mode: "wide"
|
|
---
|
|
|
|
# `SerpApiGoogleShoppingTool`
|
|
|
|
## Description
|
|
|
|
Leverage `SerpApiGoogleShoppingTool` to query Google Shopping via SerpApi and retrieve product-oriented results.
|
|
|
|
## Installation
|
|
|
|
```shell
|
|
uv add crewai-tools[serpapi]
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
- `SERPAPI_API_KEY` (required): API key for SerpApi. Create one at https://serpapi.com/ (free tier available).
|
|
|
|
## Example
|
|
|
|
```python Code
|
|
from crewai import Agent, Task, Crew
|
|
from crewai_tools import SerpApiGoogleShoppingTool
|
|
|
|
tool = SerpApiGoogleShoppingTool()
|
|
|
|
agent = Agent(
|
|
role="Shopping Researcher",
|
|
goal="Find relevant products",
|
|
backstory="Expert in product search",
|
|
tools=[tool],
|
|
verbose=True,
|
|
)
|
|
|
|
task = Task(
|
|
description="Search Google Shopping for 'wireless noise-canceling headphones'",
|
|
expected_output="Top relevant products with titles and links",
|
|
agent=agent,
|
|
)
|
|
|
|
crew = Crew(agents=[agent], tasks=[task])
|
|
result = crew.kickoff()
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Set `SERPAPI_API_KEY` in the environment. Create a key at https://serpapi.com/
|
|
- See also Google Web Search via SerpApi: `/en/tools/search-research/serpapi-googlesearchtool`
|
|
|
|
## Parameters
|
|
|
|
### Run Parameters
|
|
|
|
- `search_query` (str, required): Product search query.
|
|
- `location` (str, optional): Geographic location parameter.
|
|
|
|
|