We are going to use the service

In order to extract data from Search Console for a given property programmatically, we ne a user to give access to that property. In this case,  account that we creat at the beginning and for which we not the email address associat with that service account.

To do this, and having select

A property in the Search Console web interface, we click on the option mark Settings .Once we are present with the different options within the settings menu, we will select the option mark Users and permissions .It should be not that we will only have access to this option if the user with whom we access the Search Console web interface moj database has the appropriate permissions. Otherwise, we will have to review them (or ask them to do so for us, if the property belongs to a third party).

 

special data

Next, we click on the button mark

ADD USER .In the form below, we will enter the email address associat with the service account we not at the beginning and select the necessary permissions. In this specific case, and since we are only going to extract data, the necessary custom solutions for diverse needs permissions are the minimum applicable. Therefore, we will choose the option mark as Restrict , which gives us read access to the data (all we ne for this guide). Finally, we will click on the button mark ADD and with this we will have access grant to the service account to extract data from Search Console.

API Client for Python

To extract data from Search Console we use the official Google client for Python, whose identifier in PyPi (the official third-party repository for Python packages) is google-api-python-client . We can install the library using the pip command or by including tg data the library in the requirements.txt file and, again, installing (or updating) the dependencies with the pip command.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top