Retrieve detailed analytics for a single trait, including its top predictors, discriminators, and representative exemplar entities.
Quick Example
{
"entity_type": "person",
"trait_id": "1000000001"
}Input Parameters
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| entity_type | string | Yes | - | "person" or "business" | Type of entity |
| trait_id | string | Conditional | - | - | Trait ID to retrieve |
| trait_hash | string | Conditional | - | - | Trait hash (stable, persists across rebuilds) |
| trait_name | string | Conditional | - | - | Trait name (requires domain) |
| domain | string | Conditional | - | See domains | Trait domain (required with trait_name) |
| analytics_depth | number | No | 10 | 5-50 | Number of top results per analytics category |
| workflow_id | string | No | - | Valid UUID | Workflow session identifier |
Identification: Provide one of:
trait_id- Direct ID lookuptrait_hash- Stable hash lookuptrait_name+domain- Name-based lookup
Request Schema:
interface TraitGetParams {
entity_type: "person" | "business";
trait_id?: string;
trait_hash?: string;
trait_name?: string;
domain?: "purchase" | "demographic" | "intent" | "interest" | "financial" | "firmographic" | "affinity" | "content" | "employment" | "household" | "lifestyle" | "political";
analytics_depth?: number;
workflow_id?: string;
}Output Format
{
trait: {
trait_id: string;
trait_hash: string;
name: string;
value: string;
domain: string;
size: number;
prevalence: number;
predictors: Array<{
trait_id: string;
name: string;
value: string;
domain: string;
score: number;
}>;
discriminators: Array<{
trait_id: string;
name: string;
value: string;
domain: string;
score: number;
}>;
exemplars: Array<{
entity_id: string;
score: number;
}>;
},
tool_trace_id: string,
workflow_id: string
}Response Fields:
| Field | Type | Description |
|---|---|---|
| trait | object | Trait analytics data |
| trait.trait_id | string | Numeric trait identifier |
| trait.trait_hash | string | Stable hash identifier |
| trait.name | string | Trait name |
| trait.value | string | Trait value |
| trait.domain | string | Domain category |
| trait.size | number | Number of entities with this trait |
| trait.prevalence | number | Population proportion (0-1) |
| trait.predictors | array | Top co-occurring traits |
| trait.discriminators | array | Most distinguishing traits |
| trait.exemplars | array | Representative entity IDs |
| tool_trace_id | string | OpenTelemetry trace ID |
| workflow_id | string | Workflow session identifier |
Example Response:
{
"trait": {
"trait_id": "1000000001",
"trait_hash": "abc123def456",
"name": "income_range",
"value": "150000_plus",
"domain": "demographic",
"size": 2500000,
"prevalence": 0.08,
"predictors": [
{
"trait_id": "1000000050",
"name": "education",
"value": "graduate_degree",
"domain": "demographic",
"score": 0.85
}
],
"discriminators": [
{
"trait_id": "1000000075",
"name": "luxury_retail",
"value": "high",
"domain": "purchase",
"score": 0.92
}
],
"exemplars": [
{
"entity_id": "123456",
"score": 0.98
}
]
},
"tool_trace_id": "a1b2c3d4e5f6",
"workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}Usage Examples
Example 1: Look up by trait ID
{
"entity_type": "person",
"trait_id": "1000000001"
}Example 2: Look up by stable hash
{
"entity_type": "person",
"trait_hash": "abc123def456"
}Example 3: Look up by name + domain
{
"entity_type": "person",
"trait_name": "income_range",
"domain": "demographic"
}Example 4: Deep analytics
{
"entity_type": "person",
"trait_hash": "abc123def456",
"analytics_depth": 25
}