API
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.
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.
This is the main instance and authenticated. If you have gotten a license from OncoKB™. Please use this instance for most accurate results.
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.
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 -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byProteinChange?hugoSymbol=BRAF&alteration=V600E&tumorType=Melanoma" -H "accept: application/json" -H "Authorization: Bearer [your personal token]"
curl -X GET "https://demo.oncokb.org/api/v1/annotate/mutations/byProteinChange?hugoSymbol=BRAF&alteration=V600E&tumorType=Melanom" -H "accept: application/json"
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
Demo site does not have atypical alteration. Please use your authentication token for the following examples
EGFR vIII
curl -X 'GET' \
'https://www.oncokb.org/api/v1/annotate/mutations/byProteinChange?hugoSymbol=EGFR&alteration=vIII' \
-H 'accept: application/json' \
-H 'Authorization: Bearer [your token]'
MSI-H
curl -X 'GET' \
'https://www.oncokb.org/api/v1/annotate/mutations/byProteinChange?alteration=MSI-H' \
-H 'accept: application/json' \
-H 'Authorization: Bearer [your token]'
get
https://www.oncokb.org/api/v1/annotate/copyNumberAlterations
Annotate Copy Number Alterations
curl -X GET "https://www.oncokb.org/api/v1/annotate/copyNumberAlterations?hugoSymbol=BRAF©NameAlterationType=AMPLIFICATION&tumorType=MEL" -H "accept: application/json" -H "Authorization: Bearer [your personal token]"
get
ttps://www.oncokb.org/api/v1/annotate/structuralVariants
Annotate Structural Variants
curl -X GET "https://www.oncokb.org/api/v1/annotate/structuralVariants?hugoSymbolA=ABL1&hugoSymbolB=BCR&structuralVariantType=DELETION&isFunctionalFusion=true&tumorType=Melanoma" -H "accept: application/json" -H "Authorization: Bearer [your personal token]"
get
https://www.oncokb.org/api/v1/annotate/mutations/byGenomicChange
Annotate Mutations by Genomic Change
curl -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byGenomicChange?genomicLocation=7%2C140453136%2C140453136%2CA%2CT&tumorType=Melanoma" -H "accept: application/json" -H "Authorization: Bearer [your personal token]"
get
ttps://www.oncokb.org/api/v1/annotate/mutations/byHGVSg
Annotate Mutations by HGVSg
curl -X GET "https://www.oncokb.org/api/v1/annotate/mutations/byHGVSg?hgvsg=7g.140453136A%3ET&tumorType=Melanoma" -H "accept: application/json" -H "Authorization: Bearer [your personal token]"
Last modified 2mo ago