analytics
Google Search Console Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Google Search Console KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.google_search_console.*.
Use lua_read_doc("integrations.google-search-console") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Google Search Console workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.google_search_console.sitemaps_list({}))' --json kosmo integrations:lua --eval 'print(docs.read("google-search-console"))' --json
kosmo integrations:lua --eval 'print(docs.read("google-search-console.sitemaps_list"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local google_search_console = app.integrations.google_search_console
local result = google_search_console.sitemaps_list({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.google_search_console, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.google_search_console.default.* or app.integrations.google_search_console.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Google Search Console, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Google Search Console
Google Search Console tools are exposed under app.integrations.google_search_console. This package is generated from Google’s official Search Console API v1 Discovery document and exposes 11 REST methods.
Coverage
- Source:
https://searchconsole.googleapis.com/$discovery/rest?version=v1 - Read tools: 4
- Write tools: 7
- Base URL:
https://searchconsole.googleapis.com
Usage Notes
Pass siteUrl and feedpath exactly as Search Console expects them; the integration URL-encodes path values such as https://example.com/. Query parameters can be passed as top-level shortcuts or inside query. Search analytics, URL inspection, and mobile friendly test methods accept the official JSON request object inside body.
Tools
google_search_console_sitemaps_list- GET /webmasters/v3/sites/{siteUrl}/sitemapsgoogle_search_console_sitemaps_submit- PUT /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}google_search_console_sitemaps_delete- DELETE /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}google_search_console_sitemaps_get- GET /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}google_search_console_url_inspection_index_inspect- POST /v1/urlInspection/index:inspectgoogle_search_console_sites_list- GET /webmasters/v3/sitesgoogle_search_console_sites_add- PUT /webmasters/v3/sites/{siteUrl}google_search_console_sites_get- GET /webmasters/v3/sites/{siteUrl}google_search_console_sites_delete- DELETE /webmasters/v3/sites/{siteUrl}google_search_console_url_testing_tools_mobile_friendly_test_run- POST /v1/urlTestingTools/mobileFriendlyTest:rungoogle_search_console_searchanalytics_query- POST /webmasters/v3/sites/{siteUrl}/searchAnalytics/query
Examples
local sites = app.integrations.google_search_console.google_search_console_sites_list({})
local rows = app.integrations.google_search_console.google_search_console_searchanalytics_query({
siteUrl = "https://example.com/",
body = { startDate = "2026-05-01", endDate = "2026-05-06", dimensions = { "query" } }
})
Responses are decoded Google Search Console JSON responses, or { success = true, status = ... } for successful empty responses.
Raw agent markdown
# Google Search Console
Google Search Console tools are exposed under `app.integrations.google_search_console`. This package is generated from Google's official Search Console API v1 Discovery document and exposes 11 REST methods.
## Coverage
- Source: `https://searchconsole.googleapis.com/$discovery/rest?version=v1`
- Read tools: 4
- Write tools: 7
- Base URL: `https://searchconsole.googleapis.com`
## Usage Notes
Pass `siteUrl` and `feedpath` exactly as Search Console expects them; the integration URL-encodes path values such as `https://example.com/`. Query parameters can be passed as top-level shortcuts or inside `query`. Search analytics, URL inspection, and mobile friendly test methods accept the official JSON request object inside `body`.
## Tools
- `google_search_console_sitemaps_list` - GET /webmasters/v3/sites/{siteUrl}/sitemaps
- `google_search_console_sitemaps_submit` - PUT /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
- `google_search_console_sitemaps_delete` - DELETE /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
- `google_search_console_sitemaps_get` - GET /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
- `google_search_console_url_inspection_index_inspect` - POST /v1/urlInspection/index:inspect
- `google_search_console_sites_list` - GET /webmasters/v3/sites
- `google_search_console_sites_add` - PUT /webmasters/v3/sites/{siteUrl}
- `google_search_console_sites_get` - GET /webmasters/v3/sites/{siteUrl}
- `google_search_console_sites_delete` - DELETE /webmasters/v3/sites/{siteUrl}
- `google_search_console_url_testing_tools_mobile_friendly_test_run` - POST /v1/urlTestingTools/mobileFriendlyTest:run
- `google_search_console_searchanalytics_query` - POST /webmasters/v3/sites/{siteUrl}/searchAnalytics/query
## Examples
```lua
local sites = app.integrations.google_search_console.google_search_console_sites_list({})
local rows = app.integrations.google_search_console.google_search_console_searchanalytics_query({
siteUrl = "https://example.com/",
body = { startDate = "2026-05-01", endDate = "2026-05-06", dimensions = { "query" } }
})
```
Responses are decoded Google Search Console JSON responses, or `{ success = true, status = ... }` for successful empty responses. local result = app.integrations.google_search_console.sitemaps_list({})
print(result) Functions
sitemaps_list Read
Sitemaps List (GET /webmasters/v3/sites/{siteUrl}/sitemaps).
- Lua path
app.integrations.google_search_console.sitemaps_list- Full name
google-search-console.google_search_console_sitemaps_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sitemaps_submit Write
Sitemaps Submit (PUT /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}).
- Lua path
app.integrations.google_search_console.sitemaps_submit- Full name
google-search-console.google_search_console_sitemaps_submit
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sitemaps_delete Write
Sitemaps Delete (DELETE /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}).
- Lua path
app.integrations.google_search_console.sitemaps_delete- Full name
google-search-console.google_search_console_sitemaps_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sitemaps_get Read
Sitemaps Get (GET /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}).
- Lua path
app.integrations.google_search_console.sitemaps_get- Full name
google-search-console.google_search_console_sitemaps_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
url_inspection_index_inspect Write
Url Inspection Index Inspect (POST /v1/urlInspection/index:inspect).
- Lua path
app.integrations.google_search_console.url_inspection_index_inspect- Full name
google-search-console.google_search_console_url_inspection_index_inspect
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sites_list Read
Sites List (GET /webmasters/v3/sites).
- Lua path
app.integrations.google_search_console.sites_list- Full name
google-search-console.google_search_console_sites_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sites_add Write
Sites Add (PUT /webmasters/v3/sites/{siteUrl}).
- Lua path
app.integrations.google_search_console.sites_add- Full name
google-search-console.google_search_console_sites_add
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sites_get Read
Sites Get (GET /webmasters/v3/sites/{siteUrl}).
- Lua path
app.integrations.google_search_console.sites_get- Full name
google-search-console.google_search_console_sites_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
sites_delete Write
Sites Delete (DELETE /webmasters/v3/sites/{siteUrl}).
- Lua path
app.integrations.google_search_console.sites_delete- Full name
google-search-console.google_search_console_sites_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
url_testing_tools_mobile_friendly_test_run Write
Url Testing Tools Mobile Friendly Test Run (POST /v1/urlTestingTools/mobileFriendlyTest:run).
- Lua path
app.integrations.google_search_console.url_testing_tools_mobile_friendly_test_run- Full name
google-search-console.google_search_console_url_testing_tools_mobile_friendly_test_run
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
searchanalytics_query Write
Searchanalytics Query (POST /webmasters/v3/sites/{siteUrl}/searchAnalytics/query).
- Lua path
app.integrations.google_search_console.searchanalytics_query- Full name
google-search-console.google_search_console_searchanalytics_query
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||