{
  "openapi": "3.1.0",
  "info": {
    "title": "JustLabs Public API",
    "version": "1.0.0",
    "description": "Public, read-only APIs for the JustLabs direct-to-consumer lab testing catalog. No authentication required. See https://justlabs.health/llms.txt for the full agent integrations guide.",
    "termsOfService": "https://justlabs.health/terms",
    "contact": {
      "name": "JustLabs",
      "url": "https://justlabs.health/contact"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://justlabs.health/terms"
    }
  },
  "servers": [
    {
      "url": "https://justlabs.health",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/tests": {
      "get": {
        "summary": "List all lab tests and panels",
        "description": "Returns the complete JustLabs catalog — every lab test and every bundled panel. Used by the website, the stdio MCP (`justlabs-mcp-server` on npm), and the HTTP MCP at `mcp.justlabs.health`. Data is cached server-side for a short TTL, so responses may be a few seconds stale.",
        "operationId": "listCatalog",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "The complete catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogResponse": {
        "type": "object",
        "required": [
          "tests",
          "panels"
        ],
        "properties": {
          "tests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabTest"
            }
          },
          "panels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TestPanel"
            }
          }
        }
      },
      "LabTest": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "category",
          "price",
          "biomarkers",
          "fastingRequired",
          "turnaroundDays"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable slug used in URLs (e.g. \"tsh\", \"lipid-panel\").",
            "example": "tsh"
          },
          "name": {
            "type": "string",
            "example": "TSH (Thyroid Stimulating Hormone)"
          },
          "shortName": {
            "type": "string",
            "example": "TSH"
          },
          "description": {
            "type": "string"
          },
          "longDescription": {
            "type": "string",
            "description": "Extended prose description (may contain markdown)."
          },
          "category": {
            "type": "string",
            "description": "One of the 14 test categories.",
            "enum": [
              "thyroid",
              "hormone",
              "metabolic",
              "cardiovascular",
              "vitamin",
              "autoimmune",
              "fertility",
              "diabetes",
              "liver",
              "kidney",
              "inflammation",
              "sti",
              "mens-health",
              "general"
            ]
          },
          "price": {
            "type": "number",
            "description": "User-facing cash price in USD.",
            "example": 9
          },
          "fastingRequired": {
            "type": "boolean"
          },
          "labVendor": {
            "type": "string",
            "enum": [
              "Quest",
              "Labcorp"
            ]
          },
          "biomarkers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The individual biomarkers this test measures."
          },
          "turnaroundDays": {
            "type": "string",
            "description": "Typical turnaround time, e.g. \"1-2\".",
            "example": "1-2"
          },
          "popular": {
            "type": "boolean"
          },
          "symptomsAddressed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conditionsScreened": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "whatItMeasures": {
            "type": "string"
          },
          "whoIsItFor": {
            "type": "string"
          },
          "whenToTest": {
            "type": "string"
          },
          "preparationInstructions": {
            "type": "string"
          },
          "resultsOverview": {
            "type": "string"
          },
          "faqs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "question",
                "answer"
              ],
              "properties": {
                "question": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                }
              }
            }
          }
        },
        "additionalProperties": true
      },
      "TestPanel": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "category",
          "tests",
          "price",
          "savings",
          "fastingRequired"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "panel-thyroid-complete"
          },
          "name": {
            "type": "string",
            "example": "Complete Thyroid Panel"
          },
          "description": {
            "type": "string"
          },
          "longDescription": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tests": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of LabTest `id`s included in the panel."
          },
          "price": {
            "type": "number",
            "description": "Bundle price in USD."
          },
          "savings": {
            "type": "number",
            "description": "Savings vs. ordering the component tests individually."
          },
          "fastingRequired": {
            "type": "boolean"
          },
          "popular": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      }
    }
  },
  "tags": [
    {
      "name": "Catalog",
      "description": "Lab test and panel catalog."
    }
  ],
  "externalDocs": {
    "description": "Agent integration guide (llms.txt)",
    "url": "https://justlabs.health/llms.txt"
  }
}