Skip to content
One API for Agents
Available

Google Search Console

Clicks, impressions, queries, URL inspection and sitemaps.

Google Search Console reports how a site performs in Google Search: which queries show it, which pages get clicks, and whether Google can crawl and index each URL. One API for Agents calls the Search Console API on your behalf with read-only access.

Provider id
gsc
Auth
Sign in with Google or Microsoft (OAuth), Service account
Scopes
webmasters.readonly read-only
Endpoints
6 raw · 2 smart tools
Schemas
GET /v1/providers/gsc
Markdown
/providers/gsc.md

Smart tools

Curated calls with compact output for agents. Over MCP each one is a tool with the same name; over REST, pass it as tool.

gsc_top_queries

Top search queries by clicks for a property over the last N days.

Name Type Notes
siteUrl required string Property, e.g. "sc-domain:example.com" or "https://example.com/"
days integer How many days back from the latest available data default 28 · 1–480
limit integer Maximum rows to return default 25 · 1–1000
page string (uri) Only queries that led to this page
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "tool": "gsc_top_queries",
    "input": {
      "siteUrl": "sc-domain:example.com",
      "days": 28,
      "limit": 10
    }
  }'
MCP tool call
{
  "tool": "gsc_top_queries",
  "arguments": {
    "siteUrl": "sc-domain:example.com",
    "days": 28,
    "limit": 10
  }
}

gsc_quick_wins

Queries ranking just off page one (default positions 8–20) with meaningful impressions, sorted by impressions.

Name Type Notes
siteUrl required string Property, e.g. "sc-domain:example.com" or "https://example.com/"
days integer How many days back from the latest available data default 28 · 1–480
minImpressions integer default 100 · ≥ 0
minPosition number default 8 · ≥ 1
maxPosition number default 20 · ≥ 1
limit integer Maximum rows to return default 50 · 1–500
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "tool": "gsc_quick_wins",
    "input": {
      "siteUrl": "sc-domain:example.com",
      "days": 28
    }
  }'
MCP tool call
{
  "tool": "gsc_quick_wins",
  "arguments": {
    "siteUrl": "sc-domain:example.com",
    "days": 28
  }
}

Raw endpoints

Passthrough to the Google Search Console API. path fills URL placeholders, query the query string and body the JSON body. Input is validated before anything is sent; the response is the provider's own body.

sites.list

Read

List Search Console properties this connection can read.

GET https://www.googleapis.com/webmasters/v3/sites

No input.

REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "sites.list"
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

sites.get

Read

Get one property and the connection's permission level on it.

GET https://www.googleapis.com/webmasters/v3/sites/{siteUrl}

Name Type Notes
path.siteUrl required string Search Console property, e.g. "sc-domain:example.com" or "https://example.com/"
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "sites.get",
    "input": {
      "path": {
        "siteUrl": "sc-domain:example.com"
      }
    }
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "siteUrl": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "siteUrl"
      ]
    }
  },
  "required": [
    "path"
  ]
}

searchanalytics.query

Read

Search Analytics: clicks, impressions, CTR and position grouped by dimensions.

POST https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/searchAnalytics/query

