Returns the estimated credit cost for a Company Hierarchy request without consuming any credits or returning data. Use the same parameters as the /hierarchy endpoint.
Hierarchy estimate request
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.
{ "countries": [ "BR" ], "regions": [ "EMEA" ] }
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 (including the default when format is omitted) returns HTTP 400 (FILTER_NOT_VALID_FOR_TREE). The max_tier filter works with both formats and can be used to limit tree depth.
Identifies a company by ID or domain (mutually exclusive).
{ "id": "1698C53EBC888758570396E0334965C1" }
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 included.children— returns a subtree rooted at the matched company, including all of its subsidiaries and their descendants.parents— returns only the ancestor chain from the Group HQ down to the matched company (no siblings or cousins).
Optional field override. When provided, only these fields (plus always-present selected) are returned.
[ "id", "name", "domain", "company_level" ]
curl -i -X POST \
https://api.hginsights.com/data-api/v2/companies/hierarchy/estimate \
-H 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"countries": [
"BR"
],
"regions": [
"EMEA"
]
},
"format": "list",
"hierarchy": {
"id": "1698C53EBC888758570396E0334965C1"
},
"mode": "full",
"selected_fields": [
"id",
"name",
"domain",
"company_level"
]
}'Estimate response
Credits available in the org's active consumption cycle.
Estimated number of credits required to fulfill the hierarchy request.
{ "available_credits": 1000, "credits_estimate": 110, "sufficient_credits": true }