Download Search Queries Data Using Python Script in Google Webmaster Tools
Google Webmaster tools now allows access to “search queries” data. Using a open source Python script from the webmaster-tools-downloads project, you can now dowload the data in CSV format.
“Search queries data is not currently available via the Webmaster Tools API, which has been a common API user request that we’re considering for the next API update,” notes Jonathan Simon, Webmaster Trends Analyst.
“You could easily configure these scripts to be run daily or monthly to archive and view your search queries data across larger date ranges than the current one month of data that is available in Webmaster Tools, for example, by setting up a cron job or using Windows Task Scheduler,” explains Simon.
Simon notes that the following script example includes user name and password credentials within the script itself. If you plan to run this in a production environment you should follow security best practices like using encrypted user credentials retrieved from a secure data storage source. The script itself uses HTTPS to communicate with the API to protect these credentials.
For those, need access to search queries data right now, here are two ways to get the data:
If you just want to download your search queries data in a .csv file without uploading the data to a Google spreadsheet use example-simple-download.py.
For, downloading search queries data and uploading it to a Google Spreadsheet in Google Docs, you can use the search queries downloader Python script example-create-spreadsheet.py as shown in the example below:
- “If Python is not already installed on your machine, download and install Python.
- Download and install the Google Data APIs Python Client Library.
- Create a folder and add the downloader.py script to the newly created folder.
- Copy the example-create-spreadsheet.py script to the same folder as downloader.py and edit it to replace the example values for “website,” “email” and “password” with valid values for your Webmaster Tools verified site.
- Open a Terminal window and run the example-create-spreadsheet.py script by entering “python example-create-spreadsheet.py” at the Terminal window command line:
python example-create-spreadsheet.py
- Visit Google Docs to see a new spreadsheet containing your search queries data,” explaind Simon.
Source:
Anyone can join.
Anyone can contribute.
Anyone can become informed about their world.
"United We Stand" Click Here To Create Your Personal Citizen Journalist Account Today, Be Sure To Invite Your Friends.
Please Help Support BeforeitsNews by trying our Natural Health Products below!
Order by Phone at 888-809-8385 or online at https://mitocopper.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomic.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomics.com M - F 9am to 5pm EST
Humic & Fulvic Trace Minerals Complex - Nature's most important supplement! Vivid Dreams again!
HNEX HydroNano EXtracellular Water - Improve immune system health and reduce inflammation.
Ultimate Clinical Potency Curcumin - Natural pain relief, reduce inflammation and so much more.
MitoCopper - Bioavailable Copper destroys pathogens and gives you more energy. (See Blood Video)
Oxy Powder - Natural Colon Cleanser! Cleans out toxic buildup with oxygen!
Nascent Iodine - Promotes detoxification, mental focus and thyroid health.
Smart Meter Cover - Reduces Smart Meter radiation by 96%! (See Video).