# GoodRx search API

Search GoodRx drug, condition or drug-class suggestions by query prefix via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no proxies required. Powered by Apish, pass parameters such as output, q, and retrieve structured data including typed search query, returned result count, source suggestion name, source result category, and source page slug for catalogue search, and detail navigation.

Documentation: https://openany.si/goodrx/goodrx-search-api/3d4bbe89-fe03-4e94-b476-41a877287497/
API ID: 3d4bbe89-fe03-4e94-b476-41a877287497
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/goodrx/v1/search
Page update time: 2026-12-03T02:46:32.603Z
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:31.100Z. 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 Search API

Provide q and optionally limit from 1 to 50. results\[\].type distinguishes source categories; use a drug result's slug for Drug Metadata or Prices rather than treating every suggestion as a formulation.

## What You Can Build

- **Catalogue search**: Keep source category labels attached to suggestions.
- **Detail navigation**: Use drug slugs for follow-up metadata or price lookups.

## Returned Data

| Field | Meaning |
| --- | --- |
| `query` | Typed search query |
| `count` | Returned result count |
| `results[].name` | Source suggestion name |
| `results[].type` | Source result category |
| `results[].slug` | Source page slug |
| `results[].url` | Source result URL |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "GoodRx search 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": {
        "q": {
          "type": "string",
          "description": "Drug, condition or drug class name, or its start."
        },
        "limit": {
          "type": "integer",
          "description": "Results, 1-50 (default 10)."
        },
        "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": [
        "q"
      ]
    },
    "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"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "query": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "featured": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "promotion": {
                "type": "null"
              },
              "slug": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/goodrx/v1/search?output=json&q=lipit' \
  -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,
  "count": 5,
  "credits_used": 1,
  "query": "lipit",
  "results": [
    {
      "featured": false,
      "id": "2406",
      "name": "Lipitor (brand-name)",
      "promotion": null,
      "slug": "lipitor",
      "title": "Lipitor (brand-name)",
      "type": "drug",
      "url": "https://www.goodrx.com/lipitor"
    },
    {
      "featured": false,
      "id": "388",
      "name": "Lipitor (generic)",
      "promotion": null,
      "slug": "lipitor",
      "title": "Lipitor (generic)",
      "type": "drug",
      "url": "https://www.goodrx.com/lipitor"
    },
    "… 3 more"
  ]
}
```

## 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
### How many suggestions can I request?
limit accepts 1–50, default 10.

### Is every result a drug?
No. Check type; the search also accepts condition and drug-class queries.

### How do I retrieve a drug profile?
Use a drug result's slug or URL with Drug Metadata.

### Does this operation return local pharmacy prices?
No. Use Prices with a drug and US ZIP for local price options.

### 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-search-api/3d4bbe89-fe03-4e94-b476-41a877287497/

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