This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import requests | |
import csv | |
import json | |
import re | |
URL = "https://example.com" | |
API_KEY = '' | |
request_url = "https://ssl.bing.com/webmaster/api.svc/json/GetQueryStats?apikey={}&siteUrl={}".format(API_KEY, URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## A script to retrieve Google Search Console data for the last 90 days and plot a graph for CTR% | |
## It will retrieve the data from the Google Search Console API and make sure that it can be plotted for a visual graph | |
## Version 2: March 1, 2019 | |
## Author: Martijn Scheijbeler (https://www.martijnscheijbeler.com) | |
## All credits go to Mark Edmondson for creating: https://github.com/MarkEdmondson1234/searchConsoleR & https://code.markedmondson.me/search-console-google-analytics-r-keyword-research/ | |
## Load the required libraries: googleAuthR, searchConsoleR, dplyr, ggplot2 | |
## (Download them with install.packages("googleAuthR"), install.packages("searchConsoleR"), install.packages("dplyr") and install.packages("ggplot2") if necessary |