List Google Search Console sitemaps
Automatically list Google Search Console sitemaps on search.google.com. Lists the sitemaps submitted for a Google Search Console property, with when each was submitted and last read, its fetch status, and how many pages and videos Google discovered in it. Takes the property as listed by search.google.com/list_properties.
Input
siteUrl requiredThe property, exactly as search.google.com/list_properties returns it: a URL prefix such as https://example.com/ or sc-domain:example.com.
account optionalWhich of the browser's signed-in Google accounts to act as, by its number from mail.google.com/list_accounts. Default 0, the browser's first account.
Default: 0Output
siteUrl requiredsitemaps requiredSubmitted sitemaps, as in the Sitemaps report. Empty when none have been submitted.
FAQ
Inspect a URL in Google Search Console
Run Google Search Console's URL Inspection for one page of a property and return what Google's index holds for it: whether the URL is on Google, its coverage state as Search Console names it (for example submitted_and_indexed, crawled_currently_not_indexed, url_unknown), when Google last crawled it, the sitemaps that list it, the pages that link to it, and the canonical the page declares. Lists are empty and the last crawl is null when Google has none. Takes the property as search.google.com/list_properties returns it, and the Google account to act as, by its number from mail.google.com/list_accounts. A URL outside the property, or an account that cannot open it, fails with a message that says so.
Request indexing of a URL in Google Search Console
Ask Google to crawl and index one page of a Search Console property, as URL Inspection's Request indexing does, and return Google's answer. Google first tests the page live: when the test finds an issue (for example the page answers 404), the request is rejected and `liveCoverageState` says why; otherwise Google adds the URL to its priority crawl queue. Accepted means queued, not indexed: check later with search.google.com/inspect_url. Takes 20 seconds to about 3 minutes. Google takes a limited number of requests a day per property; past it, the script fails with a message that says so. Takes the property as search.google.com/list_properties returns it, and the Google account to act as, by its number from mail.google.com/list_accounts. A URL outside the property, or an account that cannot open it, fails with a message that says so.
List Google Search Console properties
Lists every Google Search Console property the signed-in Google account can open, both website (URL prefix) and Domain properties, with the account they were read from. Returns an empty list for an account with no properties. Pass a property's siteUrl to the other Search Console scripts. A signed-out browser fails with a signed-out error asking to sign in to Google.
