{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Pharmacy Prescription Price & Prime Discount Lookup",
    "description": "Look up Amazon Pharmacy cash, Prime and average insurance prices for US prescriptions by drug name, product URL or a bulk drug/strength/quantity list. Rows include retail price, Prime discount, supply, form, strength, Rx flag and RxPass eligibility.",
    "version": "1.0",
    "x-build-id": "MtN1ggZTfrecAe9pM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlyth-forge~amazon-pharmacy-price-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlyth-forge-amazon-pharmacy-price-lookup",
        "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/crawlyth-forge~amazon-pharmacy-price-lookup/runs": {
      "post": {
        "operationId": "runs-sync-crawlyth-forge-amazon-pharmacy-price-lookup",
        "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/crawlyth-forge~amazon-pharmacy-price-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-crawlyth-forge-amazon-pharmacy-price-lookup",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byUrl",
              "bulk"
            ],
            "type": "string",
            "description": "How to find the medications to price.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Drug names (mode=search)",
            "type": "array",
            "description": "One or more generic or brand drug names, e.g. `atorvastatin`, `Lipitor`, `metformin ER`. Every query is searched and all matching products are priced.",
            "default": [
              "atorvastatin"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "priceLowToHigh",
              "priceHighToLow",
              "reviewRank",
              "newest"
            ],
            "type": "string",
            "description": "Order of the Amazon search result pages (mode=search).",
            "default": "relevance"
          },
          "startUrls": {
            "title": "Product URLs or ASINs (mode=byUrl)",
            "type": "array",
            "description": "Amazon Pharmacy product URLs, `pharmacy.amazon.com/dp/...` links or `amazon.com/dp/...` links (mode=byUrl). Use `asins` for bare IDs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "asins": {
            "title": "ASINs (mode=byUrl)",
            "type": "array",
            "description": "Bare Amazon ASINs such as `B0846GFL6G` (mode=byUrl). Combine with product URLs if you like.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bulkDrugs": {
            "title": "Bulk drug list (mode=bulk)",
            "type": "array",
            "description": "Each entry is a drug to resolve and price. Optional per-entry strength, form, quantity and days supply narrow the matching options. Example: `[{\"drugName\": \"atorvastatin\", \"strength\": \"80 MG\", \"quantity\": 30}]`.",
            "items": {
              "type": "object",
              "properties": {
                "drugName": {
                  "title": "Drug name",
                  "type": "string",
                  "description": "Generic or brand drug name."
                },
                "strength": {
                  "title": "Strength",
                  "type": "string",
                  "description": "Strength to match, e.g. `80 MG` or `500 MG/5 ML`."
                },
                "dosageForm": {
                  "title": "Dosage form",
                  "type": "string",
                  "description": "Dosage form to match, e.g. `TABLET` or `CAPSULE`."
                },
                "quantity": {
                  "title": "Quantity",
                  "type": "integer",
                  "description": "Exact number of units to match, e.g. `30`."
                },
                "daysSupply": {
                  "title": "Days supply",
                  "type": "integer",
                  "description": "Days of supply to match: `30` or `90`.",
                  "minimum": 1,
                  "maximum": 365
                }
              },
              "required": [
                "drugName"
              ]
            },
            "default": []
          },
          "strength": {
            "title": "Strength filter",
            "type": "string",
            "description": "Only keep options whose strength contains this text, e.g. `80 MG`. Leave empty for all strengths."
          },
          "dosageForm": {
            "title": "Dosage form filter",
            "enum": [
              "any",
              "TABLET",
              "CAPSULE",
              "SOFTGEL CAPSULE",
              "SUSTAINED RELEASE TABLET",
              "DELAYED RELEASE CAPSULE",
              "EXTENDED RELEASE TABLET",
              "CREAM",
              "OINTMENT",
              "SOLUTION",
              "TOPICAL SOLUTION",
              "INHALATION SOLUTION",
              "SUSPENSION",
              "POWDER FOR ORAL SUSPENSION",
              "NASAL SPRAY",
              "SPRAY",
              "INHALER",
              "INHALANT POWDER",
              "PEN INJECTOR",
              "VIAL",
              "INJECTION",
              "PATCH",
              "GEL",
              "LOTION",
              "DROPS",
              "SUPPOSITORY",
              "POWDER",
              "PACK",
              "DEVICE",
              "TABLETS",
              "CHEWABLE TABLET",
              "DELAYED RELEASE TABLET",
              "GRANULE",
              "ORAL SOLUTION"
            ],
            "type": "string",
            "description": "Only keep options in this dosage form. Leave on Any for all forms.",
            "default": "any"
          },
          "daysSupply": {
            "title": "Days supply filter",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only keep options for exactly this many days of supply, e.g. `30` or `90`. Leave empty for all supply lengths."
          },
          "dailyDose": {
            "title": "Daily dose filter",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Only keep options for this many units per day.",
            "default": "any"
          },
          "quantity": {
            "title": "Quantity filter",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Only keep options with exactly this many units. Leave empty for all quantities."
          },
          "drugType": {
            "title": "Generic or brand",
            "enum": [
              "any",
              "generic",
              "brand"
            ],
            "type": "string",
            "description": "Keep only generic products, only brand products, or both.",
            "default": "any"
          },
          "includeRxPass": {
            "title": "Include RxPass eligibility",
            "type": "boolean",
            "description": "Check Amazon's RxPass medication list and flag products included in the $5/month RxPass subscription.",
            "default": true
          },
          "includeMedicationSummary": {
            "title": "Include medication summary headings",
            "type": "boolean",
            "description": "Add the headings from the product page's medication summary (about, usage, side effects, interactions).",
            "default": true
          },
          "maxSearchPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many Amazon search result pages to read per drug name (16 results per page).",
            "default": 3
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of price-option rows to emit. Each row is one daily-dose and supply combination for one product.",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}