
In this tutorial, we will learn how to Get Google Page Ranking in Python using the google library. Using this method, you can easily get the ranking of any website in google search results for any keyword. Using this python program, you can save a lot of time if you want to manually try the same, you will need to click many times and will need to search for the website manually which is a headache task.
We will need google library, to install it, type the below command in your terminal:
pip install google
Everything is pretty simple, we need to import the library and need to give some parameters like query and website name. We have explained everything using comments, let’s start:-
Code to Get Google Page Ranking in Python:
# importing library
from googlesearch import search
# enter website name
website = input('Enter website: ')
# enter query
query = input('Enter query: ')
# initilazing index=0
index = 0
# search will return an object containing
# all url from google search results
# here, tid is top level domain,
# stop means how many search results you want
# stop=100 means we will get top 100 results from google
for i in search(query, tld="com", num=10, stop=100, pause=2):
# checking website in results
if website in i:
# printing index of website and url
print(index+1, i)
index += 1Output1:
Enter website: copyassignment
Enter query: python projects for resume
Website rank is: 1
URL is: https://copyassignment.com/20-python-projects-for-resume/
Check the below screenshot as proof:

Output2:
Enter website: copyassignment
Enter query: python oop projects
Website rank is: 1
URL is: https://copyassignment.com/python-oop-projects-source-code-and-example/
Check the below screenshot as proof:

There are some other ways to check the ranking of a website in google search results using Python, we are giving links to the best articles.
- with requests and urllib libraries(you will need google API for this method), link-> How to Get Google Page Ranking in Python
- with requests and beautifulSoup libraries, link-> How to get Rank of the page in google search results using BeautifulSoup?
Also Read:
- You Can Now Run AI Fully Offline on Your Phone — Google’s Gemma 4 Just Changed Everything
- I Built a 24×7 AI Blogging System for WordPress Using Python (Free) — Full Code Inside
- This Reddit User “Hacked” AI With Simple Tricks… And The Results Are Insane
- One “rm -rf” Command Almost Wiped Out $100 Million Worth of Toy Story 2
- How to Make Money with ChatGPT in 2026: A Real Guide That Still Works
- PicoClaw vs OpenClaw: The Tiny AI That Could Replace Powerful AI Agents
- Oracle Layoffs 2026: People Woke Up to an Email… and Lost Their Jobs Instantly
- X’s New Video Update Is Breaking a Basic Feature — And Users Are Not Happy
- The Most Shocking Military Tech Yet: Robot Soldiers That Could Change Warfare Forever
- Sora Shutdown: The Reality Check That Shook AI Video — And What Comes Next
- Aya Expanse supports multiple languages for diverse global applications
- Alibaba releases Page Agent on GitHub for public access
- Google Sheets Gemini reaches new levels of performance and accuracy
- Artificial intelligence boosts cardiac care in rural Australian communities
- NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments
- Google DeepMind Updates Satellite Embedding Dataset with 2025 Data
- Enhancing hierarchical instruction in advanced large language models
- Meta supports community development near its data centers through grants
- Exploring the world of underwater robotics through coding techniques
- ABB Robotics partners with NVIDIA for large scale physical AI solutions
- Why All AI Models Are Slowly Becoming the Same Model
- Aam Aadmi vs Corrupt System: How ChatGPT Helped One Guy Expose Govt Fraud, The Story: “Ravi and The Missing Light Pole”
- ChatGPT Asked a person to commit suicide to solve the problem
- Viral Moment: China’s AgiBot X2 Makes History With World’s First Webster Backflip
- Terminator Rising: Albania Hands Power to AI, Echoing a Nightmare of Human Extinction
- What Is Albania’s World-First AI-Generated Minister and How Does It Work?
- Does ChatGPT believe in God? ChatGPT’s Personal Opinion
- ChatGPT vs Human: The Breath-Holding Chat That Ends in “System Failure”
- What Is Vibe Coding? The Future of No-Code Programming and Its Impact on Software Developers
- Struggling to Generate Ghibli-Style AI Images? Here’s the Real Working Tool That Others Won’t Tell You About!


