{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Product & Local Store Scraper",
    "description": "Gives you local prices and inventory by US ZIP code or exact store ID, full product details, and up to 1,000 full customer reviews per product in one workflow.",
    "version": "0.0",
    "x-build-id": "dUH1ia4tc9YxQW5ZT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hypebridge~target-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hypebridge-target-product-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/hypebridge~target-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hypebridge-target-product-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/hypebridge~target-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hypebridge-target-product-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": {
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 5000,
            "type": "array",
            "description": "Target direct PDP, search, category, home, or overview URLs. Home/overview extracts only visible product cards/links from the submitted page; no recursive category crawl.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of total products to extract across all queries and URLs.",
            "default": 50
          },
          "getProductDetails": {
            "title": "Enrich with full product details",
            "type": "boolean",
            "description": "Enrich products discovered on search/category/home/overview pages with full PDP details. Direct PDP URLs and TCINs always return details. getProductReviews automatically enables details for discovered products.",
            "default": false
          },
          "getProductReviews": {
            "title": "Get product reviews",
            "type": "boolean",
            "description": "Attach paginated full reviews to each product, including direct PDP URLs and TCINs. Automatically enables product details for products discovered on search/category/home/overview pages. Off keeps existing aggregate ratings/counts without review-body requests.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Maximum reviews per product",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique reviews attached to one product; the review page limit can stop collection sooner. maxItems still counts products.",
            "default": 20
          },
          "maxReviewPagesPerProduct": {
            "title": "Maximum review pages per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard maximum logical review pages attempted per product, including failed pages (up to 50 reviews/page). At most two retries per page and 3 times this limit in total HTTP attempts.",
            "default": 10
          },
          "searchQueries": {
            "title": "Search queries",
            "maxItems": 100,
            "type": "array",
            "description": "Keywords to search on Target.com (e.g. 'organic whole milk', 'air fryer', 'lego star wars').",
            "items": {
              "type": "string",
              "pattern": "^.{1,200}$"
            }
          },
          "tcins": {
            "title": "Direct TCINs",
            "maxItems": 5000,
            "uniqueItems": true,
            "type": "array",
            "description": "Direct 8-to-10 digit Target Item Numbers (e.g. '13276134', '54640214').",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{8,10}$"
            }
          },
          "zipCode": {
            "title": "ZIP code (Store Localization)",
            "pattern": "^[0-9]{5}$",
            "type": "string",
            "description": "US ZIP code to resolve the nearest physical Target store for localized shelf prices, inventory, and address metadata. (e.g. '90210', '77001', '10001').",
            "default": "77001"
          },
          "storeId": {
            "title": "Store ID override",
            "pattern": "^[1-9][0-9]{0,5}$",
            "type": "string",
            "description": "Optional direct Target Store ID (e.g. '775', '1396'). Overrides zipCode lookup if provided."
          },
          "maxPagesPerSearch": {
            "title": "Maximum collection pages per start",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Shared discovery budget per seed. Search/category count listing pages; home/overview count each document and module API read, so use at least 2 for those sources. Stops at maxItems, verified source exhaustion, or this cap. Defaults to 50. Review pages use a separate limit.",
            "default": 50
          },
          "debugMode": {
            "title": "Save failure diagnostics",
            "type": "boolean",
            "description": "Save bounded sanitized failure HTML/JSON and available screenshots for diagnosis. Off by default.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}