Pillwise Index API

The Index API from Pillwise — 10 operation(s) for index.

GitHub OpenAPI

Operations 10

GET /v1/drugs/search Typeahead suggest (brand/ingredient groups). No packages on hits #
GET /v1/drugs/{id} Get drugs by id #
GET /v1/drugs/{id}/form-options Get drugs by id form options #
GET /v1/drugs/{id}/presentations Get drugs by id presentations #
GET /v1/drugs/{id}/packages Get drugs by id packages #
GET /v1/drugs/ndc/{ndc} Get drugs ndc by ndc #
GET /v1/drugs/rxcui/{rxcui} Get drugs rxcui by rxcui #
GET /v1/recalls Get recalls #
GET /v1/shortages Get shortages #
GET /v1/changes Get changes #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pillwise-dev:pillwise-dev-index-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pillwise-dev-index-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pillwise Dev Index API
  version: 0.1.0
  license:
    name: Proprietary
  description: 'Operations tagged Index across 2 of this provider''s published API definitions: pillwise-dev-openapi.json, pillwise-dev-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.pillwise.dev
  description: Future public API
security:
- bearerAuth: []
tags:
- name: Index
paths:
  /v1/drugs/search:
    get:
      tags:
      - Index
      summary: Typeahead suggest (brand/ingredient groups). No packages on hits
      description: 'Suggest hits are what a member picks, in order: the medicine named exactly, then its main forms ("Gabapentin capsule"), brands and other ingredients, combinations, salts and single products; within each, the most widely sold first. Label names that are only the generic name ("Sertraline HCl") are the medicine itself. Everyday names ("vitamin D3", "NPH insulin") and brands still said after leaving the market ("Zofran") find the medicine; such a brand hit shows the name typed with the ingredient as its subtitle.'
      parameters:
      - in: query
        name: q
        required: true
        schema:
          type: string
          maxLength: 200
          example: tylenol
      - in: query
        name: jurisdiction
        schema:
          type: string
          default: us
      - in: query
        name: limit
        schema:
          type: integer
          default: 10
          maximum: 50
      - in: query
        name: cabinet_only
        schema:
          type: boolean
          default: true
      - in: query
        name: intent
        schema:
          type: string
          enum:
          - suggest
          - sku
          default: suggest
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Suggest hits. Empty hits is 200, not 404.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          description: missing_key or bad_key
        '402':
          description: quota_exceeded (included and bought blocks used up, grace elapsed) or subscription_lapsed (the paid period ended and did not renew)
        '403':
          description: tenant_disabled or forbidden_scope
        '410':
          description: Requested snapshot is not retained (gone_graph)
        '429':
          description: rate_limited (process safety fuse)
      operationId: getV1DrugsSearch
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/{id}:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          example: pw_d_tylenol
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Canonical drug. `drug.member` gives its form, strength and name in members' words (see MemberView).
          content:
            application/json:
              schema:
                type: object
                properties:
                  drug:
                    type: object
                    properties:
                      member:
                        $ref: '#/components/schemas/MemberView'
        '404':
          description: 'not_found. An id stays the same for as long as its drug is in the catalog; one the catalog has since retired (an NDC-only listing whose NDCs RxNorm mapped, say) answers with `superseded_by`: the drug ids that answer for it now, best first, or empty when none does, with `last_version` (the last catalog version that had it; `?graph_version=` shows it as it was) and `last_seen` (when that version was built).'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: not_found
                  superseded_by:
                    type: array
                    items:
                      type: string
                  last_version:
                    type: string
                  last_seen:
                    type: string
                    format: date-time
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs by id
      x-summary-source: derived
      operationId: getV1DrugsById
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/{id}/form-options:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          example: pw_d_tylenol
      - in: query
        name: form
        description: 'Narrow to one form: a `value` from `form_options.forms` (for example `eye_drops`), or the `form` on a suggest hit.'
        schema:
          type: string
          maxLength: 80
          example: patch
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Forms, strengths, routes for this id (no packages)
          content:
            application/json:
              schema:
                type: object
                properties:
                  form_options:
                    $ref: '#/components/schemas/FormOptions'
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs by id form options
      x-summary-source: derived
      operationId: getV1DrugsByIdFormOptions
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/{id}/presentations:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          example: pw_d_tylenol
      - in: query
        name: form
        description: 'Narrow to one form: a `value` from `form_options.forms` (for example `eye_drops`), or the `form` on a suggest hit.'
        schema:
          type: string
          maxLength: 80
          example: patch
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Linked form+strength+route rows to bind a cabinet item
          content:
            application/json:
              schema:
                type: object
                properties:
                  presentations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Presentation'
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs by id presentations
      x-summary-source: derived
      operationId: getV1DrugsByIdPresentations
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/{id}/packages:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          example: pw_d_tylenol
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Eligible package NDCs (bottle path)
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs by id packages
      x-summary-source: derived
      operationId: getV1DrugsByIdPackages
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/ndc/{ndc}:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: ndc
        required: true
        schema:
          type: string
          example: 50580-488-10
        description: 10, 11, 12 digit, hyphenated, or spaced
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Package + clinical drug
        '409':
          description: Ambiguous NDC (ndc_ambiguous)
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs ndc by ndc
      x-summary-source: derived
      operationId: getV1DrugsNdcByNdc
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/drugs/rxcui/{rxcui}:
    get:
      tags:
      - Index
      parameters:
      - in: path
        name: rxcui
        required: true
        schema:
          type: string
          example: '314076'
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      responses:
        '200':
          description: Clinical drug
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get drugs rxcui by rxcui
      x-summary-source: derived
      operationId: getV1DrugsRxcuiByRxcui
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/recalls:
    get:
      tags:
      - Index
      parameters:
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      - in: query
        name: class
        schema:
          type: string
        description: I, II, III (also accepts Class I / 1)
      - in: query
        name: status
        schema:
          type: string
      - in: query
        name: since
        schema:
          type: string
        description: Report or initiation date YYYY-MM-DD / YYYYMMDD
      - in: query
        name: drug_id
        schema:
          type: string
      - in: query
        name: ndc
        schema:
          type: string
          maxLength: 32
      responses:
        '200':
          description: First-class recall index
          content:
            application/json:
              schema:
                type: object
                properties:
                  recalls:
                    type: array
                    items:
                      $ref: '#/components/schemas/Recall'
                  graph_version:
                    type: string
                  as_of:
                    type: string
                    format: date-time
                  jurisdiction:
                    type: string
                  freshness:
                    type: string
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get recalls
      x-summary-source: derived
      operationId: getV1Recalls
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/shortages:
    get:
      tags:
      - Index
      parameters:
      - $ref: '#/components/parameters/as_of'
      - $ref: '#/components/parameters/graph_version'
      - in: query
        name: status
        schema:
          type: string
      - in: query
        name: drug_id
        schema:
          type: string
      - in: query
        name: ndc
        schema:
          type: string
          maxLength: 32
      responses:
        '200':
          description: First-class shortage index
          content:
            application/json:
              schema:
                type: object
                properties:
                  shortages:
                    type: array
                    items:
                      $ref: '#/components/schemas/Shortage'
                  graph_version:
                    type: string
                  as_of:
                    type: string
                    format: date-time
                  jurisdiction:
                    type: string
                  freshness:
                    type: string
        '410':
          description: Requested snapshot is not retained (gone_graph)
      summary: Get shortages
      x-summary-source: derived
      operationId: getV1Shortages
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/changes:
    get:
      tags:
      - Index
      parameters:
      - in: query
        name: since
        schema:
          type: string
      responses:
        '200':
          description: Changelog cursor
        '410':
          description: '`since` snapshot is not retained (gone_graph)'
      summary: Get changes
      x-summary-source: derived
      operationId: getV1Changes
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
components:
  schemas:
    StrengthChoice:
      type: object
      required:
      - value
      - label
      properties:
        value:
          type: string
          example: 0.05 MG/ML
        label:
          type: string
          example: 0.005%
        forms:
          type: array
          description: The form values this strength comes in, so a client holding every form's strengths can narrow them without another call.
          items:
            type: string
          example:
          - eye_drops
    SearchHit:
      type: object
      required:
      - id
      - display_name
      - matched_term
      - match_kind
      - cabinet_eligible
      properties:
        id:
          type: string
        display_name:
          type: string
        subtitle:
          type: string
        matched_term:
          type: string
        match_kind:
          type: string
          enum:
          - preferred
          - synonym
          - brand
          - proprietary
          - identifier
        pick_level:
          type: string
          enum:
          - brand
          - ingredient
          - clinical_drug
          - packaged_product
        presentation_count:
          type: integer
        tty:
          type: string
        rxcui:
          type: string
        form:
          type: string
          description: 'On a suggest hit, the form the member''s words chose ("nicotine patch" -> `patch`): pass it as `?form=` to form-options or presentations. On `intent=sku` hits, the drug''s form value.'
        form_label:
          type: string
          example: Patch
        strength:
          type: string
        strength_label:
          type: string
          example: 14 mg per 24 hours
        route:
          type: string
        cabinet_eligible:
          type: boolean
        form_options:
          $ref: '#/components/schemas/FormOptions'
        codes:
          type: object
          properties:
            rxcui:
              type: string
            ndc11:
              type: array
              items:
                type: string
            unii:
              type: array
              items:
                type: string
            spl_set_id:
              type: string
            application_number:
              type: string
            te_code:
              type: string
    MemberView:
      type: object
      required:
      - display_name
      description: The drug in members' words, worked out when the catalog is built.
      properties:
        display_name:
          type: string
          example: Albuterol inhaler, 90 mcg per puff
        form:
          type: string
        form_label:
          type: string
        form_group:
          type: string
        dose_unit:
          type: string
        dose_form:
          type: string
          description: The standard dose form the member-facing form came from.
          example: Metered Dose Inhaler
        strength:
          type: string
        strength_label:
          type: string
        route:
          type: string
        route_label:
          type: string
        volume_ml:
          type: number
          description: A syringe's fill; the same strength in another fill is another dose.
        labels_version:
          type: integer
          description: The wording rules this view was worked out with.
    FormOptions:
      type: object
      description: Each choice has a `value` to send back (`?form=`, Cabinet `answers.form` / `answers.strength`) and a `label` to show. Only products on the US market are listed (a package or a current label). Forms come most sold first, with vials, packs and clinic-only forms last; strengths follow their form, then read by amount, and name the forms they come in.
      properties:
        forms:
          type: array
          items:
            $ref: '#/components/schemas/FormChoice'
        strengths:
          type: array
          items:
            $ref: '#/components/schemas/StrengthChoice'
        routes:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
        packages:
          type: array
          items:
            type: object
            properties:
              ndc_raw:
                type: string
              ndc11:
                type: string
              display:
                type: string
              description:
                type: string
    Presentation:
      type: object
      required:
      - id
      description: One form + strength + route to bind. Send `id` as `codes.pillwise_id` with `form` and `strength` (values or labels).
      properties:
        id:
          type: string
        rxcui:
          type: string
        form:
          type: string
          example: inhaler
        form_label:
          type: string
          example: Inhaler
        form_group:
          type: string
          example: inhaled
        dose_unit:
          type: string
          example: puff
        strength:
          type: string
          example: 0.09 MG/ACTUAT
        strength_label:
          type: string
          example: 90 mcg per puff
        route:
          type: string
          example: inhaled
        route_label:
          type: string
          example: Inhaled
        brand:
          type: string
        generic:
          type: string
    SearchResponse:
      type: object
      required:
      - hits
      - coverage
      - graph_version
      - as_of
      - jurisdiction
      - freshness
      properties:
        hits:
          type: array
          items:
            $ref: '#/components/schemas/SearchHit'
        coverage:
          type: string
          enum:
          - cpc_current
        graph_version:
          type: string
        as_of:
          type: string
          format: date-time
        jurisdiction:
          type: string
        freshness:
          type: string
    Recall:
      type: object
      required:
      - id
      - classification
      - drug_ids
      properties:
        id:
          type: string
        classification:
          type: string
          enum:
          - I
          - II
          - III
        status:
          type: string
        recall_number:
          type: string
        reason:
          type: string
        recalling_firm:
          type: string
        report_date:
          type: string
        initiation_date:
          type: string
        product_description:
          type: string
        ndc11:
          type: array
          items:
            type: string
        product_ndc:
          type: array
          items:
            type: string
        drug_ids:
          type: array
          items:
            type: string
    Choice:
      type: object
      required:
      - value
      - label
      properties:
        value:
          type: string
          example: inhaled
        label:
          type: string
          example: Inhaled
    FormChoice:
      type: object
      required:
      - value
      - label
      - group
      - dose_unit
      properties:
        value:
          type: string
          example: eye_drops
        label:
          type: string
          example: Eye drops
        group:
          type: string
          description: What kind of thing it is, for tailoring the next questions.
          enum:
          - tablet
          - capsule
          - oral_liquid
          - oral_other
          - mouth
          - skin
          - eye
          - ear
          - nose
          - inhaled
          - patch
          - injection
          - rectal
          - vaginal
          - implant
          - clinic
          - pack
          - other
        dose_unit:
          type: string
          description: What one dose is counted in.
          example: drop
        route:
          type: string
          example: ophthalmic
    Shortage:
      type: object
      required:
      - id
      - drug_ids
      properties:
        id:
          type: string
        status:
          type: string
        update_type:
          type: string
        generic_name:
          type: string
        strength:
          type: string
        presentation:
          type: string
        ndc11:
          type: array
          items:
            type: string
        application_numbers:
          type: array
          items:
            type: string
        drug_ids:
          type: array
          items:
            type: string
        conflicts:
          type: array
          items:
            type: object
  parameters:
    graph_version:
      in: query
      name: graph_version
      required: false
      schema:
        type: string
      description: Exact snapshot pin. Unknown or pruned versions return 410 gone_graph.
    as_of:
      in: query
      name: as_of
      required: false
      schema:
        type: string
      description: 'Latest retained snapshot with built_at <= this instant. RFC3339 is an exact instant; YYYY-MM-DD includes that whole UTC day. Envelope freshness is `pinned`.

        '
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pw_live_
      description: 'Live keys start `pw_live_`; sandbox keys start `pw_test_` and share the same API with a 500-lookup monthly cap. Minted from the account pages or by an operator (`pillwise key create`). Shown once. A Cabinet PUT that would add a member past the tenant''s band returns 402 member_cap_reached. Scopes: index:read, cabinet:read, cabinet:write, cabinet:export. Cabinet reads and exports are audited like writes. Successful Index responses may include X-Quota-Used, X-Quota-Limit, X-Quota-Remaining, X-Quota-Period, X-Quota-Overage-Until.

        '
x-refined-from:
- pillwise-dev-openapi.json
- pillwise-dev-openapi.json