Ngo Tuan
Ngo Tuan

Reputation: 205

How to know number of results with an google search url?

I am coding in Google Apps Script.

I have an URL like that https://www.google.com.vn/search?q=something.

I want to send a GET request to that URL and from the response, I can know the number of results that should be show in the top of the SERPs. (like the picture)

number of results screenshot

Is there any way for me to do that?

Upvotes: 1

Views: 175

Answers (1)

alegria
alegria

Reputation: 1155

Sending a GET request to a web page will get you html response, instead you can try Google's Custom Search JSON API

And I quote:

The JSON Custom Search API lets you develop websites and applications to retrieve and display search results from Google Custom Search programmatically. With this API, you can use RESTful requests to get either web search or image search results in JSON format.

Upvotes: 1

Related Questions