Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(READ THIS FIRST) - Correct Way to get Google Search Results #63

Open
knoxcard opened this issue Oct 4, 2018 · 2 comments
Open

(READ THIS FIRST) - Correct Way to get Google Search Results #63

knoxcard opened this issue Oct 4, 2018 · 2 comments

Comments

@knoxcard
Copy link

knoxcard commented Oct 4, 2018

The proper way to get Google results is to use an API key. With this module, you'll quickly run into the Google captcha issue (Google will detect an unusual amount of traffic from an IP), without using an API key.

You want to query Google directly using an API key...
https://www.googleapis.com/customsearch/v1?key=<YOUR_GOOGLE_SEARCH_API_KEY>&q=Node JS

Get your Google Search API Key here: https://developers.google.com/custom-search/json-api/v1/overview

This is wayyyy faster too, you get raw JSON results directly from their server in one HTTP call. No time wasted on parsing HTML and if Google changes their HTML structure you are not dead in the water. Also, one less NPM repo in your codebase, better security.

@knoxcard knoxcard changed the title Read this: Correct Way to get Google Search Results (READ THIS FIRST) - Correct Way to get Google Search Results Oct 4, 2018
@BeauBouchard
Copy link

Thank you 👍

@tpickett
Copy link
Contributor

tpickett commented May 8, 2019

i don't agree. Using the API provides a bias about your API key in the results that you receive. Yes it is faster, but is isn't the same results...
There are workarounds for the IP request limits that will ban you.
I don't think that one way is "correct" over another. Google wants us to use the API? then they shouldn't skew the results from said API. This is just spreading false information...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants