SerpApi Google Shopping 도구
SerpApi Google Shopping 도구 (SerpApiGoogleShoppingTool)
CrewAI의 SerpApiGoogleShoppingTool은 SerpApi를 통해 Google Shopping을 쿼리하고 상품 중심의 결과를 가져오는 도구예요. 상품 검색·가격 비교·쇼핑 리서치 워크플로에 활용하기 좋습니다.
출처: 문서
본문
SerpApiGoogleShoppingTool을 활용해 SerpApi를 통해 Google Shopping을 쿼리하고 상품 중심 결과를 검색해 보세요. SerpApi API 키가 필요합니다.
설치 (Installation)
uv add crewai-tools[serpapi]
환경변수 (Environment Variables)
SERPAPI_API_KEY(필수): SerpApi용 API 키. https://serpapi.com/에서 만들 수 있어요 (무료 티어 제공).
예시 (Example)
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)
- 환경에
SERPAPI_API_KEY를 설정하세요. https://serpapi.com/에서 키를 만들 수 있어요. - SerpApi를 통한 Google Web Search도 참고하세요:
/en/tools/search-research/serpapi-googlesearchtool
파라미터 (Parameters)
실행 파라미터 (Run Parameters)
search_query(str, required): 상품 검색 쿼리예요.location(str, optional): 지리적 위치 파라미터입니다.