{
  "openapi": "3.0.1",
  "info": {
    "title": "Barcode Price Checker: UPC & EAN Price Compare",
    "description": "Look up prices for any UPC, EAN or GTIN barcode across Amazon, Best Buy and Target, matched exactly, plus Walmart, eBay and any store on Google Shopping. Price comparison, MAP checks, your price position and change monitoring, with results in seconds.",
    "version": "0.3",
    "x-build-id": "Kp30cDU4vEUr8vPfH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleanpull~barcode-price-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleanpull-barcode-price-checker",
        "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/cleanpull~barcode-price-checker/runs": {
      "post": {
        "operationId": "runs-sync-cleanpull-barcode-price-checker",
        "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/cleanpull~barcode-price-checker/run-sync": {
      "post": {
        "operationId": "run-sync-cleanpull-barcode-price-checker",
        "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": [
          "products"
        ],
        "properties": {
          "products": {
            "title": "Barcodes or product names",
            "type": "array",
            "description": "UPC (12 digits), EAN (13), GTIN-14 or EAN-8, one per line. Amazon, Best Buy and Target are searched by the barcode itself. A product name (for example \"Sony WH-1000XM5\") is searched on Google Shopping only.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Where to look. Amazon and Best Buy match the barcode exactly. Google Shopping adds Walmart, Target, eBay and other stores, matched by model number or name. Target by barcode is off by default: Target often refuses automated requests, and its prices come from Google Shopping instead.",
            "items": {
              "type": "string",
              "enum": [
                "amazon",
                "bestbuy",
                "target",
                "google"
              ],
              "enumTitles": [
                "Amazon (by barcode)",
                "Best Buy (by barcode)",
                "Target (by barcode; often refused, best effort)",
                "Google Shopping (Walmart, Target, eBay and other stores)"
              ]
            },
            "default": [
              "amazon",
              "bestbuy",
              "google"
            ]
          },
          "serviceStores": {
            "title": "Target and Best Buy through the data service (slow)",
            "type": "array",
            "description": "Optional. Look these stores up by barcode through CleanPull's marketplace data service instead of reading them directly: every barcode of the run goes in one search per store, which takes 3 to 5 minutes whatever the number of barcodes. Exact matches only (the store's barcode must equal yours). Billed per exact match delivered (at most one per barcode and store) and per search that answered; see Pricing. Empty: off.",
            "items": {
              "type": "string",
              "enum": [
                "target",
                "bestbuy"
              ],
              "enumTitles": [
                "Target",
                "Best Buy"
              ]
            },
            "default": []
          },
          "googleStores": {
            "title": "Stores on Google Shopping",
            "type": "array",
            "description": "One Google Shopping search per store, filtered to that store, as named on Google Shopping (Walmart, eBay, Home Depot, Lowe's, Newegg, Crutchfield, B&H Photo…). Default: Walmart and Target. Each store is one Google request.",
            "items": {
              "type": "string"
            }
          },
          "googleNameSearch": {
            "title": "Also search Google Shopping without a store filter",
            "type": "boolean",
            "description": "One more Google request per product: finds stores you did not name (smaller shops, marketplace sellers).",
            "default": true
          },
          "conditions": {
            "title": "Conditions",
            "type": "array",
            "description": "Offers in other conditions are set aside. The condition comes from the store's label, else a condition word in the offer's title (\"(Renewed)\", \"Open Box\", \"Pre-Owned\"); Google Shopping listings without either are new. Offers whose condition no source states (unknown) are kept, and never counted as new.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "renewed",
                "used",
                "open-box",
                "refurbished"
              ],
              "enumTitles": [
                "New",
                "Renewed / refurbished",
                "Used / pre-owned",
                "Open box",
                "Refurbished (same as renewed)"
              ]
            },
            "default": [
              "new"
            ]
          },
          "minConfidence": {
            "title": "Minimum match confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "0 to 1. Barcode matches are 1; Google listings with the model number about 0.85–1; listings matched on name words only 0.5–0.9.",
            "default": 0.7
          },
          "includeSetAside": {
            "title": "Include set-aside listings",
            "type": "boolean",
            "description": "Also return the Google listings that were set aside (another colour, a price far from the others, low confidence, another condition), with the reason.",
            "default": false
          },
          "mapPrices": {
            "title": "Minimum advertised prices (MAP)",
            "type": "object",
            "description": "Optional: {\"barcode\": price}. Each product lists the offers below its MAP, by how much, with links."
          },
          "myPrices": {
            "title": "My prices",
            "type": "object",
            "description": "Optional: {\"barcode\": price}. Each product says how many offers are cheaper than yours."
          },
          "monitorMode": {
            "title": "Changes only (monitoring)",
            "type": "boolean",
            "description": "Schedule the same input: after the first run, only products whose offers changed are returned, with what changed.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate watches apart: each name remembers its own last prices.",
            "default": "default"
          },
          "changeTypes": {
            "title": "Changes to report",
            "type": "array",
            "description": "Which changes count.",
            "items": {
              "type": "string",
              "enum": [
                "new-offer",
                "offer-removed",
                "price-down",
                "price-up",
                "stock",
                "new-lowest"
              ],
              "enumTitles": [
                "New offer (a store or seller appears)",
                "Offer removed",
                "Price down",
                "Price up",
                "Stock change",
                "New lowest price"
              ]
            },
            "default": [
              "new-offer",
              "offer-removed",
              "price-down",
              "price-up",
              "stock",
              "new-lowest"
            ]
          },
          "minPriceChangePercent": {
            "title": "Minimum price change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Smaller price moves are not reported.",
            "default": 1
          },
          "maxRunCostUsd": {
            "title": "Max cost per run (USD)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Optional. Stop starting new products once a run's charges, plus what the products in progress could still cost, would pass this. Use it for scheduled runs, which may have no spending limit of their own. Empty: only the run's spending limit applies."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "products",
              "offers"
            ],
            "type": "string",
            "description": "Product records carry all offers, the lowest price and checks; offer rows suit a spreadsheet.",
            "default": "products"
          },
          "fields": {
            "title": "Fields",
            "type": "array",
            "description": "Optional: return only these fields.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Products at once",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many products are checked in parallel.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The actor picks proxies itself; set one only to use your own.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}