# GoodRx Drug Information API Documentation

Scrappa's `GET /api/goodrx/drug-info` endpoint returns the public monograph for a drug slug: description, a side effects summary and an alternatives list. Alternative slugs pass through unchanged and work with the price endpoint.

- **Documentation:** [https://scrappa.co/docs/goodrx-api/goodrx_drug_info](https://scrappa.co/docs/goodrx-api/goodrx_drug_info)
- **API group:** GoodRx API
- **Endpoint:** `GET https://scrappa.co/api/goodrx/drug-info`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | Pass-through slug from a search result, e.g. atorvastatin. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/goodrx/drug-info?slug=atorvastatin"
```

## Example response

```json
{
    "success": true,
    "name": "Atorvastatin",
    "description": "Atorvastatin lowers cholesterol.",
    "sideEffectsSummary": "Muscle pain, nausea and headache.",
    "alternatives": [
        {
            "name": "Rosuvastatin",
            "slug": "rosuvastatin",
            "url": "https://www.goodrx.com/rosuvastatin"
        }
    ],
    "images": [
        "https://www.grxstatic.com/images/atorvastatin.png"
    ],
    "slug": "atorvastatin",
    "meta": {
        "duration_ms": 12800,
        "attempts": 1,
        "source": "goodrx"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | Upstream Unavailable | GoodRx returned a blocked, empty or malformed page on every attempt. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
