如何重新制作 Google 搜索 API 的返回结果?

问题描述 投票:0回答:2

如何使用 Google 搜索 API 获取 Google 引擎上的信息、网站标题、简短描述和 URL。可以吗?

我尝试了 API,但它只给我一些没有 URL 或网站标题的信息。

google-search-api
2个回答
0
投票

使用 Google 购物 api,您可以检索标题、简短描述和网址。我已经在 C# 应用程序中实现了这一点,它从下面的 url 返回一个 json 文件并对其进行解析。

您需要一个

apiId
来开始。

使用此网址,您可以在 q 之后添加搜索参数,在此示例中仅搜索数码相机。

https://www.googleapis.com/shopping/search/v1/public/products?key=key&country=US&q=digital+camera

请参阅 http://code.google.com/apis/shopping/search/v1/getting_started.html 了解更多详情


0
投票

我不确定我是否有足够的信息,但我发现 Google Custom Search API 参考页面有参考 JSON/ATOM 示例:
https://code.google.com/apis/customsearch/v1/reference.html

此查询将帮助您开始:
https://www.googleapis.com/customsearch/v1?key={YOURAPIKEY}&cx={cx?}&cref={cref?}&q=st%20olaf

这能让你开始吗?

保重! 斯皮维斯

© www.soinside.com 2019 - 2024. All rights reserved.