Get statistics

Read exact catalog coverage statistics for the physical World or the selected Destination, with observation dates and provenance.

Availability

This tool is available through browser WebMCP on a matching GoVisit page and through POST /api/tools/v1/get_statistics. Its Agent Skill uses the HTTP adapter. Browser calls read the loaded page; HTTP calls supply its canonical pagePath explicitly.

Call in a compatible browser

const modelContext = document.modelContext;
if (!modelContext) throw new Error("This browser does not expose WebMCP on this page.");
const tool = (await modelContext.getTools()).find((entry) => entry.name === 'get_statistics');
if (!tool) throw new Error('get_statistics is not registered for the current page.');
const result = await modelContext.executeTool(tool, { category: 'coverage' });
console.log(result);

Available on localized home, Places and Destinations landing pages, and country/Destination pages. Destination category, collection and collection-index pages report the parent Destination scope, not category or collection statistics. Individual Place, documentation and blog pages do not mount this tool. The generated contract below lists the exact paths. Check getTools() before calling.

Call through HTTP

Use the pathname from an actual canonical GoVisit link, including its language prefix. The sample page path illustrates the shape; replace it with your selected published page. HTTP inputs add pagePath to the browser arguments. No cookies, browser session or inferred location are required. Queries, fragments, origins and cache-refresh flags are rejected. Language comes from the page path.

curl

curl --silent --show-error https://govisit.ai/api/tools/v1/get_statistics \
  -H 'Content-Type: application/json' \
  --data '{"pagePath": "/en/destinations/cz/prague/"}'

JavaScript

