Skip to developer documentation
Browse developer documentation
MCP documentation / Reports

Read-only tool

get_realtime

Read visitors active in the last five minutes.

Access: OAuth analytics:read or a privately configured workspace key.

Arguments

get_realtime arguments
FieldTypeDescription
cursorstringOpaque next_cursor from the previous result. Keep the same website, dates, report, model, visitor filters and funnel selector.
filtersarrayJSON array of up to twenty visitor filters, for example [{"dim":"country","op":"is","value":"US"}]. Dimensions: source, channel, campaign, entry_page, page, hostname, country, device, browser, os, goal. Operators: is, is_not. Values are exact strings up to 500 characters. All filters must match the visitor across available history; report dates then select activity for that cohort. Unmatched payments are excluded. Crawler counts remain website-wide; spend requires every filter to be source/channel/campaign. Preserve filters when paging.
limitintegerMaximum rows on this page.

Default: 50.

sitestringWebsite ID or domain. Required when the workspace has more than one website.

filters[] fields

filters nested fields
FieldTypeDescription
dimstring

Values: source, channel, campaign, entry_page, page, hostname, country, device, browser, os, goal.

opstring

Values: is, is_not.

valuestring

Read the current five-minute window

Use this JSON-RPC call through an initialized MCP client. Replace example values with your actual website, dates or confirmed setup details.

MCP tools/call request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_realtime",
    "arguments": {
      "site": "site_example",
      "limit": 50
    }
  }
}

Decoded result

Illustrative JSON parsed from the result’s text block.

Decoded JSON result
{
  "site": {
    "id": "site_example",
    "domain": "shop.example.com",
    "currency": "USD"
  },
  "window_minutes": 5,
  "live_visitors": 1,
  "visitors": [
    {
      "visitor_id": "v_example",
      "country_code": "US",
      "city": "New York",
      "source": "Google Organic",
      "page": "/pricing",
      "device": "Desktop",
      "seconds_ago": 12
    }
  ]
}

Result fields

get_realtime result fields
FieldTypeDescription
siteobjectWebsite ID, domain and currency.
window_minutesintegerFixed five-minute live window.
live_visitorsintegerTotal live visitors, including later pages.
visitorsarrayReport records. See the fields below.
next_cursorstring | nullWhen provided, pass this value to continue; null means the last page. Some small-site reports omit this field.
coverageobjectWhen provided, describes completeness, snapshot time and row coverage. Row limits apply to this page, not to headline totals.

site fields

site nested fields
FieldTypeDescription
idstringWebsite ID.
domainstringWebsite domain.
currencystringThree-letter currency.

visitors[] fields

visitors nested fields
FieldTypeDescription
visitor_idstringObserved visitor ID.
country_codestring | nullCountry or null.
citystring | nullCity or null.
sourcestringRecorded source.
pagestringLatest path.
devicestringDevice type.
seconds_agointegerSeconds since last activity.

The decoded data follows the live visitors response contract, without the REST envelope.

Full MCP result wrapper
MCP result object
{
  "content": [
    {
      "type": "text",
      "text": "{\n  \"site\": {\n    \"id\": \"site_example\",\n    \"domain\": \"shop.example.com\",\n    \"currency\": \"USD\"\n  },\n  \"window_minutes\": 5,\n  \"live_visitors\": 1,\n  \"visitors\": [\n    {\n      \"visitor_id\": \"v_example\",\n      \"country_code\": \"US\",\n      \"city\": \"New York\",\n      \"source\": \"Google Organic\",\n      \"page\": \"/pricing\",\n      \"device\": \"Desktop\",\n      \"seconds_ago\": 12\n    }\n  ]\n}"
    }
  ]
}

Behavior and limits

Money is integer cents in site.currency. Percentages use a 0–100 scale.

This is a fixed five-minute live window. period=realtime on other reports instead selects the last 30 minutes.

Continuation pages retain the original live window. Reload the first page for a fresh current window.

This tool takes site, limit and cursor, plus filters when available; it does not take a report date range. Reload the first page for current activity.

Related documentation