{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Scraper - Cheapest In-Store Price & Stock Near You",
    "description": "Find the Target store near you that has an item in stock at the lowest price: units, aisle and price at every store near a ZIP code, cheapest in-stock store first. One row per product per store, $0.8 per 1,000 rows.",
    "version": "0.0",
    "x-build-id": "y4uMCS49izwr5RIlX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~target-product-price-store-stock-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-target-product-price-store-stock-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/scrapebench~target-product-price-store-stock-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-target-product-price-store-stock-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/scrapebench~target-product-price-store-stock-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-target-product-price-store-stock-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": {
          "itemIds": {
            "title": "Item IDs (TCIN, UPC or DPCI)",
            "type": "array",
            "description": "Target items to check, one per line: a TCIN (8 digits, e.g. 81875472, the number after A- in a product link), a UPC barcode (12 or 13 digits) or a DPCI (e.g. 231-00-0980, the number printed on the shelf tag). Each is checked at every store and ZIP code below. An item with sizes or flavours becomes one row per variation. CHEAPEST STORE NEAR ME: one item here, your ZIP code, Stores per ZIP code 10 to 20, Compare prices on and Only stores that have it on: row 1 of the result is the answer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Search words",
            "type": "array",
            "description": "Words to search Target for, one per line (cordless drill, paper towels). Each returns up to Maximum results products per store, with that store's units, aisle and price.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search words (single)",
            "type": "string",
            "description": "One search, for saved tasks and API calls that send a single value. Use Search words above for several."
          },
          "startUrls": {
            "title": "Target links",
            "type": "array",
            "description": "Product links (https://www.target.com/p/.../A-94408487), category links (https://www.target.com/c/.../N-5xtbp) and/or search links (https://www.target.com/s?searchTerm=drill), one per line. A product returns one row per store; a category or search returns up to Maximum results products per store.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "US ZIP codes, one per line. For each ZIP the run checks the nearest stores (as many as Stores per ZIP says) and returns one row per product per store, in stock first, then nearest.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nearbyStores": {
            "title": "Stores per ZIP code",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the nearest Target stores to check for each ZIP code, 1 to 20. For the cheapest store near you, use 10 to 20 together with Compare prices.",
            "default": 1
          },
          "stores": {
            "title": "Store numbers",
            "type": "array",
            "description": "Target store numbers, one per line (611 is Farmington Hills, Michigan). Every item, search and category runs at each store: one row per product per store. With no store numbers and no ZIP codes the run uses store 1375 (Minneapolis Nicollet Mall) and says so on every row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "store": {
            "title": "Store number (single)",
            "type": "string",
            "description": "One store number, for saved tasks and API calls that send a single value. Use Store numbers above for several."
          },
          "inStoreOnly": {
            "title": "Only stores that have it",
            "type": "boolean",
            "description": "Return only the product-store pairs where Target shows units available at the store. For the cheapest store near you that HAS the item, turn this on together with Compare prices. When no store has the item, a free notice says how many stores were checked.",
            "default": false
          },
          "comparePrices": {
            "title": "Compare prices (cheapest store first)",
            "type": "boolean",
            "description": "Get the price Target sets at EVERY store of a ZIP-code sweep (many grocery and household items cost different amounts by store). The stores then come back in stock first, then lowest price, then nearest, so row 1 is the cheapest store near you that has the item. Charged as Store price per product per store, on top of the product row; nothing extra when Target's price is the same online price everywhere. Off: the price is given for the nearest store only, never copied to the others.",
            "default": false
          },
          "sortBy": {
            "title": "Sort searches by",
            "enum": [
              "relevance",
              "price_low"
            ],
            "type": "string",
            "description": "Order of search words and search links. Lowest price first lists the cheapest matches at each store first (cheapest air fryer near me: Search words 'air fryer', a ZIP code, Stores per ZIP code 5, Lowest price first). Item IDs are not affected.",
            "default": "relevance"
          },
          "includeDetails": {
            "title": "Product details",
            "type": "boolean",
            "description": "Also return the full specification list, description, highlights, all images, weight, dimensions and videos (the UPC is always on item ID rows). Charged once per product (not per store) as Product details.",
            "default": false
          },
          "includeReviews": {
            "title": "Customer reviews",
            "type": "boolean",
            "description": "Also return each product's customer reviews, newest first (rating, title, text, author, date, verified purchaser, helpful votes, replies). One row per review, charged as Review. Reviews are per product, not per store.",
            "default": false
          },
          "maxReviews": {
            "title": "Maximum reviews per product",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Newest reviews to return for each product when Customer reviews is on.",
            "default": 20
          },
          "maxResults": {
            "title": "Maximum results per search, category and store",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH search or category at EACH store. Item IDs and product links are not capped.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as set: with Apify Proxy on and no group picked, the run uses the connection Target answers. Picking a group yourself overrides that.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}