OncoKB™ API
Search…
API

Introduction

The OncoKB™ data can be accessed through a REST API (Swagger Page). The API is defined and organized using swagger annotation. MAF file annotation is also possible by using OncoKB™ Annotator which is fully supported by using OncoKB™ REST APIs.
When you send API requests, you need a token before accessing the OncoKB™ data via its web API. Please visit OncoKB™ Data Access Page for more information about how to register an account and get an OncoKB™ API token.

Authentication

We are using standard Spring Security to protect all our services. In order to access the OncoKB™ data via its REST API, you need to specify your API token in the request header with
Authorization: Bearer [your token]
Your token will be available under your Account Settings after getting a license from the OncoKB™ Team.

OncoKB™ Instances

https://www.oncokb.org

This is the main instance and authenticated. If you have gotten a license from OncoKB™. Please use this instance for most accurate results.

https://demo.oncokb.org

Before committing to our license, you can use this website to test the API and other services freely. We included the full information of BRAF, TP53 and ROS1. The instance is not authenticated.

Annotation API Examples

If you have the access token and like to play around with our endpoints, please see the Swagger page. We only list GET methods here. They all have corresponding POST method available. Please see the Swagger page for more details.
get
https://www.oncokb.org/api/v1/annotate/mutations/byProteinChange
Annotate Mutations by Protein Change

Curl Example

www.oncokb

curl -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byProteinChange?hugoSymbol=BRAF&entrezGeneId=673&alteration=V600E&consequence=missense_variant&proteinStart=600&proteinEnd=600&tumorType=Melanoma&evidenceType=GENE_SUMMARY%2C%20MUTATION_SUMMARY" -H "accept: application/json" -H "Authorization: Bearer token"

demo.oncokb

curl -X GET "https://demo.oncokb.org/api/v1/annotate/mutations/byProteinChange?hugoSymbol=BRAF&alteration=V600E&tumorType=Melanom" -H "accept: application/json"

Typical Use Cases

Missense mutation in an oncogene: BRAF, V600E, Melanoma

Missense mutation in a tumor suppressor: TP53, R273C, Colon Adenocarcinoma

In-frame deletion: BRAF, N486_P490del, Histiocytosis

Fusion: ROS1, CD74-ROS1 fusion, Lung Adenocarcinoma

Atypical Alterations

For atypical alterations, please also use this endpoint. For instance, but not limited to
  • vII
  • vIII
  • vV
  • CTD or C-terminal domain
  • KDD or Kinase Domain Duplication
  • ITD or Internal Tandem Duplication
  • MSI-H or Microsatellite Instability-High
  • TMB-H or Tumor Mutational Burden-High
get
https://www.oncokb.org/api/v1/annotate/copyNumberAlterations
Annotate Copy Number Alterations

Curl Example

curl -X GET "https://www.oncokb.org/api/v1/annotate/copyNumberAlterations?hugoSymbol=BRAF&copyNameAlterationType=AMPLIFICATION&tumorType=MEL" -H "accept: application/json" -H "Authorization: Bearer token"
get
ttps://www.oncokb.org/api/v1/annotate/structuralVariants
Annotate Structural Variants

Curl Example

curl -X GET "https://www.oncokb.org/api/v1/annotate/structuralVariants?hugoSymbolA=ABL1&entrezGeneIdA=25&hugoSymbolB=BCR&entrezGeneIdB=613&structuralVariantType=DELETION&isFunctionalFusion=false&tumorType=Melanoma&evidenceType=ONCOGENIC" -H "accept: application/json" -H "Authorization: Bearer token"
get
https://www.oncokb.org/api/v1/annotate/mutations/byGenomicChange
Annotate Mutations by Genomic Change

Curl Example

curl -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byGenomicChange?genomicLocation=7%2C140453136%2C140453136%2CA%2CT&tumorType=Melanoma&evidenceType=ONCOGENIC" -H "accept: application/json" -H "Authorization: Bearer token"
get
ttps://www.oncokb.org/api/v1/annotate/mutations/byHGVSg
Annotate Mutations by HGVSg

Curl Example

curl -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byHGVSg?hgvsg=g.140453136A%3ET&tumorType=Melanoma&evidenceType=ONCOGENIC" -H "accept: application/json" -H "Authorization: Bearer token"
Copy link
On this page
Introduction
Authentication
OncoKB™ Instances
https://www.oncokb.org
https://demo.oncokb.org
Annotation API Examples
get
Annotate Mutations by Protein Change
Curl Example
Typical Use Cases
Atypical Alterations
get
Annotate Copy Number Alterations
Curl Example
get
Annotate Structural Variants
Curl Example
get
Annotate Mutations by Genomic Change
Curl Example
get
Annotate Mutations by HGVSg
Curl Example