> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/getting-started/masst.md).

# Search a spectrum with MASST in Duaer

In Duaer, find where an MS/MS spectrum appears in public metabolomics data with GNPS2 MASST. One successful search uses 1 credit.
## What you get

MASST in the Duaer data market uses 1 credit per successful search, including a search with no match.

One call waits up to 45 seconds; a search that times out uses 0 credits.

To work an unknown feature step by step, see [Annotate an unknown feature with Duaer](/getting-started/metabolic-dark-matter.md).

## Search on the canvas

1. Open the node creator, pick Duaer Data → MASST.
2. Fill USI, or Peaks with Precursor m/z (optional Charge).
3. Pick Library: Public Datasets (default), GNPS Data, or GNPS Reference Library; optional Cosine threshold.
4. Limit defaults to 10, max 20. Execute.

A successful search uses 1 credit. Empty input or a failed source uses 0.

## Call the API

- GET https://api.duaer.com/v1/data/masst?...
- Authorization: Bearer <Duaer key>

The call skill below matches Copy skill.

## Call skill

Same text as Copy skill.

```
---
name: duaer-masst
description: >-
  Find where an MS/MS spectrum appears in public metabolomics data with GNPS2 MASST through Duaer.
  One successful search uses 1 Duaer credit.
---

# Duaer MASST

Search an MS/MS spectrum across public metabolomics datasets or the GNPS library with GNPS2 fast MASST through Duaer with a Duaer key.
The call waits up to 45 seconds for the search to finish.

## Call

`GET https://api.duaer.com/v1/data/masst?usi=mzspec:GNPS:GNPS-LIBRARY:accession:CCMSLIB00005435737&library=public&limit=10`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

Provide `usi`, or `peaks` with `precursorMz`.

- `usi` — spectrum to search, such as a https://skills.duaer.com/spectrum.md result.
- `peaks` — MS/MS peaks as `mz:intensity` pairs separated by spaces, used when `usi` is empty.
- `precursorMz` — precursor m/z, required with `peaks`.
- `charge` — optional. Precursor charge. Default 1.
- `library` — optional. `public` (public datasets, default), `gnpsData` (GNPS and MassIVE data), or `gnpsLibrary` (GNPS reference library).
- `cosine` — optional. Minimum cosine similarity from 0 to 1. Default 0.7.
- `limit` — optional. From 1 to 20. Default 10.

## Result

Each item has `source`, `title`, `url` (spectrum viewer), `summary`, `usi`, `dataset`, `libraryAccession` (GNPS library matches), `cosine`, `matchingPeaks`, and `deltaMass`.
Datasets tell you in which studies, samples, or organisms the unknown spectrum was seen.
A search that does not finish in 45 seconds returns 503 and uses 0 credits.
To work an unannotated feature step by step, follow https://skills.duaer.com/metabolic-dark-matter.md.

## Credits

One successful search uses 1 credit, including a search that finds no match.
Empty input, a failed source, or no remaining credits uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

```
## Questions

### How many credits does a MASST search use in Duaer?

One successful search uses 1 credit, including a search with no match. Empty input or a failed source uses 0.

## Related

- [Annotate an unknown feature with Duaer](https://doc.duaer.com/getting-started/metabolic-dark-matter.md)
- [Fetch a spectrum by USI in Duaer](https://doc.duaer.com/getting-started/spectrum.md)
- [Match spectra in MassBank with Duaer](https://doc.duaer.com/getting-started/massbank.md)

