GET data/connection

pharmgkb.org:pharmgkb-api

Summary: Query connections (aka relationships) between two objects, referred to as 'object 1' and 'object2'
Operation ID:
Auth: none

Parameters (7)

object1Id (string, query, optional)

the ID of object 1 to find connections for

object1Name (string, query, optional)

the name of object 1 to find connections for

object1Type (string, query, optional)

the type of object 1 to find connections for

object2Id (string, query, optional)

the ID of object 2 to find connections for

object2Name (string, query, optional)

the name of object 2 to find connections for

object2Type (string, query, optional)

the type of object 2 to find connections for

view (string, query, optional)

How much data to retrieve on the object

Constraints: {'enum': ['min', 'base', 'max']}

Examples (3)

TitleTypeURLAction
Find connections for a specific gene by ID curl https://api.pharmgkb.org/v1/data/connection?object1Type=Gene&object1Id=PA267
Find connections between warfarin and related genes curl https://api.pharmgkb.org/v1/data/connection?object1Type=Chemical&object1Name=warfarin&object2Type=Gene
Get detailed view of connections between CYP2C9 gene and chemicals curl https://api.pharmgkb.org/v1/data/connection?object1Type=Gene&object1Id=PA126&object2Type=Chemical&view=max

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-03-23 10:45:28.372970 200 650ms
2026-03-23 10:44:25.245218 200 790ms 1.9MB
2026-03-23 10:33:24.363297 200 587ms

Response Changes

WhenOldNew
2026-03-23 10:44:25.245218 b0bc13da2d09 f4e888f1f21e
2026-03-23 10:45:28.372970 f4e888f1f21e f3e642af053b