{
  "openapi": "3.0.1",
  "info": {
    "title": "GoodRx Drug Price Scraper",
    "description": "Compare GoodRx pharmacy prices for medications by US ZIP code. Get pickup or mail-order offers with drug details, price types, offer links, and the time each price was found.",
    "version": "0.0",
    "x-build-id": "RY8S2IIraKkcrhqQ8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~goodrx/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-goodrx",
        "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/maximedupre~goodrx/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-goodrx",
        "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/maximedupre~goodrx/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-goodrx",
        "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",
        "required": [
          "medications",
          "zipCodes"
        ],
        "properties": {
          "medications": {
            "title": "Medications",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Add drug names, GoodRx page slugs, or GoodRx drug page URLs. Use one item for each medication you want to compare.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Add one or more 5-digit US ZIP codes.",
            "items": {
              "type": "string",
              "pattern": "^\\d{5}$"
            }
          },
          "form": {
            "title": "Medication form",
            "minLength": 1,
            "type": "string",
            "description": "Use one form for all medications, such as tablet or capsule. Leave this empty to use the form found by GoodRx."
          },
          "dosage": {
            "title": "Dosage",
            "minLength": 1,
            "type": "string",
            "description": "Use one dosage for all medications, such as 20 mg. Leave this empty to use the dosage found by GoodRx."
          },
          "quantity": {
            "title": "Quantity",
            "minimum": 1,
            "type": "integer",
            "description": "Set the priced quantity for every medication. Leave this empty to use the quantity found by GoodRx."
          },
          "deliveryModes": {
            "title": "Delivery modes",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Choose local pickup, mail order, or both for every comparison.",
            "items": {
              "type": "string",
              "enum": [
                "pickup",
                "mail_order"
              ],
              "enumTitles": [
                "Local pickup",
                "Mail order"
              ]
            },
            "default": [
              "pickup"
            ]
          },
          "radiusMiles": {
            "title": "Search radius",
            "minimum": 1,
            "type": "integer",
            "description": "Set the pickup search radius in miles. This is not used for mail-order offers."
          },
          "pharmacyChains": {
            "title": "Pharmacy chains",
            "uniqueItems": true,
            "type": "array",
            "description": "Add pharmacy chain names to keep. This filter applies to local pickup offers.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "sortBy": {
            "title": "Order results by",
            "enum": [
              "price",
              "distance",
              "pharmacy"
            ],
            "type": "string",
            "description": "Choose how to order offers. Distance is used only for local pickup offers.",
            "default": "price"
          },
          "maxOffers": {
            "title": "Maximum offers",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many offers for each medication, ZIP code, and delivery mode. Leaving it empty returns all available offers until the source is exhausted."
          },
          "includePrintableCouponDetails": {
            "title": "Get printable coupon details",
            "type": "boolean",
            "description": "Get public BIN, PCN, group, and member IDs from found coupon pages. This makes the run slower.",
            "default": false
          },
          "__isDebug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Internal operator-only debug mode.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}