This example uses a Google Service Account to fetch Search Console data using the Google API Python client (google-api-python-client
).
Authorization documentation: https://developers.google.com/identity/protocols/oauth2/service-account#authorizingrequests
Search Console API quickstart: https://developers.google.com/webmaster-tools/v1/quickstart/quickstart-python#modifications
Make sure to add the service account email to the Search Console property (https://search.google.com/search-console/users).