https://github.com/jtemporal/scrap-query-data-google-api
https://github.com/jtemporal/scrap-query-data-google-api
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jtemporal/scrap-query-data-google-api
- Owner: jtemporal
- Created: 2021-05-01T00:01:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-01T00:07:34.000Z (about 5 years ago)
- Last Synced: 2025-11-27T16:59:49.576Z (6 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Finding the top Queries for websites
## Google Search Console API configuration
### Step 1: Activating The API
Activate the API via the [API library here](https://console.cloud.google.com/apis/library/searchconsole.googleapis.com).
Notice the project selected, you might want to create an project just for this. 😉
TK video 01
### Step 2: Configure OAuth
After activating it you'll need to configure the OAuth for that project.
To do this follow along with video bellow:
TK video 02
### Step 3: Create Your credentials
Then you have to create a client ID and client secret. To keep track of those info you'll need create a secrets file named `client_secrets.json` with the contents in [the file available here](https://github.com/googleapis/google-api-python-client/blob/master/samples/searchconsole/client_secrets.json).
Here's how you can get the ID and secret:
TK video 03
## Creating The Python Env
Use Python 3.8.2
```
python3 -m venv .env
source .env/bin/activate
pip install -U pip
pip install -r requirements.txt
```
## Running
Run:
```
python app.py 'https://example.com/sitemap.xml' '2021-04-01' '2021-04-28'
```