openapi: 3.1.0

info:
  title: GLP Chart public data API
  version: 1.0.0
  summary: Verified US GLP-1 prices, the monthly fair cash price by drug and dose, payer coverage and the GLP-1 Cash Price Index.
  description: |
    Five pre-rendered JSON files, served from a CDN. There is no runtime, no key
    and no account: the site is a static export and these files are written into
    it at build time, once per deploy.

    Prices are checked every Monday against each program's own published
    pricing. Every figure is a total maintenance cost, everything included:
    medication, membership, labs and shipping. None of them is an entry price, an
    intro price or a prepay price.

    Every response carries `checked`, the Monday its numbers were last
    verified. Quote that date, not `generated_at`.

    Per-field documentation lives in the JSON Schema each response points at
    through its own `$schema` property, and those schemas are served from this
    same directory. The schemas are the contract. This document describes the
    endpoints that serve them.

    GLP Chart is a comparison site. We set the chart order and every score.
    Nothing here is medical advice and none of it is a guarantee of coverage.
  contact:
    name: GLP Chart
    email: hello@glpchart.com
    url: https://glpchart.com/
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
  termsOfService: https://glpchart.com/terms/

externalDocs:
  description: How to use these files, and the MCP server built on them
  url: https://glpchart.com/mcp/

servers:
  - url: https://glpchart.com
    description: Production

# No authentication. These are public CDN files: anyone may read them, and the
# only obligation is the license's attribution. An empty list says that in the
# spec's own vocabulary rather than by omission.
security: []

tags:
  - name: prices
    description: What a GLP-1 costs, by program and by state.
  - name: coverage
    description: Whether an insurer covers a GLP-1.
  - name: index
    description: The monthly GLP-1 Cash Price Index.
  - name: fair-price
    description: The monthly GLP Chart fair cash price, by drug, form and dose.
  - name: schema
    description: The JSON Schema for each dataset.

paths:
  /api/v1/programs.json:
    get:
      operationId: getPrograms
      tags: [prices]
      summary: Every scored GLP-1 telehealth program, with its verified total monthly cost
      description: |
        The GLP Chart comparison chart as data: one record per scored program,
        ranked, with its total monthly cost, its score breakdown, its lock-in
        terms, its live first-month deal, its per-drug prices and the states it
        does not serve.
      responses:
        "200":
          description: The chart.
          content:
            application/json:
              schema:
                $ref: "./schema/programs.schema.json"
        "404":
          description: |
            No such file. The five datasets above are the whole API; a path that
            is not one of them was never published.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  /api/v1/prices-by-state.json:
    get:
      operationId: getPricesByState
      tags: [prices]
      summary: Which programs serve each US state, and the cheapest price in each
      description: |
        One row per state and DC, holding every priced program available there,
        cheapest first, plus the lowest figure overall and the lowest cash
        figure. Availability comes from each program's own excluded-states list.
      responses:
        "200":
          description: Fifty states and DC.
          content:
            application/json:
              schema:
                $ref: "./schema/prices-by-state.schema.json"
        "404":
          description: |
            No such file. The five datasets above are the whole API; a path that
            is not one of them was never published.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  /api/v1/coverage.json:
    get:
      operationId: getCoverage
      tags: [coverage]
      summary: Whether a named US insurer covers a named GLP-1
      description: |
        One row per payer and drug pair: the one-paragraph answer, the
        per-indication criteria the payer publishes, the policy number and the
        URL of the policy document each answer was read from, with the date it
        was read.

        Reference information, not medical or legal advice, and not a guarantee
        of coverage. Coverage often depends on whether an employer elected the
        weight-management benefit, and rows where that applies say so.
      responses:
        "200":
          description: Payer coverage rows.
          content:
            application/json:
              schema:
                $ref: "./schema/coverage.schema.json"
        "404":
          description: |
            No such file. The five datasets above are the whole API; a path that
            is not one of them was never published.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  /api/v1/index.json:
    get:
      operationId: getPriceIndex
      tags: [index]
      summary: Every release of the GLP-1 Cash Price Index
      description: |
        Releases newest first. Each carries its headline metrics, the month
        series behind them, the method version that produced them and the
        citation string to reproduce verbatim.
      responses:
        "200":
          description: The index releases.
          content:
            application/json:
              schema:
                $ref: "./schema/index.schema.json"
        "404":
          description: |
            No such file. The five datasets above are the whole API; a path that
            is not one of them was never published.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  /api/v1/fair-price.json:
    get:
      operationId: getFairPrice
      tags: [fair-price]
      summary: The fair cash price of every GLP-1, by drug, form and dose
      description: |
        One row per drug, form and dose (the Wegovy pill and pen, Ozempic,
        Zepbound vials and pens, Mounjaro, Foundayo, and compounded semaglutide
        and compounded tirzepatide in rows of their own). For each row: the fair
        price, which is the median of the verified month-to-month cash totals
        across the sellers counted, rounded to the nearest dollar; the lowest and
        highest totals with their sellers; the seller count; and the change from
        the previous reading on a matched set of sellers.

        A total is the drug plus every recurring fee, on the seller's shortest
        plan billed month to month, read from the seller's GLP Chart record with
        a dated receipt. Prepaid and committed terms and intro prices are never
        counted; the ones a seller publishes are listed in `other_prices`. With
        fewer than three sellers a row publishes no fair price, low or high
        (`status` is `too_few_sellers` or `no_sellers`) and lists its sellers.

        Published once a month with the GLP-1 Cash Price Index. A published
        month never changes except by a numbered revision. Quote the figure
        with the row's condition, the `checked` date and a link to `url`.
      responses:
        "200":
          description: The newest fair-price release and the list of every release.
          content:
            application/json:
              schema:
                $ref: "./schema/fair-price.schema.json"
        "404":
          description: |
            No such file. The five datasets above are the whole API; a path that
            is not one of them was never published.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

  /api/v1/schema/{dataset}.schema.json:
    get:
      operationId: getSchema
      tags: [schema]
      summary: The JSON Schema for one dataset
      description: |
        The per-field documentation for a dataset, as JSON Schema draft 2020-12.
        Each response above names its own schema in its `$schema` property.
      parameters:
        - name: dataset
          in: path
          required: true
          description: Which dataset's schema to fetch.
          schema:
            type: string
            enum: [programs, prices-by-state, coverage, index, fair-price]
      responses:
        "200":
          description: A JSON Schema document.
          content:
            application/json:
              schema:
                type: object
                description: A JSON Schema draft 2020-12 document.
        "404":
          description: No such dataset.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

components:
  schemas:
    Error:
      type: object
      description: What the CDN returns for a path that was never published.
      properties:
        error:
          type: string
          description: A short sentence naming what was not found.
