https://github.com/capjamesg/google-indexing-api

Use the Google Indexing API to submit URLs for indexing to Google Search.

https://github.com/capjamesg/google-indexing-api

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.4%) to scientific vocabulary

Keywords

google-indexing-api google-search seo
Last synced: 9 months ago · JSON representation

Repository

Use the Google Indexing API to submit URLs for indexing to Google Search.

Basic Info
  • Host: GitHub
  • Owner: capjamesg
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 8.79 KB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
google-indexing-api google-search seo
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.md

google-indexing-api

Use the Google Indexing API to submit URLs for indexing to Google Search.

This tool lets you provide a sitemap and send URLs that match any regexes you provide for indexing using the Google Indexing API.

To use this project, first clone this repository and install the required dependencies:

git clone https://github.com/capjamesg/google-indexing-api cd google-indexing-api/ pip3 install -r requirements.txt

Then, update the following values in app.py:

SITEMAP = "https://example.com/sitemap.xml" # the sitemap to crawl MATCHING_REGEXES = [r"/posts/"] # the regexes of paths you want to crawl REQUEST_TYPE = "URL_UPDATED" # request type: either URL_UPDATED or URL_DELETED

Then, create a Service Account in Google Cloud. Grant access to the Google Indexing API to the Service Account.

Issue OAuth credentials for your Service Account and save them to a file called secret.json that is in the same folder as the app.py file.

Next, invite the email for your service account to your Google Search Console instance.

Now, you can run the script to request indexing of URLs:

python3 app.py

At the time of writing this script, Google allows 200 requests per day.

License

This project is licensed under an MIT license.

Owner

  • Name: James
  • Login: capjamesg
  • Kind: user
  • Location: Scotland
  • Company: @Roboflow

from words, wonder.

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • getsitemap *
  • google-api-python-client *