query_knowledge_graph
Query the materialized semantic graph without downloading whole datasets. Resolve an entity name/code and optional municipality geography, then return typed facts and relationships. This supports municipality-by-NAICS GDP and business queries without encoding classifications in metric names. Missing facts or edges mean unknown, never zero or false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Optional entity-type constraint. | |
| depth | No | Hops to expand outward from entity; default 1. Above 1 adds an expansion block of nodes and edges annotated with the hop that reached them, so a containment chain such as municipality -> census-division -> economic-region can be fetched in one call instead of three. Requires entity. | |
| limit | No | Maximum facts, relationships, or listed entities; default 25. | |
| bundle | No | Bounded metric preset. municipal-economic-profile-v1 requires one municipality entity. | |
| entity | No | Exact name, slug, graph id, NOC code, SGC code, source id, or provider id. | |
| metrics | No | Fact metrics, e.g. population. | |
| maxNodes | No | Ceiling on entities across the whole expansion; default 200. Distinct from limit, which bounds one level — without it a depth of 2 from a municipality would pull every business in it. | |
| geography | No | Optional exact municipality name, slug, or SGC code for geography-scoped facts. | |
| predicates | No | Relationship predicates, e.g. classified_as or serves. | |
| truthStates | No | ||
| minimumConfidence | No | ||
| referencePeriodEnd | No | Inclusive ISO-8601 upper bound for fact reference periods. | |
| referencePeriodStart | No | Inclusive ISO-8601 lower bound for fact reference periods. |