Files

73 lines
1.7 KiB
Markdown

---
title: "COSMIC (Catalogue of Somatic Mutations in Cancer)"
task: ""
lineage_type: import
upstream_source: https://github.com/K-Dense-AI/scientific-agent-skills/blob/9c9bd2e9/skills/database-lookup/references/cosmic.md
upstream_sha: 9c9bd2e9
imported_at: 2026-06-26
prompt_class: prompt
upstream_changes: accepted
author: upstream
validated: false
---
# COSMIC (Catalogue of Somatic Mutations in Cancer)
## Base URL
```
https://cancer.sanger.ac.uk/cosmic/api/v1/
```
## Auth
**Registration required.** Free academic account or paid commercial license.
Login to get JWT token:
```
POST /auth/login
Content-Type: application/json
{"email": "[email protected]", "password": "yourpassword"}
```
Pass token as: `Authorization: Bearer <token>`
## Key Endpoints
### Search mutations by gene
```
GET /mutations/search?q={gene_symbol}&page=1&page_size=5
```
### Get gene information
```
GET /genes/{gene_symbol}
```
Example: `/genes/BRAF`
Response includes: gene_symbol, gene_name, chromosome, cancer_census (bool), tier, mutation_count, sample_count
### Get specific mutation by COSMIC ID
```
GET /mutations/{cosmic_mutation_id}
```
Example: `/mutations/COSV56056643`
Response includes: gene, cds_mutation, aa_mutation, mutation_type, fathmm_prediction, genomic_coordinates, tissue_distribution
### Cancer Gene Census
```
GET /cancer-gene-census?tier=1&page_size=10
```
### Mutations by tissue/histology
```
GET /mutations/distribution/{gene_symbol}
```
## Rate Limits
Not officially published. Bulk data requires SFTP download (licensed).
## Important
- COSMIC requires authentication for all API calls
- Commercial use requires a paid license
- Bulk data access via SFTP is preferred over API for large queries
- API structure may change across COSMIC versions