Share
Embed
Using Python to create 1000 GSC properties in 3 seconds! BrightonSEO Oct. 2024
Saji
October 03, 2024
Transcript
62 slides
-
Using Python to create 1000 GSC properties in 3 seconds!
Sajjad Azizzadehfahimi Senior SEO Manager Speakerdeck.com/saji @sajjad-azizzadeh-fahimi Mastodon.social/@sajjeo -
#brightonseo S A J J A D A Z I
Z Z A D E H F A H I M I -
#brightonseo S A J J A D A Z I
Z Z A D E H F A H I M I -
#brightonseo S A J J A D A Z I
Z Z A D E H F A H I M I Saji -
• Why do you need to have more properties in
GSC? • What is the best way to create more properties? • Step-by-step guide on implementing Python basics • How can it help to pull out more data from GSC? • The more data you get, the more options you have. -
#brightonseo Search Engine Roundtable Google Search Console Only Shows 35%
Of Your Data! It Depends, Says Google. -
Test #1 Which of these examples provides the most accurate
data for this page example.com/page ? a. GSC filtering feature in the main property (e.g Property: example.com) b. Separated property for /page (e.g. Property: example.com/page) c. Both options a & b are giving the same result a b -
Test #1 Which of these examples provides the most accurate
data for this page example.com/page ? a. GSC filtering feature in the main property (e.g Property: example.com) b. Separated property for /page (e.g. Property: example.com/page) c. Both options a & b are giving the same result a b -
Search Console API Main problem 2,000 URL requests per day
on each the “Property” -
Why Use Python in GSC? Advantages of Python - Easy
to learn and use - Extensive libraries and frameworks - Strong community support - Ideal for automation tasks Get rid of Manual works -
#brightonseo You’ve been asked to Add 100 URLs And verify
in GSC Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo GSC list to verify • https://www.example.com/1 • https://www.example.com/2 •
https://www.example.com/3 • https://www.example.com/4 • https://www.example.com/5 • https://www.example.com/6 • https://www.example.com/7 • https://www.example.com/8 • https://www.example.com/9 • https://www.example.com/10 • https://www.example.com/11 • https://www.example.com/12 • https://www.example.com/13 • https://www.example.com/14 Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo Install Python Install Python from here: https://www.python.org/dow nloads/ Python
Installation Install the Required Libraries Google Cloud Account (API Calls) pip installation -
#brightonseo Check if installed Check Python Version Installed version Python
Installation Install the Required Libraries Google Cloud Account (API Calls) pip installation -
#brightonseo Install pip Install pip from here: https://pip.pypa.io/en/stable/installation/ Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation -
#brightonseo Install Required Libraries Required Libraries: • google-api-python-client • google-auth-httplib2
• Google-auth-oauthlib pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib Terminal code Python Installation Install the Required Libraries Google Cloud Account (API Calls) pip installation -
#brightonseo Verify installation Python Installation Install the Required Libraries Google
Cloud Account (API Calls) pip installation Required Libraries: • google-api-python-client • google-auth-httplib2 • Google-auth-oauthlib pip show google-api-python-client pip show google-auth-httplib2 pip show google-auth-oauthlib Terminal code -
#brightonseo Create a new project in Google Cloud Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 APIs and Services -> Enable APIs and Services 2 Enable “Google Search Console API” 3 Create OAuth consent screen & OAuth client ID 4 Download OAuth client secret JSON file 5 Google Cloud Account -
#brightonseo Create a new project in Google Cloud Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 Google Cloud Account -
#brightonseo Create a new project in Google Cloud Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 APIs and Services -> Enable APIs and Services 2 Google Cloud Account -
#brightonseo Create a new project in Google Cloud Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 APIs and Services -> Enable APIs and Services 2 Enable “Google Search Console API” 3 Google Cloud Account -
#brightonseo Create a new project in Google Cloud Python Installation
Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 APIs and Services -> Enable APIs and Services 2 Enable “Google Search Console API” 3 Create OAuth consent screen & OAuth client ID 4 Google Cloud Account -
#brightonseo Create a new project in Google Cloud Google Cloud
Account Python Installation Install the Required Libraries Google Cloud Account (API Calls) pip installation 1 APIs and Services -> Enable APIs and Services 2 Enable “Google Search Console API” 3 Create OAuth consent screen & OAuth client ID 4 Download OAuth client secret JSON file 5 -
Test #2 What is the Daily limit of GSC API
requests? a. 100 b. 500 c. 2,000 d. No daily limit Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
Test #2 What is the Daily limit of GSC API
requests? a. 100 b. 500 c. 2,000 d. No daily limit Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo Verifying GSC properties with Python Authentica tion List of
URLs to add & verify in GSC Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo Verifying GSC properties with Python Then add these lines
in your Terminal: 1. cd /Users/saji/Desktop/PythonGSC/ (location of Python file) 2. python3 add_properties.py (calling Python file we created in last slide) cd /Users/saji/Desktop/PythonGSC/ python3 add_properties.py Terminal code -
Hypothetical Situation Consider a website with this structure: 1. Example.com/products/
a. Number of pages under /products/ = 2,000 2. Example.com/blog/ a. Number of pages under /blog/ = 2,000 3. Example.com/pcp/ a. Number of pages under /pcp/ = 2,000 -
Test #3 How many GSC property per account? a. 200
b. 1,000 c. 650 d. No limit Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
Test #3 How many GSC property per account? a. 200
b. 1,000 c. 650 d. No limit Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo • Request index in bulk with Indexing API •
Create as many properties as you want in GSC (1,000 uplimit/account) • Use vast amount of daily GSC internal data (up to 2,000,000 daily requests) Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
#brightonseo • Have history of issues in page level (Crawled
but not indexed and etc.) • Export Server Log File and crawl the pages with the most crawl requests from Bots Mastodon.social/@sajjeo Linkedin: sajjad-azizzadeh-fahimi -
All the best! You can get the step-by-step guideline from
here Speakerdeck.com/saji @sajjad-azizzadeh-fahimi Mastodon.social/@sajjeo THANKS