Name Type Notes
path.siteUrl required string Search Console property, e.g. "sc-domain:example.com" or "https://example.com/"
body.startDate required string (date) First day, YYYY-MM-DD
body.endDate required string (date) Last day, YYYY-MM-DD
body.dimensions array<string> Group rows by these dimensions datequerypagecountrydevicesearchAppearancehour
body.type string webimagevideonewsdiscovergoogleNews
body.dimensionFilterGroups array<object>
body.aggregationType string autobyPagebyPropertybyNewsShowcasePanel
body.rowLimit integer Maximum rows to return 1–25000
body.startRow integer Zero-based row offset for paging ≥ 0
body.dataState string finalallhourly_all
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "searchanalytics.query",
    "input": {
      "path": {
        "siteUrl": "sc-domain:example.com"
      },
      "body": {
        "startDate": "2026-08-01",
        "endDate": "2026-08-28",
        "dimensions": [
          "query"
        ],
        "rowLimit": 10
      }
    }
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "siteUrl": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "siteUrl"
      ]
    },
    "body": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
        },
        "endDate": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
        },
        "dimensions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "date",
              "query",
              "page",
              "country",
              "device",
              "searchAppearance",
              "hour"
            ]
          }
        },
        "type": {
          "type": "string",
          "enum": [
            "web",
            "image",
            "video",
            "news",
            "discover",
            "googleNews"
          ]
        },
        "dimensionFilterGroups": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "groupType": {
                "type": "string",
                "const": "and"
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "dimension": {
                      "type": "string"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "equals",
                        "notEquals",
                        "contains",
                        "notContains",
                        "includingRegex",
                        "excludingRegex"
                      ]
                    },
                    "expression": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "dimension",
                    "expression"
                  ]
                }
              }
            },
            "required": [
              "filters"
            ]
          }
        },
        "aggregationType": {
          "type": "string",
          "enum": [
            "auto",
            "byPage",
            "byProperty",
            "byNewsShowcasePanel"
          ]
        },
        "rowLimit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 25000
        },
        "startRow": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "dataState": {
          "type": "string",
          "enum": [
            "final",
            "all",
            "hourly_all"
          ]
        }
      },
      "required": [
        "startDate",
        "endDate"
      ]
    }
  },
  "required": [
    "path",
    "body"
  ]
}

sitemaps.list

Read

List sitemaps submitted for a property.

GET https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps

Name Type Notes
path.siteUrl required string Search Console property, e.g. "sc-domain:example.com" or "https://example.com/"
query.sitemapIndex string Only sitemaps listed in this sitemap index
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "sitemaps.list",
    "input": {
      "path": {
        "siteUrl": "sc-domain:example.com"
      }
    }
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "siteUrl": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "siteUrl"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "sitemapIndex": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "path"
  ]
}

sitemaps.get

Read

Get one submitted sitemap.

GET https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}

Name Type Notes
path.siteUrl required string Search Console property, e.g. "sc-domain:example.com" or "https://example.com/"
path.feedpath required string Full sitemap URL
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "sitemaps.get",
    "input": {
      "path": {
        "siteUrl": "sc-domain:example.com",
        "feedpath": "https://example.com/sitemap.xml"
      }
    }
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "siteUrl": {
          "type": "string",
          "minLength": 1
        },
        "feedpath": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "siteUrl",
        "feedpath"
      ]
    }
  },
  "required": [
    "path"
  ]
}

urlInspection.index.inspect

Read

URL Inspection: index status, crawl and rich-result details for one URL.

POST https://searchconsole.googleapis.com/v1/urlInspection/index:inspect

Name Type Notes
body.inspectionUrl required string (uri) Fully qualified URL to inspect, inside siteUrl
body.siteUrl required string Search Console property, e.g. "sc-domain:example.com" or "https://example.com/"
body.languageCode string Language for issue messages, e.g. "en-US"
REST
curl https://api.oneapiforagents.com/v1/call \
  -H "Authorization: Bearer $ONEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "gsc",
    "endpoint": "urlInspection.index.inspect",
    "input": {
      "body": {
        "inspectionUrl": "https://example.com/pricing",
        "siteUrl": "sc-domain:example.com"
      }
    }
  }'
Input JSON Schema
JSON
{
  "type": "object",
  "properties": {
    "body": {
      "type": "object",
      "properties": {
        "inspectionUrl": {
          "type": "string",
          "format": "uri"
        },
        "siteUrl": {
          "type": "string",
          "minLength": 1
        },
        "languageCode": {
          "type": "string"
        }
      },
      "required": [
        "inspectionUrl",
        "siteUrl"
      ]
    }
  },
  "required": [
    "body"
  ]
}