# MetaboLights API
> MetaboLights as an API, powered by EMBL-EBI — the world's premier open repository for metabolomics experiments (NMR spectroscopy and mass spectrometry) and a sister resource to PRIDE for proteomics. Search the public metabolomics studies by keyword (returning each study's accession, title, description and organism); read a study's full metadata including its abstract, status, submission and release dates, study-design descriptors, experimental factors, the analytical assays with their measurement type, technology and platform, the contributors and their roles, the linked publications with DOI and PubMed identifiers, submitters, sample count, FTP download URL and data license; inspect the analytical workflow — every protocol with its name, type, description and parameters (sample collection, extraction, chromatography, NMR/MS spectroscopy, data transformation and metabolite identification); and list the organisms and organism parts studied with their ontology terms. Ideal for metabolomics and systems-biology research, dataset reuse and meta-analysis, bioinformatics pipelines and tools that integrate experimental evidence. Study accessions look like MTBLS1. Data from EMBL-EBI MetaboLights.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/metabolights-api/..."
```

## Pricing
- **Free** (Free) — 520 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 18,500 calls/Mo, 6 req/s
- **Pro** ($21/Mo) — 90,000 calls/Mo, 15 req/s
- **Mega** ($58/Mo) — 360,000 calls/Mo, 40 req/s

## Endpoints

### Studies

#### `GET /v1/search` — Search metabolomics studies

**Parameters:**
- `query` (query, required, string) — Search text, e.g. diabetes Example: `diabetes`
- `page` (query, optional, string) — Page (0-based)
- `limit` (query, optional, string) — Max results (1-100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metabolights-api/v1/search?query=diabetes"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "diabetes",
        "total": 135,
        "studies": [
            {
                "title": "Salivary Multi-omics Characterization and Staging Diagnostic Model for Type 2 Diabetes with Different Stages of Periodontitis",
                "accession": "MTBLS13827",
                "organisms": [
                    "Homo sapiens"
                ],
                "study_type": null,
                "description": "<p>Background:&nbsp;This study aims to comprehensively characterize the dynamic succession of the salivary microbiome and metabolic reprogramming in type 2 diabetes mellitus (T2DM) patients across progressive stages of periodontitis (Stage I–IV) using an integrated multi-omics approach. We specifica",
                "submission_date": "20260203"
            },
            {
                "title": "Bilophila wadsworthia inhibits lifestyle intervention response in Gestational Diabetes Mellitus via L-glutamine regulation",
                "accession": "MTBLS13807",
                "organisms": [
                    "Homo sapiens"
                ],
                "study_type": null,
                "description": "<p>Fecal samples were collected from 26 pregnant women with gestational diabetes mellitus (GDM) prior to and following a lifestyle intervention study, and subsequently analyzed using untargeted metabolomics.</p>",
                "submission_date": "20260130"
            },
            {
           
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/study` — A study's full metadata

**Parameters:**
- `id` (query, required, string) — MetaboLights accession, e.g. MTBLS1 Example: `MTBLS1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metabolights-api/v1/study?id=MTBLS1"
```

**Response:**
```json
{
    "data": {
        "study": {
            "title": "A metabolomic study of urinary changes in type 2 diabetes in human compared to the control group",
            "assays": [
                {
                    "platform": "Nuclear Magnetic Resonance (NMR) - - - Bruker",
                    "technology": "NMR spectroscopy assay",
                    "measurement": "untargeted analysis"
                }
            ],
            "people": [
                {
                    "name": "Reza M Salek",
                    "roles": [
                        "principal investigator role"
                    ],
                    "affiliation": "University of Cambridge"
                },
                {
                    "name": "Jules L Griffin",
                    "roles": [
                        "principal investigator role"
                    ],
                    "affiliation": "University of Cambridge"
                }
            ],
            "status": "Public",
            "factors": [
                "Gender",
                "Metabolic syndrome"
            ],
            "ftp_url": "http://ftp.ebi.ac.uk/pub/databases/metabolights/studies/public/MTBLS1",
            "license": "EMBL-EBI Terms of Use",
            "accession": "MTBLS1",
            "submitters": [
                "r7salek@gmail.com",
                "jules.griffin@mrc-hnr.cam.ac.uk"
            ],
            "description": "Type 2 diabetes mellitus is the result of a combination of
…(truncated, see openapi.json for full schema)
```

