How to easily find your website rank in Google for a specific keyword with Python and Docker

Ömer KARABACAK
2 min readApr 20, 2020

Google Rank Finder (GRF) (SEO — Page Rank)

What is this?

This is a simple script which helps you to find your rank in Google in a specific search term. It can be helpful for your SEO journey. There are couple of parameters you can pass through the command line.

Sometimes finding correct Python version or downloading dependencies could be a problem so I have created Docker image which you can quickly run it from command line.

What are these arguments

search_keyword: Search term

country: Country or region to focus the search on. Similar to changing the TLD, but does not yield exactly the same results. Only Google knows why…

tld: Top level domain.

lang: Language.

num: Number of results per page.

stop: Last result to retrieve. Use None to keep searching forever.

pause: Lapse to wait between HTTP requests. A lapse too long will make the search slow, but a lapse too short may cause Google to block your IP.

Usage : python3 grf.py <search_keyword> <country> <tld> <lang> <num> <stop> <pause>

How to run it?

How to run with Docker?

There are 2 options. You can build your Docker image with Dockerfile or use ready public Docker image from Docker Hub.

Option 1: Build your own Docker image and use it

Build Docker image:

docker build -t grf:1.0 .

Run with built local Docker image:

docker run --rm grf:1.0 "<keywords>" Turkey com.tr tr 50 99 3 | grep <your_website>

Option 2: Use public Docker image…

--

--