HG Insights · Schema
HierarchyRequest
Request body for the hierarchy endpoint.
CompanyB2BDataIntelligenceMarketing
Properties
| Name | Type | Description |
|---|---|---|
| filters | object | |
| format | string | Controls the response shape: `tree` (nested) or `list` (flat). Defaults to `tree`. The `countries`, `regions`, and `tiers` filters require `format: list`; sending any of them with `format: tree` (incl |
| hierarchy | object | |
| mode | string | Controls which part of the corporate hierarchy to return. - `full` — returns the entire tree rooted at the Group HQ, regardless of which company was matched. Every node in the corporate family is incl |
| selected_fields | array | Optional field override. When provided, only these fields (plus always-present selected) are returned. |
| sort | array | Optional list of sort directives applied to the hierarchy results. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/hg-insights/json-schema/hg-insights-hierarchy-request-schema.json",
"title": "HierarchyRequest",
"description": "Request body for the hierarchy endpoint.",
"x-generated": "2026-12-03",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/hg-insights-openapi.yaml#/components/schemas/HierarchyRequest",
"additionalProperties": false,
"properties": {
"filters": {
"$ref": "#/$defs/HierarchyFilters"
},
"format": {
"default": "tree",
"description": "Controls the response shape: `tree` (nested) or `list` (flat). Defaults to `tree`.\n\nThe `countries`, `regions`, and `tiers` filters require `format: list`; sending any of them\nwith `format: tree` (including the default when `format` is omitted) returns HTTP 400\n(`FILTER_NOT_VALID_FOR_TREE`). The `max_tier` filter works with both formats and can be used\nto limit tree depth.\n",
"enum": [
"tree",
"list"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"hierarchy": {
"$ref": "#/$defs/HierarchyFilter"
},
"mode": {
"description": "Controls which part of the corporate hierarchy to return.\n\n- `full` — returns the entire tree rooted at the Group HQ, regardless of which company was matched. Every node in the corporate family is included.\n- `children` — returns a subtree rooted at the matched company, including all of its subsidiaries and their descendants.\n- `parents` — returns only the ancestor chain from the Group HQ down to the matched company (no siblings or cousins).\n",
"enum": [
"full",
"children",
"parents"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"selected_fields": {
"default": [
"id",
"name",
"domain",
"domain_normalized",
"company_level",
"parent_id"
],
"description": "Optional field override. When provided, only these fields (plus always-present selected) are returned.",
"items": {
"enum": [
"id",
"name",
"domain",
"domain_normalized",
"company_level",
"global_hq_id",
"global_hq_name",
"corporate_parent_id",
"corporate_parent_name",
"domestic_parent_id",
"domestic_parent_name",
"parent_id",
"country_code",
"country_name",
"city_name",
"state_name",
"revenue_total",
"revenue_band",
"employees_total",
"employees_band",
"industry_name",
"naics_code",
"naics_name",
"sic_codes",
"sic_names"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"type": "array",
"x-struct": null,
"x-validate": null
},
"sort": {
"description": "Optional list of sort directives applied to the hierarchy results.",
"items": {
"$ref": "#/$defs/HierarchySort"
},
"type": "array",
"x-struct": null,
"x-validate": null
}
},
"required": [
"hierarchy",
"mode"
],
"type": "object",
"x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Hierarchy.Request",
"x-validate": null,
"$defs": {
"HexId": {
"description": "Hexadecimal identifier (unsigned 128-bit base 16 integer)",
"title": "HexId",
"type": "string",
"x-struct": "Elixir.TalariaWeb.Schemas.V2.Id",
"x-validate": "Elixir.TalariaWeb.Schemas.V2.Id"
},
"HierarchyFilter": {
"additionalProperties": false,
"description": "Identifies a company by ID or domain (mutually exclusive).",
"properties": {
"domain": {
"description": "Company domain (e.g., example.com)",
"type": "string",
"x-struct": null,
"x-validate": null
},
"id": {
"$ref": "#/$defs/HexId"
}
},
"title": "HierarchyFilter",
"type": "object",
"x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Hierarchy.HierarchyFilter",
"x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Hierarchy.HierarchyFilter"
},
"HierarchyFilters": {
"additionalProperties": false,
"description": "Optional filters applied to the hierarchy results. `countries`, `regions`, and `tiers` require `format: list` and are rejected with HTTP 400 (`FILTER_NOT_VALID_FOR_TREE`) when used with `format: tree`. `max_tier` works with both `tree` and `list`.",
"properties": {
"countries": {
"description": "Restrict results to companies in these ISO-3166-1 alpha-2 country codes. Requires `format: list` (not supported with `format: tree`).",
"items": {
"maxLength": 2,
"minLength": 2,
"type": "string",
"x-struct": null,
"x-validate": null
},
"type": "array",
"x-struct": null,
"x-validate": null
},
"max_tier": {
"description": "Restrict results to companies at or above this hierarchy tier. Works with both `tree` and `list` formats; use it to limit tree depth.",
"enum": [
"group_hq",
"corporate_parent",
"domestic_parent",
"subsidiary"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"regions": {
"description": "Restrict results to companies in these geopolitical regions. Combined with `countries` using union (OR) semantics. Requires `format: list` (not supported with `format: tree`).",
"items": {
"enum": [
"AMER",
"EMEA",
"APAC"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"type": "array",
"x-struct": null,
"x-validate": null
},
"tiers": {
"description": "Restrict results to companies at these hierarchy tiers. Requires `format: list` (not supported with `format: tree`).",
"items": {
"enum": [
"group_hq",
"corporate_parent",
"domestic_parent",
"subsidiary"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"type": "array",
"x-struct": null,
"x-validate": null
}
},
"title": "HierarchyFilters",
"type": "object",
"x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Hierarchy.Filters",
"x-validate": null
},
"HierarchySort": {
"additionalProperties": false,
"description": "Sort directive applied to the hierarchy results.",
"properties": {
"field": {
"description": "Field to sort by.",
"enum": [
"revenue_total",
"employees_total",
"name"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"nulls": {
"description": "Where to place null values.",
"enum": [
"first",
"last"
],
"type": "string",
"x-struct": null,
"x-validate": null
},
"order": {
"description": "Sort order.",
"enum": [
"asc",
"desc"
],
"type": "string",
"x-struct": null,
"x-validate": null
}
},
"required": [
"field"
],
"title": "HierarchySort",
"type": "object",
"x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Hierarchy.Sort",
"x-validate": null
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/hg-insights-hierarchy-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.