### Workflow

#### `GET /v1/organisms` — Organisms studied

**Parameters:**
- `id` (query, required, string) — MetaboLights accession Example: `MTBLS1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metabolights-api/v1/organisms?id=MTBLS1"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "study": "MTBLS1",
        "organisms": [
            {
                "organism": "Homo sapiens",
                "organism_part": "urine",
                "term_accession": "http://purl.obolibrary.org/obo/NCBITaxon_9606"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:27.705Z",
        "request_id": "dfb36041-51c7-4d0d-831b-993dbf92d753"
    },
    "status": "ok",
    "message": "Organisms retrieved",
    "success": true
}
```

#### `GET /v1/protocols` — The analytical workflow

**Parameters:**
- `id` (query, required, string) — MetaboLights accession Example: `MTBLS1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metabolights-api/v1/protocols?id=MTBLS1"
```

**Response:**
```json
{
    "data": {
        "count": 7,
        "study": "MTBLS1",
        "protocols": [
            {
                "name": "Sample collection",
                "type": "Sample collection",
                "parameters": [],
                "description": "For the human studies, midstream urine (~15 ml) samples were collected and frozen from each volunteer. In total, 84 samples were collected from 12 healthy volunteers (7 time points, 8 males and 4 females) and 50 samples from 30 T2DM patients (1-3 time points, 17 males and 13 females) with well-controlled blood glucose maintained at normal concentrations by diet, following the guidelines issued by the American Diabetes Association, rather than medication. T2DM patients agreed to stop treatment with oral anti-diabetic agents during the study. Subjects went through a washout period of 4 wk before sample collection and abstained from alcohol during the study; diet was controlled throughout the study."
            },
            {
                "name": "Extraction",
                "type": "Extraction",
                "parameters": [
                    "Extraction Method"
                ],
                "description": "For the human studies, midstream urine (∼15 ml) samples were collected and frozen from each volunteer. In total, 84 samples were collected from 12 healthy volunteers (7 time points, 8 males and 4 females) and 50 samples from 30 T2DM patients (1–3 time points, 17 males and 13 females) with well-controlled
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metabolights-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Open metabolomics studies archive. MetaboLights is the world's premier repository for metabolomics experiments (NMR & mass-spectrometry), a sister resource to PRIDE (proteomics). /v1/search?query=diabetes = search public studies (accession, title, description, organism, study type); /v1/study?id=MTBLS1 = a study's full metadata (title, abstract, status, submission & release dates, study-design descriptors, experimental factors, analytical assays with measurement & technology type and platform, contributors and roles, linked publications with DOI/PubMed, submitters, sample count, FTP download URL, data license); /v1/protocols?id=MTBLS1 = the analytical workflow — each protocol's name, type, description and parameters (sample collection, extraction, chromatography, NMR/MS spectroscopy, data transformation, metabolite identification); /v1/organisms?id=MTBLS1 = the organisms and organism parts studied with their ontology term. Study accessions look like MTBLS1. Data from EMBL-EBI MetaboLights. For proteomics datasets see the PRIDE API, for protein sequences UniProt, for biomedical literature Europe PMC.",
        "source": "EMBL-EBI MetaboLights REST API (ebi.ac.uk/metabolights)",
        "endpoints": [
            "/v1/search",
            "/v1/study",
            "/v1/protocols",
            "/v1/organisms",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:28.008Z",
        "request_id": "9b406c8c-91
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/metabolights-api
OpenAPI spec: https://www.oanor.com/api/metabolights-api/openapi.json
