BookmarkSubscribeRSS Feed
mathias
Quartz | Level 8

Hello,

I would like to fetch google trends data with SAS, but the API seems to block SAS' requests and returning a quota limit error.

here is the sample code :

filename data1 url "http://www.google.com/trends/fetchComponent?q=sas&cid=TIMESERIES_GRAPH_0&export=3";

data _null_;

  infile data1 lrecl=32760 recfm=n sharebuffers;

  file "XXX" recfm=n;

  input;

  put _infile_;

run;

Maybe the first time this will correctly fetch the data, but on my configuration it does not work a second time (the file XXX is filled with HTML citing a quota limit).

Some discussion here says it's because I'm recognised as a robot, (which I am)

Google Trends Quota Limit - Stack Overflow

Is there any way to enable cookies and look more like a normal browser ?

Or other ideas ?

(Using EG 5.1 with SAS 9.2)

Many thanks !!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 1711 views
  • 0 likes
  • 1 in conversation