All Projects → joshcarty → Google Searchconsole

joshcarty / Google Searchconsole

Licence: mit
A wrapper for the Google Search Console API.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Google Searchconsole

Devrant
Unofficial wrapper for the public devRant API.
Stars: ✭ 48 (-42.17%)
Mutual labels:  api, api-client
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+12712.05%)
Mutual labels:  api, api-client
Php Quandl
Easy access to the Quandl Data API using PHP
Stars: ✭ 51 (-38.55%)
Mutual labels:  api, api-client
Apipie
Transform api declaration to js object for frontend. Inspired by VueRouter, koa-middleware and axios.
Stars: ✭ 29 (-65.06%)
Mutual labels:  api, api-client
Igdb
Go client for the Internet Game Database API
Stars: ✭ 65 (-21.69%)
Mutual labels:  api, api-client
Bitmovin Python
DEPRECATED: Python client for the Bitmovin API, see https://github.com/bitmovin/bitmovin-api-sdk-python
Stars: ✭ 39 (-53.01%)
Mutual labels:  api-client, analytics
Api Php Client
PHP client of Akeneo PIM API
Stars: ✭ 56 (-32.53%)
Mutual labels:  api, api-client
Genius Php
PHP library for Genius API (http://genius.com/developers)
Stars: ✭ 10 (-87.95%)
Mutual labels:  api, api-client
Slacko
A neat interface for Slack
Stars: ✭ 64 (-22.89%)
Mutual labels:  api, api-client
Redux Api Call
One declarative API to create reducers, action creators and selectors for any API calls
Stars: ✭ 63 (-24.1%)
Mutual labels:  api, api-client
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+41549.4%)
Mutual labels:  api, api-client
Github Traffic
Get the Github traffic for the specified repository
Stars: ✭ 77 (-7.23%)
Mutual labels:  api, analytics
Bitmovin Php
DEPRECATED: PHP client for the Bitmovin API, see https://github.com/bitmovin/bitmovin-api-sdk-php
Stars: ✭ 21 (-74.7%)
Mutual labels:  api-client, analytics
Google Analytics Api Symfony
Google Analytics API Symfony Bundle
Stars: ✭ 43 (-48.19%)
Mutual labels:  api, analytics
Hashapi Lib Node
Tierion Hash API client library for Node.js
Stars: ✭ 20 (-75.9%)
Mutual labels:  api, api-client
Simple Salesforce
A very simple Salesforce.com REST API client for Python
Stars: ✭ 1,072 (+1191.57%)
Mutual labels:  api, api-client
Cortex4py
Python API Client for Cortex
Stars: ✭ 22 (-73.49%)
Mutual labels:  api, api-client
Abclinuxuapi
API for http://abclinuxu.cz.
Stars: ✭ 8 (-90.36%)
Mutual labels:  api, api-client
Data Science Best Resources
Carefully curated resource links for data science in one place
Stars: ✭ 1,104 (+1230.12%)
Mutual labels:  api, analytics
Openvulnapi
Documentation and Tools for Cisco's PSIRT openVuln API
Stars: ✭ 73 (-12.05%)
Mutual labels:  api, api-client

Google Search Console for Python

Build Status License: MIT

google-searchconsole takes the pain out of working with the Google Search Console Search Analytics Query API. It is written in Python and provides convenient features to make querying a site's search analytics data easier.

  • Authentication. We provide a few different ways to make generating credentials and authenticating with your account easier. You can use stored fies as well as a way to do the OAuth2 flow interactively.
  • Querying. Easier to query by date ranges and filter by various dimensions. No longer posting large nested JSON, the query object lets you make complex queries with ease.
  • Exploration. You can traverse your account hierarchy, with an account containing webproperties with clear permission levels.
  • Exports. Clean JSON and pandas.DataFrame outputs so you can easily analyse your data in Python or Excel.

This package is built on top of Google's own API Client and is heavily inspired, from design to implementation, by @debrouwere's fantastic google-analytics package.

Quickstart

First, install the package using:

pip3 install git+https://github.com/joshcarty/google-searchconsole

Then, create a new project in the Google Developers Console, enable the Google Search Console API under "APIs & Services". Next, create credentials for an OAuth client ID, choosing the Other Application type. Download a JSON copy of your client secrets.

After that, executing your first query is as easy as

import searchconsole
account = searchconsole.authenticate(client_config='client_secrets.json')
webproperty = account['https://www.example.com/']
report = webproperty.query.range('today', days=-7).dimension('query').get()
print(report.rows)

The above example will use your client configuration file to interactively generate your credentials.

Saving Credentials

If you wish to save your credentials, to avoid going through the OAuth consent screen in the future, you can specify a path to save them by specifying serialize='path/to/credentials.json.

When you want to authenticate a new account you run:

account = searchconsole.authenticate(client_config='client_secrets.json',
                                     serialize='credentials.json')

Which will save your credentials to a file called credentials.json.

From then on, you can authenticate with:

account = searchconsole.authenticate(client_config='client_secrets.json',
                                     credentials='credentials.json')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].