Skip to content
Follow yggy on LinkedInFollow @yggy_tech on X

Read extracted facts

After extraction, list completed documents and read their triples. This sample continues from Upload and extract with Q4 report.pdf in project 0xproject.

Ranked retrieval is available through Query the graph. Graph search, path finding, and write previews stay on Chat and MCP. The REST routes below return document-scoped facts and individual records by ID.

Every parameter and response field is in the Reference.

Terminal window
curl --fail-with-body \
--header "x-api-key: $YGGY_API_KEY" \
--header "x-yggy-organization-id: acme-corp" \
"https://api.yggy.tech/api/v1/projects"

A successful response has this form:

{
"success": true,
"projects": [
{
"id": "0xproject",
"slug": "acme-q4",
"name": "Acme Q4",
"color": "lime",
"organizationId": "org_example"
}
]
}

Use projects[].id as {projectId} in later routes.

Terminal window
curl --fail-with-body \
--header "x-api-key: $YGGY_API_KEY" \
--header "x-yggy-organization-id: acme-corp" \
"https://api.yggy.tech/api/v1/projects/0xproject/documents?status=completed&limit=20"

A successful response has this form:

{
"documents": [
{
"documentId": "9f3c1a2e-4b7d-4e11-9c22-0a1b2c3d4e5f",
"title": "Q4 report.pdf",
"status": "COMPLETED",
"tripleCount": 84
}
],
"total": 1,
"limit": 20,
"offset": 0
}

If total is 0, extraction has not finished or the project has no completed documents. Wait and retry, or check status as in Upload and extract.

Terminal window
curl --fail-with-body \
--header "x-api-key: $YGGY_API_KEY" \
--header "x-yggy-organization-id: acme-corp" \
"https://api.yggy.tech/api/v1/projects/0xproject/documents/9f3c1a2e-4b7d-4e11-9c22-0a1b2c3d4e5f/triples"

A successful response includes the extracted facts:

{
"triples": [
{
"id": "0xtriple",
"subject": "Acme Corp",
"predicate": "supplies",
"object": "Rotor Assembly",
"evidence": ["Acme Corp supplies the Rotor Assembly for the Q4 line."]
}
]
}

The response can contain more fields. Delete a triple by ID when your key includes graph:delete. Deleting an entity needs a person signed in to the yggy app; see Authentication. Do not parse error.message; use error.code as described in Errors and rate limits.