@yottagraph-app/aether-instructions 1.1.18 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/agents.mdc +27 -2
- package/rules/api.mdc +88 -80
- package/rules/cookbook.mdc +48 -15
- package/skills/data-model/newsdata/schema.yaml +10 -0
- package/skills/elemental-api/SKILL.md +4 -10
- package/skills/elemental-api/entities.md +37 -112
- package/skills/elemental-api/find.md +19 -4
- package/skills/elemental-api/graph.md +3 -3
- package/skills/elemental-api/overview.md +46 -22
- package/skills/elemental-api/schema.md +10 -30
- package/skills/elemental-api/articles.md +0 -386
- package/skills/elemental-api/events.md +0 -145
- package/skills/elemental-api/llm.md +0 -18
- package/skills/elemental-api/relationships.md +0 -310
- package/skills/elemental-api/sentiment.md +0 -93
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Entities are the core objects in the Knowledge Graph: companies, people, organizations, products, and other named things that appear in the news. Each entity has a unique **Named Entity ID (NEID)**.
|
|
4
4
|
|
|
5
|
+
NEIDs are stable and can be persisted long-term, but may occasionally change if the database is rebuilt or the application switches databases. When an NEID becomes invalid (e.g., resolution returns no results), re-resolve the entity using its canonical name from the previous query result, then redo any downstream operations that depended on it. NEIDs should NEVER be hardcoded in source code.
|
|
6
|
+
|
|
7
|
+
**Looking for property-based search?** To search for entities by type, property values, or relationships using the expression language, see [find.md](find.md).
|
|
8
|
+
|
|
5
9
|
## When to Use
|
|
6
10
|
|
|
7
11
|
- You have an entity name and need to find its NEID
|
|
@@ -16,28 +20,24 @@ Entities are the core objects in the Knowledge Graph: companies, people, organiz
|
|
|
16
20
|
- Example: `00416400910670863867`
|
|
17
21
|
- Always pad with leading zeros to exactly 20 characters when normalizing
|
|
18
22
|
- **EID**: The term EID is sometimes used interchangeably with NEID.
|
|
23
|
+
- **nindex**: The term nindex is sometimes used interchangeably with NEID.
|
|
19
24
|
- **Entity Resolution**: The same real-world entity may have multiple names (e.g., "Apple", "Apple Inc.", "AAPL"). The API resolves these to a single NEID.
|
|
20
|
-
- **Entity Types
|
|
25
|
+
- **Flavors (Entity Types)**: Each entity has a type identified by a Flavor ID (FID).
|
|
21
26
|
|
|
22
27
|
## Tips
|
|
23
28
|
|
|
24
29
|
- Always start by searching for the entity to get the correct NEID
|
|
25
|
-
- After resolving an entity to an NEID,
|
|
30
|
+
- After resolving an entity to an NEID, save and use the the canonical entity name going forward.
|
|
26
31
|
- It's typically safe to resolve an entity to the top matching NEID. However, sometimes a useful pattern is to let the user give input that the resolution was incorrect, show them a longer list of matches, and let them choose a different resolution.
|
|
27
32
|
- Entity names are case-insensitive
|
|
28
33
|
|
|
29
34
|
## Key Endpoints
|
|
30
35
|
|
|
31
|
-
| What you need | Endpoint |
|
|
32
|
-
|
|
33
|
-
| Find
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| Full property values | `POST /elemental/entities/properties` | `getPropertyValues()` | All properties with PIDs, values, timestamps |
|
|
37
|
-
|
|
38
|
-
**`findEntities()` vs `getNEID()` for entity search**:
|
|
39
|
-
- **`findEntities()`** → `POST /elemental/find` — expression-based search. Supports filtering by type, property value, relationship, and complex nested queries. See `find.md` for the expression language. **Use this for filtered or batch searches.**
|
|
40
|
-
- **`getNEID()`** → `GET /entities/lookup` — simple single-entity name lookup via query parameters (`entityName`, `maxResults`). Best for resolving one company/person name quickly.
|
|
36
|
+
| What you need | Endpoint | Returns |
|
|
37
|
+
|---------------|----------|---------|
|
|
38
|
+
| Find entity by name (batch, scored) | `POST /entities/search` | Ranked matches with NEIDs and scores |
|
|
39
|
+
| Basic info (name, aliases, type) | `GET /entities/{neid}` | Quick summary for display |
|
|
40
|
+
| Full property values | `POST /elemental/entities/properties` | All properties with PIDs, values, timestamps |
|
|
41
41
|
|
|
42
42
|
**Important**: When a user asks for "entity properties," clarify which they mean:
|
|
43
43
|
- Basic info/metadata → use `/entities/{neid}`
|
|
@@ -160,57 +160,42 @@ The same pattern applies to the `expression` parameter on `POST /elemental/find`
|
|
|
160
160
|
|
|
161
161
|
For understanding entity types (flavors), properties, and the data model, see **schema.md**. You'll need the schema because many API responses return only FIDs and PIDs — use it to translate these to human-readable names.
|
|
162
162
|
|
|
163
|
+
## Properties Return Multiple Timestamped Values
|
|
163
164
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
## Endpoints
|
|
167
|
-
|
|
168
|
-
### Get entity details
|
|
169
|
-
|
|
170
|
-
`GET /entities/{neid}`
|
|
171
|
-
|
|
172
|
-
Get details about a named entity including name, aliases, and type. This is an alias for /reports/{neid}. Response is cached for 5 minutes.
|
|
173
|
-
|
|
174
|
-
#### Guidance
|
|
175
|
-
|
|
176
|
-
Response is wrapped in a 'report' container object. Access entity data via response.report.
|
|
177
|
-
|
|
178
|
-
#### Parameters
|
|
179
|
-
|
|
180
|
-
| Name | Type | Required | Description |
|
|
181
|
-
|------|------|----------|-------------|
|
|
182
|
-
| neid | string | yes | Named Entity ID |
|
|
165
|
+
`getPropertyValues` returns **all** recorded values for a property, not just the latest. A single entity and property (e.g. Apple's `company_cik`) may return dozens of rows with different `recorded_at` timestamps — one per filing or data ingestion event. For display, take the first (or latest) value and deduplicate by PID:
|
|
183
166
|
|
|
184
|
-
|
|
167
|
+
```typescript
|
|
168
|
+
const byPid = new Map<number, string>();
|
|
169
|
+
for (const v of values) {
|
|
170
|
+
if (!byPid.has(v.pid)) byPid.set(v.pid, v.value);
|
|
171
|
+
}
|
|
172
|
+
```
|
|
185
173
|
|
|
186
|
-
|
|
187
|
-
|--------|-------------|
|
|
188
|
-
| 200 | Entity details (`GetNamedEntityReportResponse`) |
|
|
189
|
-
| 400 | Invalid NEID (`Error`) |
|
|
190
|
-
| 404 | Entity not found (`Error`) |
|
|
191
|
-
| 500 | Internal server error (`Error`) |
|
|
174
|
+
## `include_attributes` Parameter
|
|
192
175
|
|
|
193
|
-
|
|
176
|
+
`getPropertyValues` accepts an `include_attributes` parameter (set to `'true'` as a string) that returns additional metadata on each value. This is essential for relationship properties like `appears_in`, where attributes carry entity-level sentiment scores and article URLs.
|
|
194
177
|
|
|
195
|
-
**
|
|
178
|
+
**Note:** The generated TypeScript client types don't include `include_attributes` in the parameter type. Pass it as an extra property — the API accepts it:
|
|
196
179
|
|
|
197
|
-
```
|
|
198
|
-
|
|
180
|
+
```typescript
|
|
181
|
+
const res = await client.getPropertyValues({
|
|
182
|
+
eids: JSON.stringify([neid]),
|
|
183
|
+
pids: JSON.stringify([appearsInPid]),
|
|
184
|
+
include_attributes: 'true', // Not in TS types, but API accepts it
|
|
185
|
+
} as any);
|
|
199
186
|
```
|
|
200
187
|
|
|
201
|
-
**
|
|
188
|
+
Attribute values are keyed by **numeric PID**, not by name. Resolve attribute names to PIDs via the schema before accessing them.
|
|
202
189
|
|
|
203
|
-
|
|
204
|
-
{"report": {"neid": "00416400910670863867", "name": "Apple", "aliases": ["AAPL", "APPLE", "APPLE INC", "Apple Inc"], "type": "organization"}}
|
|
205
|
-
```
|
|
190
|
+
<!-- BEGIN GENERATED CONTENT -->
|
|
206
191
|
|
|
207
|
-
|
|
192
|
+
## Endpoints
|
|
208
193
|
|
|
209
|
-
### Get entity
|
|
194
|
+
### Get entity details
|
|
210
195
|
|
|
211
|
-
`GET /
|
|
196
|
+
`GET /entities/{neid}`
|
|
212
197
|
|
|
213
|
-
Get
|
|
198
|
+
Get details about a named entity including name, aliases, and type. This is an alias for /reports/{neid}. Response is cached for 5 minutes.
|
|
214
199
|
|
|
215
200
|
#### Guidance
|
|
216
201
|
|
|
@@ -226,7 +211,7 @@ Response is wrapped in a 'report' container object. Access entity data via respo
|
|
|
226
211
|
|
|
227
212
|
| Status | Description |
|
|
228
213
|
|--------|-------------|
|
|
229
|
-
| 200 | Entity
|
|
214
|
+
| 200 | Entity details (`GetNamedEntityReportResponse`) |
|
|
230
215
|
| 400 | Invalid NEID (`Error`) |
|
|
231
216
|
| 404 | Entity not found (`Error`) |
|
|
232
217
|
| 500 | Internal server error (`Error`) |
|
|
@@ -236,7 +221,7 @@ Response is wrapped in a 'report' container object. Access entity data via respo
|
|
|
236
221
|
**Request:**
|
|
237
222
|
|
|
238
223
|
```
|
|
239
|
-
GET /
|
|
224
|
+
GET /entities/00416400910670863867
|
|
240
225
|
```
|
|
241
226
|
|
|
242
227
|
**Response:**
|
|
@@ -247,54 +232,6 @@ GET /reports/00416400910670863867
|
|
|
247
232
|
|
|
248
233
|
---
|
|
249
234
|
|
|
250
|
-
### Find entities by expression
|
|
251
|
-
|
|
252
|
-
`POST /elemental/find`
|
|
253
|
-
|
|
254
|
-
Search for entities using a powerful expression language. The expression parameter supports complex nested queries with logical operators, geographic constraints, property comparisons, and more.
|
|
255
|
-
|
|
256
|
-
#### Guidance
|
|
257
|
-
|
|
258
|
-
CRITICAL: This endpoint REQUIRES Content-Type: application/x-www-form-urlencoded. Sending a JSON body will fail with 400 error. The expression parameter must be URL-encoded form data, not a JSON request body. For the full expression language reference including all expression types, comparison operators, and examples, see find.md.
|
|
259
|
-
|
|
260
|
-
#### Request Body
|
|
261
|
-
|
|
262
|
-
**Content-Type:** `application/x-www-form-urlencoded`
|
|
263
|
-
|
|
264
|
-
| Name | Type | Required | Description |
|
|
265
|
-
|------|------|----------|-------------|
|
|
266
|
-
| expression | string | yes | JSON-encoded expression object defining the search criteria |
|
|
267
|
-
| deadline | any | no | Response deadline in milliseconds or duration format |
|
|
268
|
-
| limit | integer | no | Maximum number of entity IDs to return in first response |
|
|
269
|
-
|
|
270
|
-
#### Responses
|
|
271
|
-
|
|
272
|
-
| Status | Description |
|
|
273
|
-
|--------|-------------|
|
|
274
|
-
| 200 | Find operation successful (`FindResponse`) |
|
|
275
|
-
| 400 | Bad request - invalid parameters or malformed expression (`Error`) |
|
|
276
|
-
| 500 | Internal server error (`Error`) |
|
|
277
|
-
| 501 | Elemental API capability not enabled (`Error`) |
|
|
278
|
-
|
|
279
|
-
#### Example
|
|
280
|
-
|
|
281
|
-
**Request:**
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
POST /elemental/find
|
|
285
|
-
Content-Type: application/x-www-form-urlencoded
|
|
286
|
-
|
|
287
|
-
expression={"type":"is_type","is_type":{"fid":10}}&limit=5
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
**Response:**
|
|
291
|
-
|
|
292
|
-
```json
|
|
293
|
-
{"op_id": "98cc54e9-0108-4361-9c96-18ea97cda7a2", "follow_up": true, "eids": ["01601807036815568643", "08115040994665529432", "02045070050429461063"]}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
235
|
### Get property values for entities
|
|
299
236
|
|
|
300
237
|
`POST /elemental/entities/properties`
|
|
@@ -361,18 +298,6 @@ The named entity report
|
|
|
361
298
|
| neid | string | Named Entity ID |
|
|
362
299
|
| type | string | Entity type (flavor) |
|
|
363
300
|
|
|
364
|
-
### FindResponse
|
|
365
|
-
|
|
366
|
-
| Field | Type | Description |
|
|
367
|
-
|-------|------|-------------|
|
|
368
|
-
| find | `FindData` | |
|
|
369
|
-
|
|
370
|
-
### FindData
|
|
371
|
-
|
|
372
|
-
| Field | Type | Description |
|
|
373
|
-
|-------|------|-------------|
|
|
374
|
-
| **eids** | string[] | Array of 20-character entity IDs matching the search expression |
|
|
375
|
-
|
|
376
301
|
### GetPropertyValuesResponse
|
|
377
302
|
|
|
378
303
|
| Field | Type | Description |
|
|
@@ -5,8 +5,8 @@ The `/elemental/find` endpoint searches for entities using a JSON expression lan
|
|
|
5
5
|
## When to Use
|
|
6
6
|
|
|
7
7
|
- You need to search for entities matching specific criteria (type, property values, relationships)
|
|
8
|
-
- You need to combine multiple filters
|
|
9
|
-
- You need to find entities connected to a given entity via the
|
|
8
|
+
- You need to combine multiple filters
|
|
9
|
+
- You need to find entities connected to a given entity via the relationship links
|
|
10
10
|
|
|
11
11
|
## Expression Structure
|
|
12
12
|
|
|
@@ -124,13 +124,13 @@ Content-Type: application/x-www-form-urlencoded
|
|
|
124
124
|
expression={"type":"comparison","comparison":{"operator":"string_like","pid":8,"value":"Apple"}}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
### Find
|
|
127
|
+
### Find organizations with "Global" in the name (combined AND)
|
|
128
128
|
|
|
129
129
|
```
|
|
130
130
|
POST /elemental/find
|
|
131
131
|
Content-Type: application/x-www-form-urlencoded
|
|
132
132
|
|
|
133
|
-
expression={"type":"and","and":[{"type":"is_type","is_type":{"fid":
|
|
133
|
+
expression={"type":"and","and":[{"type":"is_type","is_type":{"fid":10}},{"type":"comparison","comparison":{"operator":"string_like","pid":8,"value":"Global"}}]}&limit=50
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
### Find entities linked to a specific entity
|
|
@@ -261,6 +261,12 @@ expression={"type":"is_type","is_type":{"fid":10}}&limit=5
|
|
|
261
261
|
|-------|------|-------------|
|
|
262
262
|
| **is_type** | `IsType` | |
|
|
263
263
|
|
|
264
|
+
### LinkedExpression
|
|
265
|
+
|
|
266
|
+
| Field | Type | Description |
|
|
267
|
+
|-------|------|-------------|
|
|
268
|
+
| **linked** | `Linked` | |
|
|
269
|
+
|
|
264
270
|
### Comparison
|
|
265
271
|
|
|
266
272
|
| Field | Type | Description |
|
|
@@ -276,4 +282,13 @@ expression={"type":"is_type","is_type":{"fid":10}}&limit=5
|
|
|
276
282
|
|-------|------|-------------|
|
|
277
283
|
| **fid** | integer | Flavor identifier (FID) representing entity type |
|
|
278
284
|
|
|
285
|
+
### Linked
|
|
286
|
+
|
|
287
|
+
| Field | Type | Description |
|
|
288
|
+
|-------|------|-------------|
|
|
289
|
+
| **distance** | integer | Maximum relationship distance to traverse |
|
|
290
|
+
| pids | integer[] | Property identifiers defining the relationship types to follow |
|
|
291
|
+
| to_entity | string | Target entity ID for relationship traversal |
|
|
292
|
+
| direction | string | Direction of relationship traversal. 'outgoing' (default) follows subject->value edges, 'incoming' follows value->subject (reverse) edges, 'both' unions outgoing and incoming results. |
|
|
293
|
+
|
|
279
294
|
<!-- END GENERATED CONTENT -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Graph
|
|
2
2
|
|
|
3
|
-
The graph endpoints are focused on "graph analysis"
|
|
3
|
+
The graph endpoints are focused on "graph analysis". This includes, but is not limited to, visual rendering of a graph.
|
|
4
4
|
|
|
5
5
|
## When to Use
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ Get nodes and edges layout data for visualizing a relationship graph. Response i
|
|
|
32
32
|
|
|
33
33
|
#### Guidance
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
This should always be called with a non-empty list of neids. A typical pattern is to call /graph/{center_neid}/neighborhood and then use the returned NEIDs to call this endpoint.
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -77,7 +77,7 @@ Get list of neighboring entities in the relationship graph, optionally filtered
|
|
|
77
77
|
|
|
78
78
|
#### Guidance
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Response includes the center entity itself in the results with a weight of 1.0. The 'neighbors' and 'weights' arrays are parallel (same indices correspond).
|
|
81
81
|
|
|
82
82
|
#### Parameters
|
|
83
83
|
|
|
@@ -4,26 +4,55 @@ The Elemental API provides access to the Lovelace Knowledge Graph through the Qu
|
|
|
4
4
|
|
|
5
5
|
## Core Concepts
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Entities
|
|
8
|
+
|
|
9
|
+
Every entity has:
|
|
10
|
+
- **NEID** — a unique Named Entity ID (stable identifier)
|
|
11
|
+
- **Name** — human-readable label (may have aliases)
|
|
12
|
+
- **Flavor** — the entity type (e.g. "organization", "person", "country", "vessel", "event")
|
|
13
|
+
|
|
14
|
+
#### Named Entity ID (NEID)
|
|
15
|
+
|
|
8
16
|
Every entity in the system has a unique identifier called a NEID. Most API calls require a NEID, so your first step is usually looking up an entity by name to get its NEID.
|
|
9
17
|
|
|
10
18
|
**Format**: 20-character numeric string with zero-padding. Example: `00416400910670863867`
|
|
11
19
|
|
|
12
20
|
When normalizing NEIDs, always pad with leading zeros to exactly 20 characters.
|
|
13
21
|
|
|
22
|
+
NEIDs are stable and can be persisted long-term, but may occasionally change if the database is rebuilt or the application switches databases. When an NEID becomes invalid (e.g., resolution returns no results), re-resolve the entity using its canonical name from the previous query result, then redo any downstream operations that depended on it. NEIDs should NEVER be hardcoded in source code.
|
|
23
|
+
|
|
14
24
|
**Note**: The terms "eid" and "neid" are interchangeable throughout the API. Some endpoints use `neid` and others use `eid`, but they refer to the same entity identifier.
|
|
15
25
|
|
|
16
|
-
###
|
|
17
|
-
|
|
26
|
+
### Properties
|
|
27
|
+
|
|
28
|
+
Key-value facts attached to entities, scoped by flavor.
|
|
29
|
+
|
|
30
|
+
Examples: nationality, birth_date, industry, total_revenue, employee_count.
|
|
31
|
+
|
|
32
|
+
Use the schema to discover which properties are available for
|
|
33
|
+
a given entity type.
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
## Relationships
|
|
20
36
|
|
|
21
|
-
|
|
22
|
-
|
|
37
|
+
Directed, typed edges between two entities:
|
|
38
|
+
- **Type** — e.g. "owns", "board_member_of", "subsidiary_of", "appears_in"
|
|
39
|
+
- **Direction** — relationships go from source (subject) to target (object)
|
|
23
40
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
## Attributes
|
|
42
|
+
|
|
43
|
+
Metadata attached to relationships. For example, the "participant" relationship
|
|
44
|
+
connecting an entity to an event carries:
|
|
45
|
+
- **role** — the entity's role in the event (e.g. "acquirer", "target", "plaintiff")
|
|
46
|
+
- **sentiment** — an impact score for the entity's involvement
|
|
47
|
+
|
|
48
|
+
## Events
|
|
49
|
+
|
|
50
|
+
Structured occurrences extracted from source data, each with:
|
|
51
|
+
- **Category** — e.g. "Bankruptcy", "IPO", "Layoffs", "Acquisition"
|
|
52
|
+
- **Date** — when the event occurred (YYYY-MM-DD, or YYYY-MM / YYYY for partial dates)
|
|
53
|
+
- **Description** — detailed, objective description of the event
|
|
54
|
+
- **Likelihood** — temporal status: confirmed, ongoing, likely, or speculative
|
|
55
|
+
- **Participants** — entities involved, each with a role and sentiment score
|
|
27
56
|
|
|
28
57
|
## Endpoint Categories
|
|
29
58
|
|
|
@@ -31,21 +60,16 @@ Most endpoints accept `start` and `end` parameters for filtering by date.
|
|
|
31
60
|
|------|------------------------|
|
|
32
61
|
| [entities.md](entities.md) | Look up entities by name, get details and properties |
|
|
33
62
|
| [find.md](find.md) | Search for entities by type, property values, or relationships using the expression language |
|
|
34
|
-
| [
|
|
35
|
-
| [articles.md](articles.md) | Get articles that mention an entity, article content, titles, summaries |
|
|
36
|
-
| [events.md](events.md) | Find events involving an entity (mergers, lawsuits, etc.) |
|
|
37
|
-
| [relationships.md](relationships.md) | Find connections between entities |
|
|
63
|
+
| [schema.md](schema.md) | Understand the data model: entity types (flavors), properties, and their metadata |
|
|
38
64
|
| [graph.md](graph.md) | Generate visual network graphs |
|
|
39
|
-
| [server.md](server.md) | Check server status and capabilities
|
|
40
|
-
| [llm.md](llm.md) | (Not currently available) AI-assisted queries |
|
|
65
|
+
| [server.md](server.md) | Check server status and capabilities |
|
|
41
66
|
|
|
42
67
|
## Common Workflows
|
|
43
68
|
|
|
44
|
-
### "
|
|
45
|
-
1. `
|
|
46
|
-
2. `
|
|
47
|
-
|
|
69
|
+
### "Find all organizations in a specific sector"
|
|
70
|
+
1. `schema.md` → Check available properties and flavors
|
|
71
|
+
2. `find.md` → Use the expression language to search by property values
|
|
48
72
|
|
|
49
|
-
### "
|
|
50
|
-
1. `entities.md` → Look up
|
|
51
|
-
2. `
|
|
73
|
+
### "What companies are related to Apple?"
|
|
74
|
+
1. `entities.md` → Look up "Apple" to get NEID
|
|
75
|
+
2. `find.md` → Query linked entities to find related entities
|
|
@@ -12,7 +12,7 @@ The schema defines the data model: what **entity types** (flavors) exist and wha
|
|
|
12
12
|
## Key Concepts
|
|
13
13
|
|
|
14
14
|
- **Flavors** = Entity types. Each entity belongs to exactly one flavor.
|
|
15
|
-
- Examples: "
|
|
15
|
+
- Examples: "organization" (FID 10), "person" (FID 9), "financial_instrument" (FID 3)
|
|
16
16
|
- Identified by a Flavor ID (FID) — a small integer
|
|
17
17
|
- **Properties** = Attributes that entities can have. Each property has:
|
|
18
18
|
- A Property ID (PID) — a small integer
|
|
@@ -30,8 +30,8 @@ There are two schema endpoints with different levels of detail:
|
|
|
30
30
|
| `GET /elemental/metadata/schema` | fid, name only | pid, name, type only |
|
|
31
31
|
|
|
32
32
|
**Use `/schema`** (recommended) when you need:
|
|
33
|
-
- Human-readable display names (e.g., "
|
|
34
|
-
- Units of measurement (e.g., "m", "kg"
|
|
33
|
+
- Human-readable display names (e.g., "Organization" vs "organization")
|
|
34
|
+
- Units of measurement (e.g., "m", "kg")
|
|
35
35
|
- Which flavors a property applies to (`domain_findexes`)
|
|
36
36
|
|
|
37
37
|
**Use `/elemental/metadata/schema`** when you just need basic FID/PID to name mappings.
|
|
@@ -48,28 +48,6 @@ There are two schema endpoints with different levels of detail:
|
|
|
48
48
|
2. **Find entities of a type** → `POST /elemental/find` with `is_type` expression
|
|
49
49
|
3. **Get property values** → `POST /elemental/entities/properties` to fetch values for those entities
|
|
50
50
|
|
|
51
|
-
## Common Properties by Entity Type
|
|
52
|
-
|
|
53
|
-
This is a quick-reference for writing first-pass code. **The schema endpoint
|
|
54
|
-
is the source of truth** — always call `GET /schema` to get actual PIDs and
|
|
55
|
-
confirm which properties exist in a given deployment. Property availability
|
|
56
|
-
varies by dataset.
|
|
57
|
-
|
|
58
|
-
| Entity Type | Common Properties |
|
|
59
|
-
|---|---|
|
|
60
|
-
| **organization** | `name`, `country`, `ticker`, `industry`, `business_sector`, `sic_code`, `state_of_incorporation`, `mailing_address`, `business_phone`, `company_cik` |
|
|
61
|
-
| **person** | `name`, `country`, `nationality`, `birth_date`, `position`, `person_cik`, `job_title` |
|
|
62
|
-
| **financial_instrument** | `name`, `ticker`, `security_type`, `instrument_type`, `cusip_number` |
|
|
63
|
-
| **document** (SEC filings) | `name`, `title`, `form_type`, `filing_date`, `report_date`, `accession_number`, `form_type_detail` |
|
|
64
|
-
| **article** | `name`, `title`, `sentiment` |
|
|
65
|
-
| **event** | `name`, `category`, `date`, `description`, `likelihood` |
|
|
66
|
-
| **location** | `name`, `fixedLatitude`, `fixedLongitude` |
|
|
67
|
-
|
|
68
|
-
**Relationship properties** (type `data_nindex`) link entities to each other.
|
|
69
|
-
Common ones for organizations: `acquires`, `owns`, `competes_with`,
|
|
70
|
-
`partnered_with`, `does_business_with`, `is_part_of`, `issues`, `has_subsidiary`.
|
|
71
|
-
For people: `works_at`, `head_of`, `is_director`, `is_officer`, `is_colleague_of`.
|
|
72
|
-
|
|
73
51
|
<!-- BEGIN GENERATED CONTENT -->
|
|
74
52
|
|
|
75
53
|
## Endpoints
|
|
@@ -102,7 +80,7 @@ GET /schema
|
|
|
102
80
|
**Response:**
|
|
103
81
|
|
|
104
82
|
```json
|
|
105
|
-
{"flavors": [{"findex":
|
|
83
|
+
{"flavors": [{"findex": 9, "name": "person", "singular_display_name": "Person", "plural_display_name": "People"}, {"findex": 10, "name": "organization", "singular_display_name": "Organization", "plural_display_name": "Organizations"}], "properties": [{"pid": 8, "name": "name", "display_name": "Name", "value_type": "data_cat"}, {"pid": 15, "name": "industry", "display_name": "Industry", "value_type": "data_cat"}]}
|
|
106
84
|
```
|
|
107
85
|
|
|
108
86
|
---
|
|
@@ -210,7 +188,7 @@ Returns comprehensive schema information including all entity types (flavors), p
|
|
|
210
188
|
|
|
211
189
|
#### Guidance
|
|
212
190
|
|
|
213
|
-
Response is wrapped in a 'schema' container object. Access flavors and properties via response.schema.flavors and response.schema.properties. Flavors contain: fid (unique identifier), name (e.g., '
|
|
191
|
+
Response is wrapped in a 'schema' container object. Access flavors and properties via response.schema.flavors and response.schema.properties. Flavors contain: fid (unique identifier), name (e.g., 'organization', 'person'). Properties contain: pid (unique identifier), name (e.g., 'name', 'industry'), type (e.g., 'data_float', 'data_int', 'data_cat', 'data_nindex').
|
|
214
192
|
|
|
215
193
|
#### Responses
|
|
216
194
|
|
|
@@ -231,7 +209,7 @@ GET /elemental/metadata/schema
|
|
|
231
209
|
**Response:**
|
|
232
210
|
|
|
233
211
|
```json
|
|
234
|
-
{"op_id": "40dc4cd9-f1b2-4b5c-85d0-c7c61256e5d9", "follow_up": false, "schema": {"flavors": [{"fid":
|
|
212
|
+
{"op_id": "40dc4cd9-f1b2-4b5c-85d0-c7c61256e5d9", "follow_up": false, "schema": {"flavors": [{"fid": 9, "name": "person"}, {"fid": 10, "name": "organization"}, {"fid": 3, "name": "financial_instrument"}], "properties": [{"pid": 8, "name": "name", "type": "data_cat"}, {"pid": 15, "name": "industry", "type": "data_cat"}]}}
|
|
235
213
|
```
|
|
236
214
|
|
|
237
215
|
---
|
|
@@ -279,10 +257,11 @@ Entity type (flavor) with human-readable display names
|
|
|
279
257
|
|
|
280
258
|
| Field | Type | Description |
|
|
281
259
|
|-------|------|-------------|
|
|
260
|
+
| description | string | Semantic description of what this flavor represents |
|
|
282
261
|
| findex | integer | Unique flavor identifier (same as fid in other endpoints) |
|
|
283
262
|
| name | string | Flavor name (internal identifier) |
|
|
284
|
-
| plural_display_name | string | Human-readable plural name (e.g., "
|
|
285
|
-
| singular_display_name | string | Human-readable singular name (e.g., "
|
|
263
|
+
| plural_display_name | string | Human-readable plural name (e.g., "People") |
|
|
264
|
+
| singular_display_name | string | Human-readable singular name (e.g., "Person") |
|
|
286
265
|
|
|
287
266
|
### SchemaProperty
|
|
288
267
|
|
|
@@ -290,6 +269,7 @@ Property with display name, unit, and domain information
|
|
|
290
269
|
|
|
291
270
|
| Field | Type | Description |
|
|
292
271
|
|-------|------|-------------|
|
|
272
|
+
| description | string | Semantic description of what this property represents |
|
|
293
273
|
| display_name | string | Human-readable property name |
|
|
294
274
|
| domain_findexes | integer[] | Flavor IDs (findexes) that can have this property |
|
|
295
275
|
| name | string | Property name (internal identifier) |
|