添加参数到谷歌查询

发布于 2024-08-16 12:38:23 字数 362 浏览 4 评论 0原文

一段时间以来,我一直在尝试从谷歌获取实时股票报价。 首先我尝试了财务 API,但没有成功。

然后我看到了这个查询,它似乎是真的,

http://www.google.com/finance/info?client=ig&q=goog

它一定有一些我现在不知道的缺点。

不管怎样,它确实提供了实时性,至少是谷歌财务页面上所说的

有谁知道我是否可以为查询添加更多参数,例如+ YAHOO(这是错误的) 这样我就可以获得多于一只的股票?

另外,输出是 json 格式还是 Y 必须以不同的方式解析它? 我打算用curl 和ajax 来做到这一点

,谢谢,理查德

I am trying to get the realtime stockquotes from google for some time now.
First I try'd the finance api, but that didd'nt work out.

Then I saw this query and it seems to good to be true

http://www.google.com/finance/info?client=ig&q=goog

It must have some drawbacks that I am not aware off now.

Anyway, it does give realtime, at least that what it is says on the google finance page

Does anyone know if I can add more parameters for the query like + YAHOO (this is falty)
so I can get more then one stock??

Also, is the output in json or do Y have to parse it differently?
I was planning to do this with curl and ajax

thanks, Richard

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你没皮卡萌 2024-08-23 12:38:23

您可以使用逗号添加更多股票代码,例如:

http://www.google.com/finance/info?client=ig&q=goog,msft

响应确实是 json。 Stackoverflow 上有一个关于使用一流的 Google Finance API 获取股票报价的精彩讨论:
如何使用 Google Finance API 获取股票报价?

You can just add more ticker symbols with a comma, as in:

http://www.google.com/finance/info?client=ig&q=goog,msft

The response is indeed json. There is a good discussion on Stackoverflow about using the first-class Google Finance APIs to get stock quotes here:
How can I get stock quotes using Google Finance API?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文