DennisOakdale
DennisOakdale

Reputation: 39

importxml in Google spreadsheet and returning a Google search result

I am trying to upload a result of a Google Search into my Google spreadsheet using importxml and the code that used to work doesn't anymore. I have

=IMPORTXML("https://www.google.com/search?q=site:[query]&num=100&start=1","//cite")

My error message is

Could not fetch url: https://www.google.com/search?q=site:[query]&num=100&start=1

Can someone tell me why this doesn't work anymore?

Upvotes: 0

Views: 3412

Answers (1)

Amit Agarwal
Amit Agarwal

Reputation: 11268

Google has lately been blocking search requests made from both Apps Scripts and Google Sheets though the requests are made from one of their own IPs. They probably do this to prevent scraping.

Upvotes: 4

Related Questions