Google Indexing API Bulk URL Submission avatar
Google Indexing API Bulk URL Submission

Pricing

$30.00/month + usage

Go to Store
Google Indexing API Bulk URL Submission

Google Indexing API Bulk URL Submission

Developed by

Mohamed Moo

Mohamed Moo

Maintained by Community

This Actor allows you to submit multiple URLs for indexing in bulk through Google's Indexing API. It avoids the need to manually request each URL to be indexed via the Google Search Console interface. With this tool, you can quickly submit up to 100 URLs at once.

0.0 (0)

Pricing

$30.00/month + usage

0

Total users

1

Monthly users

1

Last modified

20 days ago

Google Indexing API Bulk URL Submission - Apify Actor

Getting Started

This script allows you to submit multiple URLs for indexing in bulk through Google's Indexing API. It avoids the need to manually request each URL to be indexed via the Google Search Console interface. With this tool, you can quickly submit up to 100 URLs at once.

How to run the actor on Apify

  1. Ensure you have access to Apify platform and an active Apify account.
  2. Create a new Apify actor or use an existing one.
  3. Upload the service_account.json file, which contains your Google service account credentials.
  4. Provide a list of URLs either through a urls.txt file or by using a sitemapUrl input.
  5. IF there's more than 100 URL. MAke sure you've increased your Gogole Web Search Indexing API quota limit 'Publish requests' and limit 'Publish requests per day'. the default is 200 by Google.
  6. Ensure you have verified your website ownership in Google Search Console.
  7. Run the actor. The actor will submit URLs in bulk to Google's Indexing API.

Once the actor completes execution, it will log the submission results and push them to the Apify dataset.

What the actor does and why it is helpful

What it does:

This actor automates the process of submitting multiple URLs for indexing using Google's Indexing API. Normally, Google allows only one URL to be submitted at a time through its Search Console interface. This actor enables you to submit up to 100 URLs in a single batch request, thus saving you time and effort when you need to index large numbers of pages.

Why it's helpful:

Google's Indexing API is typically used to notify Google when new or updated content is available on your site. It is particularly useful for quick content updates, especially for pages like news articles, job listings, or product pages. This script is designed to streamline the process of submitting URLs, bypassing the manual submission process in Search Console.

Who should use this actor:

This tool is ideal for:

  • Website owners or webmasters who need to quickly index large numbers of URLs (e.g., news websites, e-commerce sites, blogs).
  • SEO professionals looking to improve search engine visibility by efficiently indexing new or updated content.
  • Developers who need to automate the URL indexing process for sites with frequent content updates.

Input required to run the actor

The actor requires the following inputs:

  1. service_account (Required): Your Google service account JSON file that contains credentials for using the Indexing API.

    • Example: "service_account": "YOUR_JSON_CREDENTIALS_HERE"
  2. urlsTxt (Required, one of urlsTxt or sitemapUrl): A plain text file containing the URLs that you want to be indexed. Each URL should be on a separate line.

    • Example: "urlsTxt": "https://example.com/page1 https://example.com/page2"
  3. sitemapUrl (Optional, one of urlsTxt or sitemapUrl): A URL pointing to a sitemap XML file that contains the URLs you want to index.

    • Example: "sitemapUrl": "https://example.com/sitemap.xml"

How the Google Indexing API works

Google allows you to submit URLs for indexing individually via the Search Console interface. However, with the Google Indexing API, you can submit URLs in bulk by sending them to Google's servers in a single request. The API is subject to quotas:

  • By default, Only 200 URLs can be submitted per request batch daily.
  • You are allowed to submit a maximum of 200 URLs per day.
  • For submitting more URLs, Submit a quota increase request from Google Web Search Indexing API 'Publish requests' and limit 'Publish requests per day'.

This script uses the Indexing API to send up to 2000 URLs at once, and it ensures that your URLs are submitted efficiently and within these limits.

Setting up the Google Indexing API

First, set up access to the Indexing API in Google Cloud Platform

Follow these instructions to set up access to the Google Indexing API:

  1. Go to the Google Indexing API setup page.
  2. Create a new project in Google Cloud Console.
  3. Enable the Indexing API for your project.
  4. Download the JSON credentials file containing your service account information.

Save the file as service_account.json and upload it to Apify.

Verify Site Ownership in Google Search Console

To submit URLs for indexing, you must verify ownership of the site in Google Search Console:

  1. Go to Google Search Console.
  2. Select your property and navigate to "Settings" -> "Users and Permissions."
  3. Add the service account email address (from service_account.json) as an owner.

The service account email is found in the client_email field in your JSON key, and it should look something like:

"client_email": "my-service-account@test-project-xx.google.com.iam.gserviceaccount.com"
  1. Add this email as an owner (delegated) to your Google Search Console property.

Quotas

Google imposes limits on how many URLs you can submit for indexing:

  • 100 URLs per request batch: You can submit up to 100 URLs in a single request.
  • 200 URLs per day: You can submit up to 200 URLs in total per day.
  • For submitting more URLs, Submit a quota increase request from Google Web Search Indexing API 'Publish requests' and limit 'Publish requests per day'.

Ensure you stay within these quotas when using the API.

Sample INPUT for Running the Actor

Example of service_account:

{
"service_account": "{"type": "service_account", "project_id": "my-project-id", "private_key_id": "abc123", "private_key": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----", "client_email": "my-service-account@my-project-id.iam.gserviceaccount.com", "client_id": "1234567890.apps.googleusercontent.com", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleap...
}

Example of urlsTxt:

https://example.com/page1
https://example.com/page2
https://example.com/page3

Example of sitemapUrl:

{
"sitemapUrl": "https://example.com/sitemap.xml"
}

Example Output

Successful Response:

{
"url": "https://example.com/page1",
"submitted": true,
"success": true,
"failureReason": "",
"rawResponse": "HTTP/1.1 200 OK
Content-Type: application/json
..."
}

Failed Response:

{
"url": "https://example.com/page2",
"submitted": true,
"success": false,
"failureReason": "429 Quota exceeded for quota metric 'Publish requests'",
"rawResponse": "HTTP/1.1 429 Too Many Requests
Content-Type: application/json
..."
}

Conclusion

This script makes it easy to submit multiple URLs for indexing using Google's Indexing API. Instead of submitting URLs one by one via the Search Console, you can automate the entire process and handle batches of up to 2000 URLs at once. This can save you valuable time and make it easier to keep your content indexed and updated in Google's search results.

Good luck and happy indexing!!