View as Markdown
Google Search Console icon

Google Search Console ACTION

List Sitemaps

Lists the sitemaps Google Search Console knows about for a property, with their error, warning and freshness state normalized to numbers.

Use for any sitemap question — which are submitted, which have errors or warnings, when Google last downloaded one, how many URLs it contains. Always call it before Delete Sitemap when the user has not named an exact sitemap URL, and after Submit Sitemap or Delete Sitemap to confirm the new state: in both cases leave sitemapUrl empty and look for the path, because a single-path lookup of a deleted or unknown sitemap returns 404.

Not for whether the URLs inside a sitemap are indexed (use Inspect URLs). This tool reports what Google recorded about a sitemap; it does not fetch or parse the XML itself.

Returns { sitemaps: [...], count, summary: { with_errors, with_warnings, pending, never_downloaded } }. path is the full sitemap URL and is the exact string to pass to Submit Sitemap or Delete Sitemap. warnings, errors and submitted_urls are integers here (the raw API returns strings); submitted_urls is the sum of contents[].submitted. isPending: true means Google accepted the sitemap but has not fetched it yet. A sitemap with no lastDownloaded has never been downloaded and is counted in summary.never_downloaded.

Mistakes. Do not guess a sitemap URL — list first and use a path from the result; an unknown path returns 404 "'<url>' is not a submitted or a known sitemap." lastDownloaded can be years old while the sitemap is still valid, so report the date rather than treating it as an error. errors and warnings count sitemap-parsing problems, not indexing problems.

Example. siteUrl="sc-domain:example.com" with no other input returns { count: 3, summary: { with_errors: 1, ... }, sitemaps: [{ path: "https://www.example.com/sitemap.xml", lastDownloaded: "2018-05-06T02:44:10.000Z", errors: 1, warnings: 1, submitted_urls: 2, contents: [{ type: "web", submitted: "2", indexed: "0" }] }, ...] } — so "when was it last downloaded and how many URLs?" is 6 May 2018 and 2 URLs.

See the documentation

  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Google Search Console account once, then configure and run List Sitemaps from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_search_console-list-sitemaps",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_search_console: { authProvisionId: "apn_xxxxxxx" },
    siteUrl: "Property (siteUrl)",
    sitemapUrl: "Sitemap URL",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Sitemaps inputs
Property Type Description
siteUrl Property (siteUrl) string
Exact property identifier from List Sitessc-domain:example.com for a domain property, or a URL-prefix such as https://www.example.com/ (trailing slash; scheme and subdomain must match exactly, or the call 403s). Copy it verbatim, never construct it. For traffic questions prefer the domain property when one exists: it covers all subdomains and protocols.
Required
sitemapUrl Sitemap URL string
Optional. Full URL of one sitemap, to return just that sitemap. Leave empty to list every sitemap for the property. An unknown URL returns 404 "'<url>' is not a submitted or a known sitemap.", so do not use this to check whether a sitemap exists or was deleted — list everything and look for the path.
Optional
sitemapIndex Sitemap Index URL string
Optional. Full URL of a sitemap index, e.g. https://www.example.com/sitemap_index.xml. When set, only the child sitemaps inside that index are listed. Leave empty to list all sitemaps, and never set it together with Sitemap URL (the call fails if both are set). To find an index URL, call this action with no filters and take the path of an entry whose isSitemapsIndex is true.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
google_search_console-list-sitemaps
Version
0.0.1
App
Google Search Console
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes