GALENAPI

Knowledge Graph

Free

Search, explore, and traverse 855,000+ cancer biology entities and 7.7 million relationships — every one traced to its original data source with a Pearl Causal Hierarchy layer.

Only in Galen

Every relationship is annotated with a Pearl Causal Hierarchy layer (L1 association, L2 intervention, L3 counterfactual) and traced to its original data source. Unlike LLM-generated answers, every fact is provenance-grounded and verifiable. This is not summarized from the internet — it is structured, validated, experimental evidence from peer-reviewed biomedical databases.

GET/entities/{name}
Free

Get Entity Profile

Retrieve the full profile for a cancer biology entity including metadata, relationships, and evidence provenance.

Only in Galen

Every relationship is annotated with a Pearl Causal Hierarchy layer (L1 association, L2 intervention, L3 counterfactual) and traced to its original data source. Unlike LLM-generated answers, every fact is provenance-grounded and independently verifiable.

Parameters

Path Parameters
NameTypeReqDescription
namestring

Entity name — gene name (EGFR), drug name (erlotinib), disease (NSCLC), pathway (MAPK), mutation (BRAF_V600E), etc.

Example: EGFR

Query Parameters
NameTypeReqDescription
max_relationshipsinteger

Maximum number of relationships to include in the response. Set to 0 for entity metadata only.

Default: 50

Example: 100

Response Schema

idstringUnique entity identifier
namestringHuman-readable entity name
entity_typestringgene, drug, disease, pathway, mutation, protein, cell_line, or clinical_trial
propertiesobjectEntity-specific metadata — molecular weight for drugs, chromosome location for genes, etc.
confidencefloatConfidence score from 0.0 to 1.0 based on evidence quality
provenancestringOriginal data source that contributed this entity
relationship_countintegerTotal relationships across all types
pch_summaryobjectDistribution of relationships across Pearl Causal Hierarchy layers
├──l1_countintegerNumber of L1 (associational) relationships
├──l2_countintegerNumber of L2 (interventional) relationships
└──l3_countintegerNumber of L3 (counterfactual) relationships
relationshipsarrayTyped relationships to other entities
├──source_idstringSource entity identifier
├──target_idstringTarget entity identifier
├──relationship_typestringEdge type (e.g. targets, inhibits, mutated_in)
├──confidencefloatRelationship confidence score (0.0–1.0)
├──pch_layerintegerPearl Causal Hierarchy layer (1, 2, or 3)
├──evidence_typestringType of supporting evidence
└──provenancestringData source for this relationship

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/entities/EGFR",
    params={"max_relationships": 100},
    headers={"X-API-Key": "YOUR_API_KEY"},
)
entity = resp.json()
print(f"{entity['name']} ({entity['entity_type']}) — {entity['relationship_count']} relationships")
print(f"  PCH: L1={entity['pch_summary']['l1_count']}, L2={entity['pch_summary']['l2_count']}, L3={entity['pch_summary']['l3_count']}")

Example Response

{
  "id": "gene:egfr",
  "name": "EGFR",
  "entity_type": "gene",
  "properties": {
    "full_name": "Epidermal Growth Factor Receptor",
    "chromosome": "7p11.2",
    "uniprot_id": "P00533",
    "gene_family": "Receptor tyrosine kinase",
    "oncokb_annotated": true
  },
  "confidence": 0.97,
  "provenance": "cosmic",
  "relationship_count": 1342,
  "pch_summary": {
    "l1_count": 876,
    "l2_count": 389,
    "l3_count": 77
  },
  "relationships": [
    {
      "source_id": "drug:erlotinib",
      "target_id": "gene:egfr",
      "relationship_type": "targets",
      "confidence": 0.96,
      "pch_layer": 2,
      "evidence_type": "experimental",
      "provenance": "chembl_36"
    },
    {
      "source_id": "gene:egfr",
      "target_id": "disease:nsclc",
      "relationship_type": "driver_in",
      "confidence": 0.94,
      "pch_layer": 2,
      "evidence_type": "clinical_genomics",
      "provenance": "cbioportal"
    },
    {
      "source_id": "gene:egfr",
      "target_id": "pathway:mapk_signaling",
      "relationship_type": "member_of",
      "confidence": 0.99,
      "pch_layer": 1,
      "evidence_type": "curated",
      "provenance": "reactome"
    },
    {
      "source_id": "mutation:egfr_l858r",
      "target_id": "gene:egfr",
      "relationship_type": "variant_in_gene",
      "confidence": 0.98,
      "pch_layer": 1,
      "evidence_type": "curated",
      "provenance": "cosmic"
    },
    {
      "source_id": "drug:osimertinib",
      "target_id": "gene:egfr",
      "relationship_type": "targets",
      "confidence": 0.97,
      "pch_layer": 2,
      "evidence_type": "experimental",
      "provenance": "chembl_36"
    }
  ]
}

Try It

Path Parameters

stringrequired

Entity name — gene name (EGFR), drug name (erlotinib), disease (NSCLC), pathway (MAPK), mutation (BRAF_V600E), etc.

Query Parameters

integer

Maximum number of relationships to include in the response. Set to 0 for entity metadata only.

GET https://research.usegalen.com/api/v1/entities/{name}
GET/entities/search
Free

Search Entities

Search the knowledge graph for entities matching a query string.

Only in Galen

Searches across 855,000+ structured cancer biology entities from 10+ databases — not web results or LLM memory. Every result is a verified entity with typed relationships and evidence provenance.

Parameters

Query Parameters
NameTypeReqDescription
qstring

Search query — matches entity names by prefix. Case-insensitive.

Example: KRAS

entity_typestring

Filter by entity type

genedrugdiseasepathwaymutationproteincell_lineclinical_trial
limitinteger

Maximum results to return

Default: 20

Example: 10

offsetinteger

Number of results to skip for pagination

Default: 0

Response Schema

resultsarrayMatching entities ordered by relevance
├──idstringUnique entity identifier
├──namestringHuman-readable entity name
├──entity_typestringEntity type classification
├──confidencefloatConfidence score (0.0–1.0)
└──relationship_countintegerTotal relationships for this entity
totalintegerTotal matching entities across all pages
querystringThe search query that was executed

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/entities/search",
    params={"q": "KRAS", "entity_type": "gene", "limit": 10},
    headers={"X-API-Key": "YOUR_API_KEY"},
)
data = resp.json()
for entity in data["results"]:
    print(f"{entity['name']} ({entity['entity_type']}) — {entity['relationship_count']} rels")

Example Response

{
  "results": [
    {
      "id": "gene:kras",
      "name": "KRAS",
      "entity_type": "gene",
      "confidence": 0.98,
      "relationship_count": 2104
    },
    {
      "id": "mutation:kras_g12c",
      "name": "KRAS_G12C",
      "entity_type": "mutation",
      "confidence": 0.96,
      "relationship_count": 487
    },
    {
      "id": "mutation:kras_g12d",
      "name": "KRAS_G12D",
      "entity_type": "mutation",
      "confidence": 0.95,
      "relationship_count": 412
    }
  ],
  "total": 3,
  "query": "KRAS"
}

Try It

Query Parameters

stringrequired

Search query — matches entity names by prefix. Case-insensitive.

string

Filter by entity type

integer

Maximum results to return

integer

Number of results to skip for pagination

GET https://research.usegalen.com/api/v1/entities/search
GET/entities/{name}/relationships
Free

Get Entity Relationships

Retrieve relationships for an entity with filtering by type, PCH layer, and direction.

Only in Galen

Filter relationships by Pearl Causal Hierarchy layer to distinguish statistical associations (L1) from experimental interventions (L2) from counterfactual reasoning (L3). No other API annotates cancer biology relationships with formal causal hierarchy levels.

Parameters

Path Parameters
NameTypeReqDescription
namestring

Entity name to retrieve relationships for

Example: EGFR

Query Parameters
NameTypeReqDescription
relationship_typestring

Filter by relationship type — e.g. targets, inhibits, mutated_in, member_of

pch_layerinteger

Filter by Pearl Causal Hierarchy layer

123
directionstring

Filter by edge direction relative to the entity

Default: both

bothincomingoutgoing
limitinteger

Maximum number of relationships to return

Default: 50

offsetinteger

Number of results to skip for pagination

Default: 0

Response Schema

relationshipsarrayTyped relationships with evidence metadata
├──idstringUnique relationship identifier
├──source_idstringSource entity identifier
├──source_namestringSource entity display name
├──target_idstringTarget entity identifier
├──target_namestringTarget entity display name
├──relationship_typestringEdge type (e.g. targets, inhibits, mutated_in)
├──confidencefloatRelationship confidence score (0.0–1.0)
├──pch_layerintegerPearl Causal Hierarchy layer (1, 2, or 3)
├──evidence_typestringType of supporting evidence
└──provenancestringData source for this relationship
totalintegerTotal matching relationships across all pages
entity_idstringThe queried entity identifier

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/entities/EGFR/relationships",
    params={"pch_layer": 2, "direction": "incoming", "limit": 20},
    headers={"X-API-Key": "YOUR_API_KEY"},
)
data = resp.json()
for rel in data["relationships"]:
    print(f"{rel['source_name']} —[{rel['relationship_type']}]→ {rel['target_name']} (L{rel['pch_layer']}, {rel['provenance']})") 

Example Response

{
  "relationships": [
    {
      "id": "rel:drug_egfr_erlotinib_targets_001",
      "source_id": "drug:erlotinib",
      "source_name": "erlotinib",
      "target_id": "gene:egfr",
      "target_name": "EGFR",
      "relationship_type": "targets",
      "confidence": 0.96,
      "pch_layer": 2,
      "evidence_type": "experimental",
      "provenance": "chembl_36"
    },
    {
      "id": "rel:drug_egfr_gefitinib_targets_002",
      "source_id": "drug:gefitinib",
      "source_name": "gefitinib",
      "target_id": "gene:egfr",
      "target_name": "EGFR",
      "relationship_type": "targets",
      "confidence": 0.95,
      "pch_layer": 2,
      "evidence_type": "experimental",
      "provenance": "chembl_36"
    },
    {
      "id": "rel:drug_egfr_osimertinib_targets_003",
      "source_id": "drug:osimertinib",
      "source_name": "osimertinib",
      "target_id": "gene:egfr",
      "target_name": "EGFR",
      "relationship_type": "targets",
      "confidence": 0.97,
      "pch_layer": 2,
      "evidence_type": "experimental",
      "provenance": "chembl_36"
    },
    {
      "id": "rel:mut_egfr_l858r_variant_004",
      "source_id": "mutation:egfr_l858r",
      "source_name": "EGFR_L858R",
      "target_id": "gene:egfr",
      "target_name": "EGFR",
      "relationship_type": "variant_in_gene",
      "confidence": 0.98,
      "pch_layer": 1,
      "evidence_type": "curated",
      "provenance": "cosmic"
    },
    {
      "id": "rel:gene_egfr_mapk_member_005",
      "source_id": "gene:egfr",
      "source_name": "EGFR",
      "target_id": "pathway:mapk_signaling",
      "target_name": "MAPK signaling pathway",
      "relationship_type": "member_of",
      "confidence": 0.99,
      "pch_layer": 1,
      "evidence_type": "curated",
      "provenance": "reactome"
    }
  ],
  "total": 1342,
  "entity_id": "gene:egfr"
}

Try It

Path Parameters

stringrequired

Entity name to retrieve relationships for

Query Parameters

string

Filter by relationship type — e.g. targets, inhibits, mutated_in, member_of

integer

Filter by Pearl Causal Hierarchy layer

string

Filter by edge direction relative to the entity

integer

Maximum number of relationships to return

integer

Number of results to skip for pagination

GET https://research.usegalen.com/api/v1/entities/{name}/relationships
GET/entities/{name}/subgraph
Free

Extract Subgraph

Extract a multi-hop subgraph centered on an entity from the knowledge graph.

Only in Galen

Extract multi-hop subgraphs from a knowledge graph built on 13 experimental databases. Nodes and edges carry confidence scores and causal hierarchy annotations — giving you a structured, evidence-graded local network, not an LLM-hallucinated diagram.

Parameters

Path Parameters
NameTypeReqDescription
namestring

Entity name to build subgraph around

Example: EGFR

Query Parameters
NameTypeReqDescription
radiusinteger

Number of hops from center entity (1–3)

Default: 1

Example: 2

max_nodesinteger

Maximum nodes to include (10–1000)

Default: 100

Response Schema

centerstringThe center entity identifier
radiusintegerThe traversal radius used
nodesarrayAll entities within the subgraph
├──idstringUnique entity identifier
├──namestringHuman-readable entity name
├──entity_typestringEntity type classification
└──confidencefloatEntity confidence score (0.0–1.0)
edgesarrayAll relationships within the subgraph
├──source_idstringSource entity identifier
├──target_idstringTarget entity identifier
├──relationship_typestringEdge type
├──confidencefloatRelationship confidence score (0.0–1.0)
└──pch_layerintegerPearl Causal Hierarchy layer (1, 2, or 3)
node_countintegerTotal number of nodes in the subgraph
edge_countintegerTotal number of edges in the subgraph

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/entities/BRAF/subgraph",
    params={"radius": 2, "max_nodes": 100},
    headers={"X-API-Key": "YOUR_API_KEY"},
)
graph = resp.json()
print(f"Subgraph: {graph['node_count']} nodes, {graph['edge_count']} edges (radius={graph['radius']})")
for node in graph["nodes"][:5]:
    print(f"  {node['name']} ({node['entity_type']})")

Example Response

{
  "center": "gene:braf",
  "radius": 2,
  "nodes": [
    {
      "id": "gene:braf",
      "name": "BRAF",
      "entity_type": "gene",
      "confidence": 0.98
    },
    {
      "id": "gene:map2k1",
      "name": "MEK1",
      "entity_type": "gene",
      "confidence": 0.97
    },
    {
      "id": "gene:map2k2",
      "name": "MEK2",
      "entity_type": "gene",
      "confidence": 0.96
    },
    {
      "id": "pathway:mapk_signaling",
      "name": "MAPK signaling pathway",
      "entity_type": "pathway",
      "confidence": 0.99
    },
    {
      "id": "drug:vemurafenib",
      "name": "vemurafenib",
      "entity_type": "drug",
      "confidence": 0.96
    },
    {
      "id": "drug:dabrafenib",
      "name": "dabrafenib",
      "entity_type": "drug",
      "confidence": 0.95
    },
    {
      "id": "disease:melanoma",
      "name": "melanoma",
      "entity_type": "disease",
      "confidence": 0.97
    },
    {
      "id": "mutation:braf_v600e",
      "name": "BRAF_V600E",
      "entity_type": "mutation",
      "confidence": 0.98
    },
    {
      "id": "gene:mapk1",
      "name": "ERK2",
      "entity_type": "gene",
      "confidence": 0.95
    },
    {
      "id": "drug:trametinib",
      "name": "trametinib",
      "entity_type": "drug",
      "confidence": 0.94
    }
  ],
  "edges": [
    {
      "source_id": "gene:braf",
      "target_id": "gene:map2k1",
      "relationship_type": "phosphorylates",
      "confidence": 0.96,
      "pch_layer": 2
    },
    {
      "source_id": "gene:braf",
      "target_id": "gene:map2k2",
      "relationship_type": "phosphorylates",
      "confidence": 0.94,
      "pch_layer": 2
    },
    {
      "source_id": "gene:braf",
      "target_id": "pathway:mapk_signaling",
      "relationship_type": "member_of",
      "confidence": 0.99,
      "pch_layer": 1
    },
    {
      "source_id": "drug:vemurafenib",
      "target_id": "gene:braf",
      "relationship_type": "targets",
      "confidence": 0.96,
      "pch_layer": 2
    },
    {
      "source_id": "drug:dabrafenib",
      "target_id": "gene:braf",
      "relationship_type": "targets",
      "confidence": 0.95,
      "pch_layer": 2
    },
    {
      "source_id": "gene:braf",
      "target_id": "disease:melanoma",
      "relationship_type": "driver_in",
      "confidence": 0.97,
      "pch_layer": 2
    },
    {
      "source_id": "mutation:braf_v600e",
      "target_id": "gene:braf",
      "relationship_type": "variant_in_gene",
      "confidence": 0.98,
      "pch_layer": 1
    },
    {
      "source_id": "gene:map2k1",
      "target_id": "gene:mapk1",
      "relationship_type": "phosphorylates",
      "confidence": 0.95,
      "pch_layer": 2
    },
    {
      "source_id": "drug:trametinib",
      "target_id": "gene:map2k1",
      "relationship_type": "targets",
      "confidence": 0.94,
      "pch_layer": 2
    },
    {
      "source_id": "gene:map2k1",
      "target_id": "pathway:mapk_signaling",
      "relationship_type": "member_of",
      "confidence": 0.98,
      "pch_layer": 1
    }
  ],
  "node_count": 10,
  "edge_count": 10
}

Try It

Path Parameters

stringrequired

Entity name to build subgraph around

Query Parameters

integer

Number of hops from center entity (1–3)

integer

Maximum nodes to include (10–1000)

GET https://research.usegalen.com/api/v1/entities/{name}/subgraph
GET/knowledge/pch
Free

Get PCH Annotations

Get the knowledge-graph-wide Pearl Causal Hierarchy distribution.

Only in Galen

The Pearl Causal Hierarchy is Galen's foundational framework. Every relationship is classified as L1 (seeing — statistical association), L2 (doing — experimental intervention), or L3 (imagining — counterfactual reasoning). This endpoint gives you the exact evidence quality distribution for any entity. No other cancer API applies formal causal epistemology.

Response Schema

total_entitiesintegerTotal entities in the knowledge graph
l1_countintegerNumber of L1 (associational) relationships
l2_countintegerNumber of L2 (interventional) relationships — from CRISPR, drug screens, etc.
l3_countintegerNumber of L3 (counterfactual) relationships — validated via Structural Causal Models
l1_fractionfloatFraction of relationships at L1
l2_fractionfloatFraction of relationships at L2
l3_fractionfloatFraction of relationships at L3
totalintegerTotal number of relationships

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/knowledge/pch",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
pch = resp.json()
print(f"KG-wide PCH distribution:")
print(f"  L1 (associations):    {pch['l1_count']} ({pch['l1_fraction']:.0%})")
print(f"  L2 (interventions):   {pch['l2_count']} ({pch['l2_fraction']:.0%})")
print(f"  L3 (counterfactuals): {pch['l3_count']} ({pch['l3_fraction']:.0%})")

Example Response

{
  "total_entities": 283421,
  "l1_count": 3247891,
  "l2_count": 1287432,
  "l3_count": 215960,
  "l1_fraction": 0.683,
  "l2_fraction": 0.271,
  "l3_fraction": 0.045,
  "total": 4751283
}

Try It

GET https://research.usegalen.com/api/v1/knowledge/pch
GET/relationships/paths
Free

Find Paths Between Entities

Discover all paths connecting two entities in the knowledge graph.

Only in Galen

Discover how any two cancer biology entities are connected through the knowledge graph. Paths traverse typed, directed edges with causal annotations — showing you the biological mechanism chain, not just that a connection exists.

Parameters

Query Parameters
NameTypeReqDescription
sourcestring

Starting entity

Example: EGFR

targetstring

Destination entity

Example: erlotinib

max_hopsinteger

Maximum path length (1–5)

Default: 3

max_pathsinteger

Maximum number of paths to return (1–50)

Default: 10

Response Schema

sourcestringThe source entity identifier
targetstringThe target entity identifier
pathsarrayArray of paths, each an array of hop objects
├──entitystringEntity at this position in the path
├──relationship_typestringRelationship type traversed
└──directionstringEdge direction (forward or reverse)
path_countintegerNumber of paths found

Example Request

import requests

resp = requests.get(
    "https://research.usegalen.com/api/v1/relationships/paths",
    params={"source": "EGFR", "target": "erlotinib", "max_hops": 3, "max_paths": 10},
    headers={"X-API-Key": "YOUR_API_KEY"},
)
data = resp.json()
print(f"Found {data['path_count']} paths from {data['source']} to {data['target']}:")
for i, path in enumerate(data["paths"], 1):
    steps = " → ".join(step["entity"] for step in path)
    print(f"  Path {i}: {steps}")

Example Response

{
  "source": "gene:egfr",
  "target": "drug:erlotinib",
  "paths": [
    [
      {
        "entity": "EGFR",
        "relationship_type": "targets",
        "direction": "reverse"
      },
      {
        "entity": "erlotinib",
        "relationship_type": "targets",
        "direction": "forward"
      }
    ],
    [
      {
        "entity": "EGFR",
        "relationship_type": "member_of",
        "direction": "forward"
      },
      {
        "entity": "MAPK signaling pathway",
        "relationship_type": "member_of",
        "direction": "reverse"
      },
      {
        "entity": "erlotinib",
        "relationship_type": "targets",
        "direction": "forward"
      }
    ],
    [
      {
        "entity": "EGFR",
        "relationship_type": "driver_in",
        "direction": "forward"
      },
      {
        "entity": "NSCLC",
        "relationship_type": "indicated_for",
        "direction": "reverse"
      },
      {
        "entity": "erlotinib",
        "relationship_type": "indicated_for",
        "direction": "forward"
      }
    ]
  ],
  "path_count": 3
}

Try It

Query Parameters

stringrequired

Starting entity

stringrequired

Destination entity

integer

Maximum path length (1–5)

integer

Maximum number of paths to return (1–50)

GET https://research.usegalen.com/api/v1/relationships/paths