Using HTTP requests in Python I was able to get a response, however neither json nor simplejson modules are able to unpackage it. Both claim that the input is not good json.
import requests
import json
html_base = u"http://www.google.com/trends/fetchComponent?q="
q = u"asdf,qwerty"
query_type = u"&cid=TIMESERIES_GRAPH_0&export=3"
full_query = html_base + q + query_type
response = requests.get(full_query)
data = json.loads(response.text)
The error:
C:\Anaconda\lib\json\decoder.pyc in raw_decode(self, s, idx)
382 obj, end = self.scan_once(s, idx)
383 except StopIteration:
--> 384 raise ValueError("No JSON object could be decoded")
385 return obj, end
ValueError: No JSON object could be decoded