| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A simple script to automate web interactions using Selenium. This script demonstrates opening a Firefox browser, navigating to Google, and performing a search query.
git clone https://github.com/SagarBiswas-MultiHAT/selenium-google-search-automation.gitcd selenium-google-search-automationpython -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install seleniumpython script.py✅ CAPTCHA-Safe & Legal Approach
Link: https://console.cloud.google.com/
Why this matters
🔹 Free Tier
🔹 Pros
🔹 Cons
🏆 Verdict
Best option for:
What you’ll get at the end
You will have two things (both required):
Only when you have both does the API work.
STEP 1 — Create a Google Cloud project
Log in with your Google account
At the top bar → click Select a project
Click NEW PROJECT
Set:
Click Create
That project will own your API key.
STEP 2 — Enable “Custom Search API”
API is now active for your project.
STEP 3 — Create the API Key
Example format:
AIzaSyDxxxxxxxxxxxxxxxxxxxxxxx
Don’t share this publicly.
STEP 4 — Create a Custom Search Engine (CSE)
This is where many people get confused — follow exactly.
Click Add
Fill the form:
Click Create
Now your search engine exists.
STEP 5 — Allow searching the entire web
By default, CSE only searches selected sites — we must change this.
Now it behaves like Google Search.
STEP 6 — Get the Search Engine ID (CX)
Example:
a1b2c3d4e5f6g7h8i
This is your CX value.
STEP 7 — Confirm your free quota
Google gives:
Check quota here: Google Cloud Console → APIs & Services → Quotas
What you should now have
| Item | Example |
|---|---|
| API Key | AIzaSy... |
| Search Engine ID (CX) | a1b2c3... |
If you have both, you’re ready.
Paste this in your browser (replace values):
https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=CX&q=hello+google
If it returns JSON → SCCESS
Feel free to contribute and enhance the script. Happy coding!
| Back | FazBrowse Home | New Git URL |