-2

If i search in google with a keyword, i get many results. I need to get the page source of that result. Then i need to parse that to get the actual url. How can i do that?

But if i see the page source of the search result page, i see it's only javascript.

I need the actual page source and the actual url/link from those thousands of result.

I could not understand this, (PHP) How to parse URLs in google search results?

Community
  • 1
  • 1
cola
  • 12,198
  • 36
  • 105
  • 165
  • https://developers.google.com/custom-search/v1/overview – Brian Roach Apr 27 '12 at 16:45
  • 1
    It's **against Google's TOS** - even if someone knew (like I do), I doubt whether he would be willing to publicly share code... – Dr.Kameleon Apr 27 '12 at 16:47
  • @BrianRoach, Can you post any example? – cola Apr 27 '12 at 16:48
  • -1, as the question is itself highly searchable, and once an answer is provided, finding an example is even more trivial. Please be encouraged to do prior research before asking questions, and take each answer as a hint to help with more searching. – halfer Apr 27 '12 at 20:57

1 Answers1

1

Try this: https://developers.google.com/custom-search/v1/overview. It's their Custom Search API. Try whereever possible to use the APIs provided by the companies rather than scraping their pages.

Tom Hallam
  • 1,924
  • 16
  • 24