curl -X POST "https://api.factagora.com/api/v1/causality-graph" \ -H "Authorization: Bearer fct_your_api_key" \ -H "Content-Type: application/json" \ -d '{"text": "Rising interest rates cause lower consumer spending, which leads to reduced GDP growth and higher unemployment."}'
{ "nodes": [ { "id": "n1", "label": "Rising interest rates" }, { "id": "n2", "label": "Lower consumer spending" }, { "id": "n3", "label": "Reduced GDP growth" }, { "id": "n4", "label": "Higher unemployment" } ], "edges": [ { "from": "n1", "to": "n2", "label": "causes" }, { "from": "n2", "to": "n3", "label": "leads to" }, { "from": "n3", "to": "n4", "label": "leads to" } ], "meta": { "total_nodes": 4, "total_edges": 3, "executionTimeMs": 640 } }
Extract a causal relationship graph from a URL or text
url
text
Show Node fields
Show Edge fields
Show Meta fields
Was this page helpful?