Mayo Clinic Labs APImayocliniclabs.com ↗
Search and browse the Mayo Clinic Laboratories test catalog. Retrieve specimen requirements, CPT codes, LOINC, clinical data, and diagnostic algorithms via 6 endpoints.
What is the Mayo Clinic Labs API?
The Mayo Clinic Laboratories API provides structured access to the MCL medical test catalog across 6 endpoints, covering thousands of diagnostic tests, algorithms, and articles. Use get_full_test_detail to pull complete test records — including specimen requirements, CPT codes, LOINC identifiers, and interpretive data — or use search_tests to query the catalog by keyword and filter by content type.
curl -X GET 'https://api.parse.bot/scraper/3c3d64ce-eeda-43bf-8ca5-70630276bfd2/search_tests?page=0&limit=5&query=hemoglobin&content_type=Test' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace mayocliniclabs-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Mayo Clinic Labs SDK — search, browse, autocomplete, and drill into test details."""
from parse_apis.mayo_clinic_labs_api import MayoClinicLabs, ContentType, Letter, TestNotFound
client = MayoClinicLabs()
# Typeahead autocomplete for partial queries.
for suggestion in client.suggestions.search(query="hemo", limit=3):
print(suggestion.value)
# Search for hemoglobin-related tests, capped at 5 results.
for summary in client.testsummaries.search(query="hemoglobin", content_type=ContentType.TEST, limit=5):
print(summary.title, summary.test_id, summary.specimen_type)
# Drill into the first result's full detail via the summary→detail navigation.
summary = client.testsummaries.search(query="CBC", limit=1).first()
if summary:
detail = summary.details()
print(detail.test_name, detail.overview.useful_for, detail.performance.report_available)
# Fetch a test directly by its known ID.
try:
test = client.tests.get(test_id="HBEL1")
print(test.test_name, test.specimen.specimen_type, test.fees_codes.loinc)
except TestNotFound as exc:
print(f"Test not found: {exc.test_id}")
# Browse the alphabetical catalog for tests starting with 'G'.
for listing in client.testlistings.by_letter(letter=Letter.G, limit=3):
print(listing.name, listing.url)
# Check recently published tests.
newest = client.newtests.list(limit=3).first()
if newest:
print(newest.test_name, newest.published)
# List diagnostic algorithms.
for algo in client.algorithms.list(limit=3):
print(algo.name, algo.url)
print("exercised: suggestions.search / testsummaries.search / summary.details / tests.get / testlistings.by_letter / newtests.list / algorithms.list")
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.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (0-based). |
| limit | integer | Max results per page. |
| queryrequired | string | Search keyword (e.g. 'hemoglobin', 'CBC', 'glucose'). |
| content_type | string | Filter by content type. |
{
"type": "object",
"fields": {
"items": "array of result objects with title, test_id, catalog_id, description, url, content_type, and specimen_type",
"total": "integer total number of matching results"
},
"sample": {
"data": {
"items": [
{
"url": "https://www.mayocliniclabs.com/test-catalog/overview/608083",
"title": "Hemoglobin Electrophoresis Evaluation, Blood",
"test_id": "HBEL1",
"catalog_id": "608083",
"description": "HEMOGLOBIN ELECTROPHORESIS INTERPRETATION...",
"content_type": "Test",
"specimen_type": [
"Whole Blood EDTA"
]
}
],
"total": 211
},
"status": "success"
}
}About the Mayo Clinic Labs API
Search and Browse the Test Catalog
The search_tests endpoint accepts a required query string (e.g. 'hemoglobin', 'CBC', 'glucose') and returns paginated result objects containing title, test_id, catalog_id, description, url, content_type, and specimen_type. Results can be filtered using the content_type parameter to narrow results to 'Test', 'Algorithm', or 'Article'. Pagination is handled with page (0-based) and limit parameters, and the response always includes a total count. For partial-query scenarios, search_autocomplete returns up to 5 suggestion strings for a given prefix.
Full Test Details
get_full_test_detail accepts either an alphanumeric test_id (e.g. 'HBEL1', 'CBC') or a numeric catalog code and returns a deeply nested record. The specimen object covers specimen_type, specimen_required, specimen_minimum_volume, reject_due_to, specimen_stability, and specimen_retention_time. The fees_codes object surfaces test_classification, cpt_codes, and loinc. The performance object includes method_description, days_performed, report_available, and performing_laboratory_location. The additional_info object exposes special_instructions, reflex_tests, clia_number, and forms.
Alphabetical and Categorical Browsing
browse_tests_by_letter accepts a single uppercase letter and returns all tests starting with that letter as an array of {name, url} objects — useful for building directory-style indexes without a prior keyword. browse_new_tests lists recently published tests with their Test ID, Test Name, and Published date. browse_algorithms returns the full list of available diagnostic algorithms, each with a name and url.
The Mayo Clinic Labs API is a managed, monitored endpoint for mayocliniclabs.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when mayocliniclabs.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official mayocliniclabs.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Building an EHR integration that maps ordered tests to CPT and LOINC codes using
fees_codesfromget_full_test_detail. - Populating a clinical decision support tool with specimen requirements and stability data for pre-analytic validation.
- Creating a searchable internal reference for lab staff using
search_testswithcontent_typefiltering. - Monitoring new test availability by periodically polling
browse_new_testsfor recently published entries. - Generating a full alphabetical test directory for a healthcare portal using
browse_tests_by_letteracross A–Z. - Retrieving reflex test relationships and special instructions to guide ordering clinicians at the point of care.
- Integrating diagnostic algorithm references into a clinical workflow tool using
browse_algorithmsendpoint data.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Mayo Clinic Laboratories have an official developer API?+
What does `get_full_test_detail` return beyond basic test info?+
overview (useful_for, aliases, method_name, NY state availability), specimen (type, volume, stability, retention time, rejection criteria), performance (method description, days performed, report turnaround, performing lab location), fees_codes (CPT codes, LOINC, test classification), setup_updates, additional_info (reflex tests, special instructions, CLIA number, forms), and a direct URL to the test page.Can I retrieve patient-specific test results or order history through this API?+
Is NY state availability indicated for tests?+
overview object returned by get_full_test_detail includes a ny_state_available field indicating whether the test is available to New York state clients. No other state-level availability flags are currently returned. You can fork the API on Parse and revise it if you need to surface additional regional restriction data.Does `search_tests` return algorithm and article content alongside lab tests?+
search_tests returns results across all content types. Pass content_type as 'Test', 'Algorithm', or 'Article' to restrict results to one category. Each result object includes content_type so you can also filter client-side after retrieval.