Facts
GET
/v1/factsGet extracted facts from your memories. Facts are discrete pieces of information automatically extracted from your content.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Max facts to return (default: 50) |
offset | number | No | Pagination offset |
entity | string | No | Filter facts about specific entity |
category | string | No | Filter by fact category |
confidence | number | No | Minimum confidence score (0-1) |
Examples
Get All Facts
curl https://api.hypersave.io/v1/facts \
-H "Authorization: Bearer YOUR_API_KEY"Filter by Entity
curl "https://api.hypersave.io/v1/facts?entity=John%20Smith" \
-H "Authorization: Bearer YOUR_API_KEY"High Confidence Facts Only
curl "https://api.hypersave.io/v1/facts?confidence=0.9" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"facts": [
{
"id": "fact_abc123",
"statement": "John Smith is the CEO of Acme Corp",
"subject": "John Smith",
"predicate": "is CEO of",
"object": "Acme Corp",
"category": "role",
"confidence": 0.95,
"source": {
"documentId": "doc_xyz789",
"excerpt": "...announced that John Smith, CEO of Acme Corp..."
},
"extractedAt": "2024-01-15T10:30:00Z"
},
{
"id": "fact_def456",
"statement": "The product launch is scheduled for March 15th",
"subject": "product launch",
"predicate": "scheduled for",
"object": "March 15th",
"category": "date",
"confidence": 0.92,
"source": {
"documentId": "doc_abc123",
"excerpt": "...confirmed the product launch is scheduled for March 15th..."
},
"extractedAt": "2024-01-14T16:45:00Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 234
}
}Fact Categories
| Category | Description | Example |
|---|---|---|
role | Job titles and positions | "John is CEO of Acme" |
date | Dates and deadlines | "Launch is March 15" |
metric | Numbers and statistics | "Revenue grew 45%" |
relationship | Connections between entities | "Acme acquired Beta" |
attribute | Properties of entities | "Product is cloud-based" |
event | Things that happened | "Team met on Monday" |
Facts are automatically extracted when you save content. The confidence score indicates how certain the extraction is.
Error Responses
Invalid Category
{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Invalid category: unknown"
}