{
  "openapi": "3.0.1",
  "info": {
    "title": "GoodRx Drug Prices Scraper — No Login Required",
    "description": "Extract GoodRx prescription price comparison data by drug and ZIP. No login or cookies needed. Supports pickup and mail-order prices, pharmacy filters, retries, diagnostics, and optional coupon fields.",
    "version": "0.1",
    "x-build-id": "E6XjQRqST0mKvkx1T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crowdpull~goodrx-drug-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crowdpull-goodrx-drug-prices-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crowdpull~goodrx-drug-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crowdpull-goodrx-drug-prices-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crowdpull~goodrx-drug-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crowdpull-goodrx-drug-prices-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "drugNames": {
            "title": "Drug Names",
            "type": "array",
            "description": "Drug names to price. Brand and generic names are kept distinct because GoodRx displays different pages for each.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "GoodRx Drug URLs",
            "type": "array",
            "description": "Optional direct GoodRx drug page URLs such as https://www.goodrx.com/atorvastatin. Existing URL params are preserved and can be overridden by the inputs below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Direct GoodRx drug page URL."
                }
              }
            }
          },
          "zips": {
            "title": "ZIP Codes",
            "type": "array",
            "description": "US ZIP codes used for GoodRx location and nearby pharmacy distance calculations.",
            "items": {
              "type": "string"
            }
          },
          "form": {
            "title": "Form",
            "type": "string",
            "description": "GoodRx form slug or plain text, e.g. tablet, capsule, extended-release-tablet, oral-solution, inhaler."
          },
          "dosage": {
            "title": "Dosage",
            "type": "string",
            "description": "GoodRx dosage slug or plain text, e.g. 20mg, 1mg/ml, 100mcg. The actor normalizes spaces, slashes, and decimals."
          },
          "quantity": {
            "title": "Quantity",
            "minimum": 1,
            "type": "integer",
            "description": "Prescription quantity. GoodRx may clamp very large quantities to the page's allowed maximum."
          },
          "radius": {
            "title": "Radius Miles",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Search radius in miles.",
            "default": 10
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "lowest_price",
              "distance",
              "pharmacy_name"
            ],
            "type": "string",
            "description": "GoodRx price-list sort order.",
            "default": "lowest_price"
          },
          "deliveryType": {
            "title": "Delivery Type",
            "enum": [
              "pickup",
              "mail_order",
              "both"
            ],
            "type": "string",
            "description": "Pickup pharmacies, mail-order offers, or both.",
            "default": "pickup"
          },
          "pharmacyChains": {
            "title": "Pharmacy Chains",
            "type": "array",
            "description": "Optional chain-name filter applied after extraction, e.g. Costco, Walgreens, Walmart.",
            "items": {
              "type": "string"
            }
          },
          "resolveAutocomplete": {
            "title": "Resolve Names With Autocomplete",
            "type": "boolean",
            "description": "Try GoodRx in-page autocomplete before pricing typed drug names. Leave off for lower block risk when drug names already match GoodRx slugs.",
            "default": false
          },
          "includeCoupons": {
            "title": "Extract Printable Coupon Fields",
            "type": "boolean",
            "description": "Open only discovered printable coupon URLs and extract public BIN/PCN/Group/Member ID fields. Does not submit SMS, email, signup, transfer, or order flows.",
            "default": false
          },
          "maxOffersPerDrugZip": {
            "title": "Max Offers Per Drug and ZIP",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum pharmacy offer rows emitted for each drug/ZIP/delivery-type page.",
            "default": 25
          },
          "maxAttemptsPerTarget": {
            "title": "Max Attempts Per Target",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Retry a blocked or wrong-location page with a fresh browser and proxy session.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Number of GoodRx pages processed in parallel. Keep low because GoodRx is browser-bound and proxy-sensitive.",
            "default": 1
          },
          "delayMs": {
            "title": "Delay Between Pages",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Base delay between browser page runs in milliseconds.",
            "default": 3000
          },
          "navigationTimeoutSecs": {
            "title": "Navigation Timeout Seconds",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Per-page browser navigation timeout.",
            "default": 45
          },
          "saveDebugHtml": {
            "title": "Save Debug HTML",
            "type": "boolean",
            "description": "Save blocked, failed, or no-price page HTML and screenshots to the default key-value store.",
            "default": false
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential US proxies are strongly recommended for GoodRx. Datacenter IPs often produce location gates or bot checks.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}