Skip to content

Targets and ontologies ​

Method and pathPurpose
POST /v3/targets/querySearch targets (query endpoint)
GET /v3/schema/targetsPublished fields
POST /v2/targets/Flat-filter target list
GET /v2/targets/filters/Allowed filter values
GET /v2/targets/{target_id}/One target
GET /v3/ontologies/targets/Target ontology
GET /v3/ontologies/modalities/Modality ontology
GET /v2/ontologies/diseases/Disease ontology
POST /v3/trials/disease-class/Disease name to class ids
POST /v3/trials/modality-class/Modality name to class ids

Targets ​

A target record is a node of the target ontology: a single target (PD-1) or a grouping (is_class: true), with drug counts by phase and disease.

bash
curl -X POST https://api.gosset.ai/v3/targets/query \
  -H "Authorization: Bearer $GOSSET_API_KEY" -H "Content-Type: application/json" \
  -d '{"where": {"field": "name", "op": "is", "value": "PD-1"}, "limit": 2}'
json
{"total": 2, "limit": 2, "offset": 0, "max_page_size": 50, "schema_version": "v3",
 "results": [{"target_id": "GT-11-01", "name": "Programmed cell death protein 1", "abbreviation": "PD-1",
   "aliases": ["Programmed cell death protein 1", "PD-1", "CD279", "..."], "is_class": false, "highest_phase": "Approved",
   "drug_counts": {"approved": 17, "phase_3": 42, "phase_2": 107, "phase_1": 88, "preclinical": 4178, "total": 4432},
   "disease_drug_counts": {"GD-01": 118, "GD-01-01": 70, "...": "..."},
   "disease_effect_phases": {"GD-01": {"Agonist": "3", "Antagonist": "4", "...": "..."}, "...": "..."},
   "therapy_type_by_phase": {"0": {"combination": 3849, "mono": 329}, "...": "..."},
   "failure_modes_by_phase": {"1": {"safety concerns": 12, "lack of efficacy": 4, "...": "..."}, "...": "..."}}, "..."]}

name and target match name, abbreviation and aliases. phase takes a whole number (0–4); Approved is a 400 on targets.

GET /v2/targets/GT-11-01/ returns the stored record for one target, not the v3 shape: the id is in class_id (there is no target_id), and the record also carries _id, parent_ids and hits (an internal relevance score, used as the default sort). The other fields match the table below.

json
{"class_id": "GT-11-01", "name": "Programmed cell death protein 1", "abbreviation": "PD-1", "highest_phase": "Approved",
 "hits": 4934, "is_class": false, "parent_ids": ["GT-11"],
 "drug_counts": {"approved": 17, "phase_1": 88, "phase_2": 107, "phase_3": 42, "preclinical": 4178, "total": 4432}, "...": "..."}

A bad id is 400 {"message": "Invalid target ID"}; an unknown one 404.

List: POST /v2/targets/ ​

Send values as comma-separated strings on this endpoint, not JSON lists.

Unknown filter names are ignored. This endpoint does not check keys: a misspelled or unsupported filter is dropped without an error, and the results come back unfiltered. Check each key against this table, or use the query endpoint, which rejects unknown fields with a 400.

KeyBehaviour
queryText in name, abbreviation and aliases. Do not combine with disease_classes: the text match replaces the disease filter
target_classesGT-… ids
disease_classesGD-… ids; adds filtered_drug_count
highest_phase0 (preclinical), 1, 2, 3, 4 or Approved (4 and Approved match each other). Preclinical matches nothing here; send 0
filtered_phasePhase in the selected diseases: Preclinical, 1, 2, 3, Approved
drug_effectsSee the filters endpoint
molecular_classifications, biological_functions, disease_rolesComma-separated values
include_classestrue to include grouping nodes
offset, limit, sort_bylimit default and maximum 50. Default sort -hits. Also phase, filtered_phase, drug_count_total, drug_count_per_indication

Response fields ​

FieldMeaning
target_idStable Gosset ontology class id
namePreferred target name
abbreviationCommon abbreviation, e.g. PD-1
aliasesAlternative names and symbols
is_classTrue for a grouping node rather than a single target
highest_phaseMost advanced phase reached by any drug against this target
drug_countsDrugs against this target, by phase
disease_drug_countsDrugs against this target, by disease
disease_effect_phasesPhase reached per disease and pharmacological direction
therapy_type_by_phaseTherapy types pursued, by phase
failure_modes_by_phaseReported failure modes, by phase

Ontologies ​

Each ontology endpoint returns a flat list of nodes with value (the class id), label, parent_ids and, for targets and modalities, abbreviation (and aliases for targets). Rebuild the tree from parent_ids.

bash
curl https://api.gosset.ai/v3/ontologies/modalities/ -H "Authorization: Bearer $GOSSET_API_KEY"
json
[{"value": "GM-01050100", "label": "Metabolically Activated Prodrugs", "abbreviation": null, "parent_ids": ["GM-01050000"]},
 {"value": "GM-02020100", "label": "Insulin and Analogs", "abbreviation": null, "parent_ids": ["GM-02020000"]}, "..."]
EndpointIdsNodes today
GET /v2/ontologies/diseases/GD-…about 7,200
GET /v3/ontologies/targets/GT-…about 8,800
GET /v3/ontologies/modalities/GM-…270

The disease and target lists are large (several megabytes). Download them once and cache them.

Classify a disease or modality ​

Turn a free-text name into class ids for the list endpoints.

bash
curl -X POST https://api.gosset.ai/v3/trials/disease-class/ \
  -H "Authorization: Bearer $GOSSET_API_KEY" -H "Content-Type: application/json" \
  -d '{"disease_name": "atopic dermatitis", "disease_ontology_version": "v2"}'
json
{"disease_classes": ["GD-16-01-01"], "versions": {"disease_classification": "v2", "disease_ontology": "v4"}}
KeyMeaning
disease_nameRequired
disease_descOptional extra context
disease_ontology_versionv2 for the current ontology. Leaving it out keeps the older v1 classes, used by PTRS V3

POST /v3/trials/modality-class/ takes modality_name (and optional modality_desc):

json
{"modality_classes": ["GM-04000000", "GM-04030000", "GM-04030200", "GM-04030210"], "versions": {"modality_classification": "v1"}}

That is the answer for "bispecific antibody": the class and its ancestors.

Each of these two endpoints allows 100 requests per 24 hours per account. disease_name and modality_name take up to 1,000 characters, and disease_desc and modality_desc up to 20,000.

The query endpoint does this for you: pass the name in a disease or modality condition.

Gosset developer documentation