KosmoKrator

analytics

Google Search Console CLI for AI Agents

Use the Google Search Console CLI from KosmoKrator to call Google Search Console tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write Manual OAuth token auth

Google Search Console CLI Setup

Google Search Console can be configured headlessly with `kosmokrator integrations:configure google-search-console`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google-search-console --set access_token="$GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor google-search-console --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN Secret secret yes Access Token
url GOOGLE_SEARCH_CONSOLE_URL URL url no API Base URL

Call Google Search Console Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call google-search-console.gsc_list_sites '{
  "pageSize": 1,
  "pageToken": "example_pageToken"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:google-search-console gsc_list_sites '{
  "pageSize": 1,
  "pageToken": "example_pageToken"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs google-search-console --json
kosmo integrations:docs google-search-console.gsc_list_sites --json
kosmo integrations:schema google-search-console.gsc_list_sites --json
kosmo integrations:search "Google Search Console" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Google Search Console.

google-search-console.gsc_list_sites

Read read

List all sites the authenticated user has access to in Google Search Console. Returns site URLs and permission levels.

Parameters
pageSize, pageToken

Generic CLI call

kosmo integrations:call google-search-console.gsc_list_sites '{"pageSize":1,"pageToken":"example_pageToken"}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_list_sites '{"pageSize":1,"pageToken":"example_pageToken"}' --json

google-search-console.gsc_get_site

Read read

Get details for a specific site in Google Search Console, including permission level.

Parameters
id

Generic CLI call

kosmo integrations:call google-search-console.gsc_get_site '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_get_site '{"id":"example_id"}' --json

google-search-console.gsc_list_sitemaps

Read read

List sitemaps submitted for a site in Google Search Console. Returns sitemap URLs, types, and indexing status.

Parameters
site_url, pageSize, pageToken, shortUrls

Generic CLI call

kosmo integrations:call google-search-console.gsc_list_sitemaps '{"site_url":"example_site_url","pageSize":1,"pageToken":"example_pageToken","shortUrls":true}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_list_sitemaps '{"site_url":"example_site_url","pageSize":1,"pageToken":"example_pageToken","shortUrls":true}' --json

google-search-console.gsc_get_sitemap

Read read

Get details for a specific sitemap in Google Search Console, including indexing status and any errors.

Parameters
site_url, id

Generic CLI call

kosmo integrations:call google-search-console.gsc_get_sitemap '{"site_url":"example_site_url","id":"example_id"}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_get_sitemap '{"site_url":"example_site_url","id":"example_id"}' --json

google-search-console.gsc_list_search_analytics

Read read

Query search performance data from Google Search Console — clicks, impressions, CTR, and average position. Group by dimensions like query, page, country, or device.

Parameters
site_url, startDate, endDate, dimensions, type

Generic CLI call

kosmo integrations:call google-search-console.gsc_list_search_analytics '{"site_url":"example_site_url","startDate":"example_startDate","endDate":"example_endDate","dimensions":"example_dimensions","type":"example_type"}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_list_search_analytics '{"site_url":"example_site_url","startDate":"example_startDate","endDate":"example_endDate","dimensions":"example_dimensions","type":"example_type"}' --json

google-search-console.gsc_list_url_inspection

Read read

Inspect URLs for a site in Google Search Console. Returns indexing status, crawl information, and any detected issues.

Parameters
site_url, pageToken, limit, inspectionResult

Generic CLI call

kosmo integrations:call google-search-console.gsc_list_url_inspection '{"site_url":"example_site_url","pageToken":"example_pageToken","limit":1,"inspectionResult":"example_inspectionResult"}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_list_url_inspection '{"site_url":"example_site_url","pageToken":"example_pageToken","limit":1,"inspectionResult":"example_inspectionResult"}' --json

google-search-console.gsc_get_current_user

Read read

Get the authenticated user's profile from Google Search Console. Returns email and account information.

Parameters
none

Generic CLI call

kosmo integrations:call google-search-console.gsc_get_current_user '{}' --json

Provider shortcut

kosmo integrations:google-search-console gsc_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google-search-console.gsc_list_sites

List all sites the authenticated user has access to in Google Search Console. Returns site URLs and permission levels.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_list_sites --json
ParameterTypeRequiredDescription
pageSize integer no Maximum number of results per page.
pageToken string no Token for the next page of results, from a previous response.

google-search-console.gsc_get_site

Get details for a specific site in Google Search Console, including permission level.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_get_site --json
ParameterTypeRequiredDescription
id string yes The site URL (e.g., "https://example.com/").

google-search-console.gsc_list_sitemaps

List sitemaps submitted for a site in Google Search Console. Returns sitemap URLs, types, and indexing status.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_list_sitemaps --json
ParameterTypeRequiredDescription
site_url string yes The site URL (e.g., "https://example.com/").
pageSize integer no Maximum number of results per page.
pageToken string no Token for the next page of results, from a previous response.
shortUrls boolean no Whether to return short URLs for sitemaps.

google-search-console.gsc_get_sitemap

Get details for a specific sitemap in Google Search Console, including indexing status and any errors.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_get_sitemap --json
ParameterTypeRequiredDescription
site_url string yes The site URL (e.g., "https://example.com/").
id string yes The sitemap URL or ID (e.g., "https://example.com/sitemap.xml").

google-search-console.gsc_list_search_analytics

Query search performance data from Google Search Console — clicks, impressions, CTR, and average position. Group by dimensions like query, page, country, or device.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_list_search_analytics --json
ParameterTypeRequiredDescription
site_url string yes The site URL (e.g., "https://example.com/").
startDate string yes Start date in YYYY-MM-DD format (e.g., "2025-01-01").
endDate string yes End date in YYYY-MM-DD format (e.g., "2025-01-31").
dimensions array no Dimensions to group results by: "query", "page", "country", "device", "searchAppearance".
type string no Search type filter: "web", "image", "video", or "news". Defaults to "web".

google-search-console.gsc_list_url_inspection

Inspect URLs for a site in Google Search Console. Returns indexing status, crawl information, and any detected issues.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_list_url_inspection --json
ParameterTypeRequiredDescription
site_url string yes The site URL (e.g., "https://example.com/").
pageToken string no Token for the next page of results, from a previous response.
limit integer no Maximum number of URL inspection results to return.
inspectionResult string no Filter by inspection result status (e.g., "PASS", "FAIL", "WARNING").

google-search-console.gsc_get_current_user

Get the authenticated user's profile from Google Search Console. Returns email and account information.

Operation
Read read
Schema command
kosmo integrations:schema google-search-console.gsc_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.