const response = await fetch("https://govisit.ai/api/tools/v1/get_statistics", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "pagePath": "/en/destinations/cz/prague/"
})
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error || "unavailable"}`);
console.log(result);

Python

import json
from urllib.error import HTTPError
from urllib.request import Request, urlopen

request = Request(
    "https://govisit.ai/api/tools/v1/get_statistics",
    data=json.dumps({
  "pagePath": "/en/destinations/cz/prague/"
}).encode(),
    headers={"Content-Type": "application/json"},
    method="POST",
)
try:
    with urlopen(request) as response:
        result = json.load(response)
except HTTPError as error:
    result = json.load(error)
    raise RuntimeError(f"{error.code}: {result.get('error', 'unavailable')}") from error
print(result)

Successful results match the browser tool's published page projection, including its freshness and scope limits. The adapter uses GoVisit's existing page caches; it does not provide a fresh live availability check. An absent page returns 404; an unsupported category returns 400; unavailable or malformed page context returns 503. See Reliability for errors and shared request limits.

Input and output contract

Input schema
{
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "coverage"
      ],
      "default": "coverage",
      "description": "Statistic family. Coverage is the only supported family today."
    }
  },
  "additionalProperties": false
}
Output schema
{
  "type": "object",
  "description": "Governed statistics from the cached public page. Each metric has its own observation date. Missing or invalid observations are unknown, never zero.",
  "properties": {
    "schemaVersion": {
      "const": "1"
    },
    "pageType": {
      "enum": [
        "home",
        "places-index",
        "destinations-index",
        "destination",
        "category",
        "collection"
      ]
    },
    "pageId": {
      "type": "string"
    },
    "locale": {
      "type": "string"
    },
    "canonicalUrl": {
      "type": "string"
    },
    "contentVersion": {
      "type": [
        "string",
        "number",
        "null"
      ]
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "freshness": {
      "type": "object",
      "properties": {
        "contentVersion": {
          "type": [
            "string",
            "number",
            "null"
          ]
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "contentVersion",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "completeness": {
      "enum": [
        "page-published-statistics",
        "partial",
        "unavailable",
        "invalid-input"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "category": {
          "const": "coverage"
        },
        "scope": {
          "type": "object",
          "properties": {
            "kind": {
              "enum": [
                "world",
                "destination"
              ]
            },
            "code": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "code"
          ],
          "additionalProperties": false
        },
        "metrics": {
          "type": "array",
          "maxItems": 22,
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "enum": [
                  "places",
                  "activities",
                  "collections",
                  "destinations",
                  "destinations_country",
                  "destinations_region",
                  "destinations_district",
                  "destinations_city",
                  "destinations_highlight",
                  "places_arts_and_entertainment",
                  "places_community_and_government",
                  "places_cultural_and_historic",
                  "places_education",
                  "places_food_and_drink",
                  "places_geographic_entities",
                  "places_health_care",
                  "places_lifestyle_services",
                  "places_lodging",
                  "places_services_and_business",
                  "places_shopping",
                  "places_sports_and_recreation",
                  "places_travel_and_transportation"
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 4000
              },
              "description": {
                "type": "string",
                "maxLength": 4000
              },
              "value": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "unit": {
                "const": "count"
              },
              "definitionVersion": {
                "const": "1"
              },
              "source": {
                "const": "catalog_coverage"
              },
              "observedAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$"
              },
              "computedAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$"
              },
              "window": {
                "type": "object",
                "properties": {
                  "code": {
                    "const": "all_time"
                  },
                  "start": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$"
                  },
                  "timeZone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code",
                  "start",
                  "end",
                  "timeZone"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "required": [
              "code",
              "name",
              "description",
              "value",
              "unit",
              "definitionVersion",
              "source",
              "observedAt",
              "computedAt",
              "window"
            ]
          }
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 22
        },
        "missingCodes": {
          "type": "array",
          "maxItems": 22,
          "uniqueItems": true,
          "items": {
            "enum": [
              "places",
              "activities",
              "collections",
              "destinations",
              "destinations_country",
              "destinations_region",
              "destinations_district",
              "destinations_city",
              "destinations_highlight",
              "places_arts_and_entertainment",
              "places_community_and_government",
              "places_cultural_and_historic",
              "places_education",
              "places_food_and_drink",
              "places_geographic_entities",
              "places_health_care",
              "places_lifestyle_services",
              "places_lodging",
              "places_services_and_business",
              "places_shopping",
              "places_sports_and_recreation",
              "places_travel_and_transportation"
            ]
          }
        }
      },
      "required": [
        "category",
        "scope",
        "metrics",
        "count",
        "missingCodes"
      ],
      "additionalProperties": false
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "schemaVersion",
    "pageType",
    "pageId",
    "locale",
    "canonicalUrl",
    "contentVersion",
    "updatedAt",
    "freshness",
    "completeness",
    "data"
  ],
  "additionalProperties": false
}
HTTP input schema
{
  "type": "object",
  "properties": {
    "pagePath": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "Canonical GoVisit page path supplying this tool's published context; no origin, query or fragment."
    },
    "category": {
      "type": "string",
      "enum": [
        "coverage"
      ],
      "default": "coverage",
      "description": "Statistic family. Coverage is the only supported family today."
    }
  },
  "additionalProperties": false,
  "required": [
    "pagePath"
  ]
}
HTTP error schema
{
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "1"
    },
    "completeness": {
      "enum": [
        "invalid-input",
        "not-found",
        "unavailable"
      ]
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "schemaVersion",
    "completeness",
    "error"
  ],
  "additionalProperties": false
}

The schemas above are rendered server-side from config/webmcp-tools.json, the canonical reviewed tool catalog. The WebMCP manifest also publishes the machine-readable contract; native RegisteredTool entries advertise an output-contract URL because that interface does not provide an inline outputSchema field.

Read the result

The optional browser argument category defaults to coverage, the only supported family today. HTTP adds required pagePath; use /en for physical World scope or a published Destination path such as /en/destinations/cz/prague/. Future families require an updated contract; do not invent category names.

Read data.scope.kind and data.scope.code before interpreting data.metrics. Each member contains its exact value, metric code, localized name and description, unit, definitionVersion, source, observedAt, computedAt and observation window. data.count counts returned metric members, not Places or Destinations. All 22 governed coverage members can be returned together.

page-published-statistics means every governed member is present. partial identifies missing or invalid members in data.missingCodes; unavailable means no valid observations were found. HTTP returns 503 for unavailable observations. An explicitly measured zero is zero; missing, malformed or duplicate observations are unknown. Headline fallbacks are never statistics.

Interpretation limits

These are cached catalog observations, not live availability. Coverage is recalculated daily, so returned counts can lag catalog changes and be slightly inaccurate within the day. Each metric has its own observation date; unchanged values retain an earlier date. Page freshness, index releases and skill versions do not establish when a metric was observed. Preserve timestamps as served: timezone-less coverage timestamps represent UTC. Home and Places read World observations through the existing one-hour backend cache; Destination pages can retain their existing 24-hour cached HTML and stale-serving behavior.

Optional coverage reads during page rendering have a 1.5-second deadline. A timeout leaves those observations unknown; it does not substitute headline fallbacks or prevent the page from loading. Destination pages retry a failed optional read through background revalidation after one minute, so an outage need not persist for the normal HTML cache lifetime. Until observations are available, the tool can return partial or unavailable results.

The governed coverage definitions describe the exact counts. World destinations counts every Destination; Destination destinations counts descendants and excludes the current Destination. The 13 Place root-group counts sum to places; Destination classifications can overlap. Avoid summing overlapping Destination counts.

The homepage Destinations headline uses the same World destinations total, rounded down to the nearest hundred: 4,987 displays as +4,900. The tool preserves the exact observed value. Bounded search and page-list counts are not catalog coverage statistics.

For the current contract and related tools, see the WebMCP manifest, the Agent Skill and the WebMCP overview.

Last updated: October 14, 2026