# GoodRx drug API

Get GoodRx drug metadata by slug or URL via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no proxies required. Powered by Apish, pass parameters such as drug, output, and retrieve structured data including source drug slug, source drug name, default source strength, source formulation identifier, and form selector slug for drug catalogue, and price lookup.

Documentation: https://openany.si/goodrx/goodrx-drug-api/f3bf8bf8-ffc5-406a-8cda-eedd5f7e15ae/
API ID: f3bf8bf8-ffc5-406a-8cda-eedd5f7e15ae
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/goodrx/v1/drug
Page update time: 2026-12-03T02:46:26.112Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:46:25.813Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## GoodRx Drug Metadata API

Use drug from Search and optionally notes=false. versions retains distinct label, form, dosage and quantity choices; source side-effect or interaction notes are informational content, separate from personalised prescribing.

## What You Can Build

- **Drug catalogue**: Keep labels, strengths and forms as separate versions.
- **Price lookup**: Use source version selectors in a follow-up price request.

## Returned Data

| Field | Meaning |
| --- | --- |
| `slug` | Source drug slug |
| `name` | Source drug name |
| `default_version.dosage` | Default source strength |
| `versions[].drug_id` | Source formulation identifier |
| `versions[].form_slug` | Form selector slug |
| `versions[].dosage_slug` | Strength selector slug |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "GoodRx drug API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "drug": {
          "type": "string",
          "description": "Drug slug from search, or a goodrx.com drug link."
        },
        "notes": {
          "type": "boolean",
          "description": "Include the side-effect and interaction notes (default true)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      },
      "required": [
        "drug"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "conditions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "credits_used": {
      "type": "integer"
    },
    "default_version": {
      "type": "object",
      "properties": {
        "dosage": {
          "type": "string"
        },
        "drug_id": {
          "type": "string"
        },
        "form": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "quantity": {
          "type": "integer"
        }
      }
    },
    "description_html": {
      "type": "string"
    },
    "drug_class": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        }
      }
    },
    "forms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "id": {
      "type": "string"
    },
    "interactions_html": {
      "type": "string"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "name": {
      "type": "string"
    },
    "side_effects_html": {
      "type": "string"
    },
    "similar_drugs": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "slug": {
      "type": "string"
    },
    "titles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "url": {
      "type": "string"
    },
    "versions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "default_quantity": {
                "type": "integer"
              },
              "dosage": {
                "type": "string"
              },
              "dosage_slug": {
                "type": "string"
              },
              "drug_id": {
                "type": "string"
              },
              "form": {
                "type": "string"
              },
              "form_slug": {
                "type": "string"
              },
              "image": {
                "type": "null"
              },
              "label": {
                "type": "string"
              },
              "label_slug": {
                "type": "string"
              },
              "label_type": {
                "type": "string"
              },
              "lifecycle": {
                "type": "string"
              },
              "quantities": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "schedule": {
                "type": "string"
              },
              "unit_plural": {
                "type": "string"
              },
              "unit_singular": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "versions_count": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/goodrx/v1/drug?drug=lisinopril&output=json' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "cached": false,
  "conditions": [
    {
      "name": "Heart Attack",
      "slug": "heart-attack",
      "url": "https://www.goodrx.com/conditions/heart-attack"
    },
    {
      "name": "Heart Failure",
      "slug": "heart-failure",
      "url": "https://www.goodrx.com/conditions/heart-failure"
    },
    "… 1 more"
  ],
  "credits_used": 1,
  "default_version": {
    "dosage": "20mg",
    "drug_id": "193",
    "form": "tablet",
    "label": "lisinopril",
    "quantity": 90
  },
  "description_html": "Lisinopril (<a href='/prinivil'>Prinivil</a>, <a href='/zestril'>Zestril</a>) is an inexpensive drug used to treat <a href='/hypertension'>h…",
  "drug_class": {
    "name": "ACE inhibitors",
    "slug": "ace-inhibitors"
  },
  "forms": [
    "tablet"
  ],
  "id": "2412",
  "interactions_html": "<p>Although certain medicines should not be used together at all, in other cases two different medicines may be used together even if an int…",
  "labels": [
    "prinivil",
    "zestril",
    "… 1 more"
  ],
  "name": "Lisinopril",
  "side_effects_html": "<div class=\"consumer-group\"><p>Along with its needed effects, a medicine may cause some unwanted effects. Although not all of these side eff…",
  "similar_drugs": [
    {
      "name": "Accupril",
      "slug": "accupril",
      "url": "https://www.goodrx.com/accupril"
    },
    {
      "name": "Aceon",
      "slug": "aceon",
      "url": "https://www.goodrx.com/aceon"
    },
    "… 12 more"
  ],
  "slug": "lisinopril",
  "titles": [
    "Lisinopril"
  ],
  "url": "https://www.goodrx.com/lisinopril",
  "versions": [
    {
      "default_quantity": 30,
      "dosage": "5mg",
      "dosage_slug": "5mg",
      "drug_id": "28955",
      "form": "tablet",
      "form_slug": "tablet",
      "image": null,
      "label": "Prinivil",
      "label_slug": "prinivil",
      "label_type": "BRAND",
      "lifecycle": "ON_MARKET",
      "quantities": [
        30
      ],
      "schedule": "6",
      "unit_plural": "tablets of Prinivil 5mg",
      "unit_singular": "tablet of Prinivil 5mg"
    },
    {
      "default_quantity": 30,
      "dosage": "10mg",
      "dosage_slug": "10mg",
      "drug_id": "4943",
      "form": "tablet",
      "form_slug": "tablet",
      "image": null,
      "label": "Prinivil",
      "label_slug": "prinivil",
      "label_type": "BRAND",
      "lifecycle": "ON_MARKET",
      "quantities": [
        30
      ],
      "schedule": "6",
      "unit_plural": "tablets of Prinivil 10mg",
      "unit_singular": "tablet of Prinivil 10mg"
    },
    "… 13 more"
  ],
  "versions_count": 15
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Where do version selectors come from?
Use versions for label_slug, form_slug, dosage_slug and available quantities when preparing a Prices request.

### How do I omit side-effect and interaction notes?
Set notes=false; the documented default includes notes.

### Are drug id and version drug_id identical?
They identify different source records. Preserve the drug metadata identity and each formulation version.

### Does retrieving notes select a treatment or dosage?
No. It returns source information and version metadata; it does not prescribe or tailor instructions to a patient.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/goodrx/goodrx-drug-api/f3bf8bf8-ffc5-406a-8cda-eedd5f7e15ae/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
