Docs
Search docs...⌘K

Metrics by country

API + MCP
GET/v3/gsc/metrics-by-country

Requests to this endpoint are free and do not consume any API units.

Query parameters

wherestring

Supported fields:

  • url

Filter is a JSON string that represents a boolean expression, it should follow the following structure:

<bool_filter> ::= { "and" : <bool_filter>+ }
              |   { "or" : <bool_filter>+ }
              |   { "not" : <bool_filter> }
              |   <expr>

<expr> ::= {
             "field" : <dimension|metric>,
             ? "is": <condition>,
           }

<condition> ::= [ "eq", <value> ]
            |   [ "neq", <value> ]
            |   [ "gt", <value> ]
            |   [ "gte", <value> ]
            |   [ "lt", <value> ]
            |   [ "lte", <value> ]
            |   [ "substring", <value> ]
            |   [ "isubstring", <value> ]
            |   [ "phrase_match", <value> ]
            |   [ "iphrase_match", <value> ]
            |   [ "prefix", <value> ]
            |   [ "suffix", <value> ]
devicestring

Filter by device type (DESKTOP, MOBILE, TABLET). If not specified, all devices are included.

Allowed values:desktopmobiletablet
search_typestring

The type of search results to return (web, image, video, news).

Allowed values:webimagevideonews
Default:web
history_groupingstring

The time interval used to group historical data.

Allowed values:dailyweeklymonthly
Default:monthly
date_tostring

The end date of the historical period in YYYY-MM-DD format.

date_fromstringRequired

The start date of the historical period in YYYY-MM-DD format.

portfolio_idinteger

Portfolio ID. When provided, aggregates data across all GSC-connected projects in the portfolio.

project_idinteger

Project ID. Required when portfolio_id is not provided.

outputstring

The output format.

Allowed values:jsoncsvxmlphp

Responses

metricsarray
countrystring
clicksinteger