# Mayocliniclabs — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse Mayo Clinic Laboratories' medical test catalog to retrieve detailed information on thousands of available tests, including descriptions, specimen requirements, clinical and interpretive data, performance characteristics, fees and codes, and setup details. Use autocomplete and alphabetical browsing to quickly locate specific tests or explore the full catalog.

**Category:** Healthcare | **Website:** [mayocliniclabs.com/](https://mayocliniclabs.com/) | **Docs:** [parse.bot/marketplace/3594d569-ab9b-40eb-8a8b-284169a63d6d/mayocliniclabs-com-api](https://parse.bot/marketplace/3594d569-ab9b-40eb-8a8b-284169a63d6d/mayocliniclabs-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Browse algorithms

List all available diagnostic algorithms from the Mayo Clinic Labs catalog. Returns the complete set in a single page; no input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/browse-algorithms \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Browse new tests

List recently published new tests from the Mayo Clinic Labs catalog. Returns all recent additions in a single page; no input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/browse-new-tests \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Browse tests by letter

List all tests whose name starts with a given letter. Returns the full set in a single page; no pagination parameter. Useful for alphabetical browsing of the catalog.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `letter` | string | Yes | Single uppercase letter A-Z. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/browse-tests-by-letter \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"letter":"<string>"}'
```

### Get full test detail

Retrieve the complete detail record for a single test by its alphanumeric Test ID or numeric catalog/unit code. Returns all sections: overview, specimen requirements, clinical/interpretive guidance, performance characteristics, fees/codes, setup/updates, and additional information. A single round-trip; no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `test_id` | string | Yes | Alphanumeric Test ID (e.g. 'HBEL1', 'CBC') or numeric catalog/unit code (e.g. '608083'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/get-full-test-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"test_id":"<string>"}'
```

### Search autocomplete

Return up to 5 query-completion suggestions for a partial search term. Lightweight call intended for typeahead UIs; no pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search query (e.g. 'hemo', 'gluc'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/search-autocomplete \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search tests

Full-text search over the Mayo Clinic Labs catalog. Matches tests, algorithms, and articles by keyword. Paginates via a 0-based page counter; each page returns up to `limit` items. Filtering by content_type narrows results to one document class.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `content_type` | string | No | Filter by content type. |
| `limit` | integer | No | Max results per page. |
| `page` | integer | No | Page number (0-based). |
| `query` | string | Yes | Search keyword (e.g. 'hemoglobin', 'CBC', 'glucose'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/mayocliniclabs/search-tests \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"content_type":"<string>","limit":"<integer>","page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.