canonical: https://jentic.com/apis/cbioportal.org/cbioportal

# cBioPortal web Public API [Alpha]

Jentic publishes the only available OpenAPI specification for cBioPortal web Public API, keeping it validated and agent-ready. cBioPortal is the cancer genomics portal that hosts curated mutation, copy number, structural variant, and clinical data across hundreds of public studies. The API exposes endpoints for browsing studies, fetching sample and patient cohorts, retrieving mutation and copy number alterations, and pulling clinical attributes for downstream analysis. Most data fetch operations use POST bodies that take lists of study, sample, or gene identifiers, with matched GET endpoints for browsing.

## For AI agents

Query cBioPortal cancer genomics data - pull mutations, copy number alterations, structural variants, and clinical data across public oncology studies for analysis or report generation.

## Scope

Does not handle clinical EHR records, patient scheduling, or genomic sequencing pipelines - use for querying curated cancer cohort data on the cBioPortal platform only.

## Capabilities

- Browse curated public cancer studies with their cohort metadata
- Fetch mutations across gene and sample lists for cohort analysis
- Pull copy number alterations and structural variants for selected samples
- Retrieve clinical attributes and clinical events for patient cohorts
- Compute mutated gene and structural variant counts across sample sets
- Access survival data for study cohorts to power outcome analyses
- List molecular profiles and sample lists for a study

## Use cases

### Cohort Mutation Analysis

Researchers and computational biology agents pull mutations across a list of samples and genes to identify driver alterations in a cancer cohort. The API's mutations fetch endpoint accepts a sample list id and a gene panel and returns all variants with annotations. This replaces ad-hoc downloads from the cBioPortal web UI when running large analyses.

Example prompt: POST to /api/mutations/fetch with a sample list id and entrez gene ids for TP53, PIK3CA, and EGFR, and summarise the variants by sample

### Clinical Data Pull for Survival Analysis

An agent retrieves clinical attributes and survival endpoints for a specific cancer study so a downstream notebook can run Kaplan-Meier analysis on overall survival by mutation status. The clinical-data and survival-data fetch endpoints return structured records keyed by patient or sample identifier, suitable for direct ingestion into pandas.

Example prompt: POST to /api/survival-data/fetch and /api/studies/{studyId}/clinical-data/fetch for the BRCA TCGA study, then return a merged dataframe

### Cross-Study Structural Variant Discovery

Agents scan structural variant data across multiple studies to identify recurrent fusions or rearrangements in a gene of interest. The structural-variant fetch endpoint accepts study ids and entrez gene ids, returning the matching events with breakpoints and supporting metadata. This is useful for translational research teams looking for candidate therapeutic targets.

Example prompt: POST to /api/structural-variant/fetch with study ids for lung cancer cohorts and the EML4 and ALK gene ids to surface fusion candidates

### AI Agent Integration via Jentic

A research assistant agent uses Jentic to discover the cBioPortal endpoints relevant to a question (mutations, copy number, clinical), load their schemas, and execute calls without holding cBioPortal data access tokens. This lets a single research agent combine cBioPortal evidence with literature search and other oncology APIs.

Example prompt: Use Jentic to search 'fetch cBioPortal mutations across a sample list', load the schema for /api/mutations/fetch, and execute against TP53 in the MSK-IMPACT cohort

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /api/studies | List all cancer studies |
| POST | /api/mutations/fetch | Fetch mutations across samples and genes |
| POST | /api/structural-variant/fetch | Fetch structural variants |
| POST | /api/studies/{studyId}/clinical-data/fetch | Fetch clinical data for a study |
| POST | /api/survival-data/fetch | Fetch survival data for cohorts |
| GET | /api/molecular-profiles | List molecular profiles |
| POST | /api/samples/fetch | Fetch sample records by identifier |
| POST | /api/patients/fetch | Fetch patient records by identifier |

## Key resources

- **Studies** — List, fetch, and tag cancer genomics studies and their metadata
- **Samples and Sample Lists** — Read sample identifiers and curated cohort lists for studies
- **Patients** — Retrieve patient records and their associated samples and clinical events
- **Mutations** — Fetch mutation calls across sample lists and gene panels
- **Copy Number and Structural Variants** — Pull CNA segments, mutated genes, and structural variant calls
- **Clinical Data** — Retrieve clinical attributes, clinical events, and survival data
- **Molecular Profiles** — List molecular profile types available in each study
- **Reference Genome Genes** — Look up gene identifiers across reference genomes

## Why Jentic

- **Setup:** Wiring the cBioPortal public API by hand means mapping intents onto a 156-path surface and matching each POST fetch call to its study, sample, and molecular-profile body shape yourself. Through Jentic you install once, import cBioPortal from the API Directory, and your agent calls it.
- **Permission scoping:** cBioPortal puts the study id in the URL path for operations like /studies/{studyId}/clinical-data/fetch, so a rule can pin your agent to one study for its clinical-data reads. The API is read-only over curated cohort data, and you choose which fetch operations it may call.
- **Credential handling:** cBioPortal's public API needs no credential, so there is nothing to store, and no key ever enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'fetch cancer mutations across a sample list' or 'get survival data for a study', and Jentic returns the matching cBioPortal operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **CDC Open Data API** — Public health and epidemiology datasets that complement molecular cohort studies
- **US Census API** — Population and demographic data for normalising cohort outcomes
- **CBP Public API** — Different domain - included only as a corpus-verified neighbour

## FAQ

### Why is there no official OpenAPI spec for cBioPortal web Public API?

cBioPortal hosts a Swagger UI but the curated, validated OpenAPI 3 spec used here is maintained by Jentic. Jentic generates and maintains this spec so that AI agents and developers can call cBioPortal API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the cBioPortal API use?

The public cBioPortal instance at www.cbioportal.org does not require authentication for its read-only endpoints. The spec exposes a /api/data-access-tokens endpoint for private deployments that have user accounts enabled, but the public study data is open.

### Can I run cohort analysis with the cBioPortal API?

Yes. The fetch endpoints - /api/mutations/fetch, /api/structural-variant/fetch, /api/studies/{studyId}/clinical-data/fetch, and /api/survival-data/fetch - accept sample lists and gene panels, returning the data needed for cohort-level mutation, structural variant, and survival analysis.

### What are the rate limits for the cBioPortal API?

cBioPortal does not publish hard rate limits for the public service, but it asks heavy users to install the portal locally for large bulk pulls. Treat the API as a fair-use research resource and avoid hammering /fetch endpoints with thousands of parallel requests.

### How do I fetch mutations for a sample list through Jentic?

Search Jentic for 'fetch cBioPortal mutations', load the schema for POST /api/mutations/fetch, and execute with a sample list identifier and entrez gene ids. The agent receives structured JSON ready for downstream analysis.

### Is the cBioPortal API free?

Yes. The public cBioPortal instance is open and free, supported by the cancer research community. Private institutional deployments may apply their own access rules.

### Can I limit what my agent is allowed to do with the cBioPortal API?

Yes. Because you run Jentic One self-hosted, your own rules decide which cBioPortal operations the agent may call, so you can allow only the read-only fetch endpoints it needs, such as /api/mutations/fetch or /api/survival-data/fetch, and withhold the rest. Since cBioPortal puts the study id in the URL path for calls like /api/studies/{studyId}/clinical-data/fetch, you can pin the agent to a single study for its clinical-data reads. The public API is read-only over curated cohort data and needs no credential, so the agent cannot write to it or reach anything you have not scoped in.
