Using Google Feed API with site feeds of Google Trends

868 views
Skip to first unread message

SeungHoe Gu

unread,
Mar 3, 2016, 12:17:57 AM3/3/16
to Google AJAX APIs
Hi,

I'm trying to parse site feeds(a XML file) from Google Trends, which can be referred from https://www.google.com/trends/hottrends/atom/feed?pn=p1

In the XML file, there is <item> element, and as child nodes, there are <title>, < link>, and <pubDate> elements. 
These elements are accessible with this source code :

var entry = result.entries[i];
entry.title
entry.publishedDate


However, I cannot find way to access <ht:picture>, <ht:picture_source>, <ht:approx_traffic>, <ht:news_item>, which are also child nodes of <item>.


Thank you.






Jeremy Geerdes

unread,
Mar 3, 2016, 8:17:01 AM3/3/16
to google-ajax...@googlegroups.com

Get the feed in MIXED format. Then, if you're using JS, you can use DOM methods to find the elements you want. If you're using other languages, you can parse the XML to get what you like.

PLEASE NOTE that the Feeds API is past its expiration date, and you are strongly encouraged to seek an alternative solution.

Jg

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/81282981-a629-4c63-a082-ad2694fe583a%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vijay Subramani

unread,
Sep 8, 2016, 3:41:21 PM9/8/16
to Google AJAX APIs
The Feed API will cease operations on Sep 29th, 2016.
Reply all
Reply to author
Forward
0 new messages