GOOGLE_API_KEY(console.cloud.google.com/apis/credentials)并使用可编程搜索引擎创建 GOOGLE_CSE_ID(programmablesearchengine.google.com/controlpanel/create)。接下来,建议遵循 程序化 Google 搜索的说明。
然后我们需要设置一些环境变量。
结果数量
您可以使用k 参数来设置结果数量
元数据结果
通过 GoogleSearch 运行查询并返回片段、标题和链接元数据。- 片段:结果的描述。
- 标题:结果的标题。
- 链接:结果的链接。
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

