Get the Urls from the Google search result page

Asked

Viewed 644 times

0

Hello,

I would like some API or any way to get the Urls that Google returns when doing a search.

For example, I did a Google search with Curl looking for Walmarts, I would like PHP to return me all the Urls of the sites. I didn’t find any such method on the web, could help me?

Grateful from now on.

  • Could you put the call you’re making please?

1 answer

3


Google has a service for this:

And then you’ll have something like this:

https://www.googleapis.com/customsearch/v1?q=Star+Wars&cx=018475493028468909364:ldifwlodnso&key=AOgsDiRlzY7GDCKC5Th7yKutv-7Hd4-IDehl_Sp

You will get the results all in JSON

  • Has some standard CSE?

  • No, one is generated for each search engine you create! To have a wider use just select advanced options when creating.

  • That answer you gave me above, did you happen to find it in this question? http://stackoverflow.com/questions/23405154/google-results-in-xml-json-using-the-custom-search-engine

  • Yes, I needed it and I had the link saved...

  • But for the record, these are different forums...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.