# Compare One Drug's GoodRx Price Across Cities

**Use case:** 

See how the GoodRx coupon price of one drug varies between cities. The example checks metformin in New York, Chicago and Los Angeles ZIP codes, with pharmacy name and price. Replace the drug and ZIP codes with your own.

## Input

```json
{
  "drugNames": [
    "metformin"
  ],
  "startUrls": [
    {
      "url": "https://www.goodrx.com/atorvastatin"
    }
  ],
  "zips": [
    "10001",
    "60601",
    "90012"
  ],
  "quantity": 30,
  "radius": 10,
  "sortBy": "lowest_price",
  "deliveryType": "pickup",
  "resolveAutocomplete": false,
  "includeCoupons": false,
  "maxOffersPerDrugZip": 10,
  "maxAttemptsPerTarget": 3,
  "maxConcurrency": 1,
  "delayMs": 3000,
  "navigationTimeoutSecs": 45,
  "saveDebugHtml": false,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

## Output

```json
{
  "drugInput": {
    "label": "Drug Input",
    "format": "string"
  },
  "canonicalDrugName": {
    "label": "Canonical Drug",
    "format": "string"
  },
  "zip": {
    "label": "ZIP",
    "format": "string"
  },
  "deliveryType": {
    "label": "Delivery Type",
    "format": "string"
  },
  "pharmacyChain": {
    "label": "Pharmacy Chain",
    "format": "string"
  },
  "storeName": {
    "label": "Store Name",
    "format": "string"
  },
  "couponPriceUsd": {
    "label": "Coupon Price USD",
    "format": "number"
  },
  "listPriceUsd": {
    "label": "Retail Price USD",
    "format": "number"
  },
  "savingsPercent": {
    "label": "Savings Percent",
    "format": "number"
  },
  "goldPriceUsd": {
    "label": "Gold Price USD",
    "format": "number"
  },
  "distanceMiles": {
    "label": "Distance Miles",
    "format": "number"
  },
  "address": {
    "label": "Address",
    "format": "string"
  },
  "couponUrl": {
    "label": "Coupon URL",
    "format": "string"
  },
  "pharmacyDeepLink": {
    "label": "Pharmacy Deep Link",
    "format": "string"
  },
  "scrapedAt": {
    "label": "Scraped At",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The GoodRx Drug Prices Scraper — No Login Required Actor is ready to run with the inputs already set for "Compare One Drug's GoodRx Price Across Cities". [Sign up or log in](https://console.apify.com/create-task-from-example/usBalC5RwvefEITZ7) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Compare One Drug's GoodRx Price Across Cities" task

The GoodRx Drug Prices Scraper — No Login Required Actor will start running based on the input automatically. You can also change all the input fields, like drug names, goodrx drug urls, and more, to match your specific use case.

### 3. Receive the "Compare One Drug's GoodRx Price Across Cities" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as drug input, canonical drug, ZIP, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Compare One Drug's GoodRx Price Across Cities" task via API](https://apify.com/crowdpull/goodrx-drug-prices-scraper.md).

## FAQ

### What data does the drug price by city task return?

The drug price by city task returns one row per pharmacy offer: drug, dosage, quantity, pharmacy name, coupon price and distance.

### How do I adapt the drug price by city task to my own search?

Save the drug price by city task to your account, then edit its input. Change Drug names to any prescription drugs and ZIP codes to the areas you want to compare. Quantity and dosage are optional.

### Can the drug price by city task run automatically?

The drug price by city task can run on an Apify schedule and send results to Google Sheets, Slack, Zapier, Make, n8n or a webhook.

### Do I need an account or login for the site to run the drug price by city task?

The drug price by city task needs only an Apify account. It reads publicly visible pages, so you never enter a login or cookies for the site being scraped.

## About this Actor

This example demonstrates how to use [GoodRx Drug Prices Scraper — No Login Required](https://apify.com/crowdpull/goodrx-drug-prices-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/crowdpull/goodrx-drug-prices-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/crowdpull/goodrx-drug-prices-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
