{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Product Scraper - Pricing, Reviews, Inventory",
    "description": "Scrape Target.com products, prices, UPCs, ratings, reviews, images, categories, and optional store-level inventory using Target’s RedSky API. Search by keyword or enrich TCINs/product URLs. Fast no-browser scraper with sale prices, PDP details, and shipping/pickup availability.",
    "version": "0.0",
    "x-build-id": "oCj4sCx6kpAx7SM4X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/elliotpadfield~target-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-elliotpadfield-target-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/elliotpadfield~target-scraper/runs": {
      "post": {
        "operationId": "runs-sync-elliotpadfield-target-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/elliotpadfield~target-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-elliotpadfield-target-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": {
          "searchQueries": {
            "title": "Search Queries",
            "uniqueItems": true,
            "type": "array",
            "description": "Target.com search keywords to scrape, such as wireless headphones, lego, coffee maker, or running shoes.",
            "items": {
              "type": "string"
            },
            "default": [
              "wireless headphones"
            ]
          },
          "queries": {
            "title": "Queries",
            "uniqueItems": true,
            "type": "array",
            "description": "Alias for Search Queries. Useful for API clients that use a shorter field name.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Target product URLs to enrich. The Actor extracts TCINs from URLs like https://www.target.com/p/-/A-86696921.",
            "items": {
              "type": "string"
            }
          },
          "tcins": {
            "title": "TCINs",
            "uniqueItems": true,
            "type": "array",
            "description": "Target Content Item Numbers to enrich directly.",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerQuery": {
            "title": "Maximum Products per Query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum search result products to save per keyword. Target search paginates in batches of 24.",
            "default": 100
          },
          "maxProducts": {
            "title": "Maximum Products",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Alias for Maximum Products per Query. Supported for compatibility with other Target scraper inputs."
          },
          "storeId": {
            "title": "Store ID",
            "type": "string",
            "description": "Target store ID used for local pricing and availability.",
            "default": "3991"
          },
          "zip": {
            "title": "ZIP Code",
            "type": "string",
            "description": "ZIP code used when fetching optional fulfillment and availability data.",
            "default": "10001"
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state code used when fetching optional fulfillment and availability data.",
            "default": "NY"
          },
          "includeProductDetails": {
            "title": "Include Product Details",
            "type": "boolean",
            "description": "Fetch the PDP RedSky endpoint for each TCIN to enrich results with UPC, full description, bullets, category fields, and richer metadata.",
            "default": true
          },
          "fetchProductDetails": {
            "title": "Fetch Product Details",
            "type": "boolean",
            "description": "Alias for Include Product Details. Supported for compatibility with other Target scraper inputs."
          },
          "includeFulfillment": {
            "title": "Include Fulfillment",
            "type": "boolean",
            "description": "Fetch store-level shipping and pickup availability for each TCIN.",
            "default": false
          },
          "includeRawData": {
            "title": "Include Raw RedSky Data",
            "type": "boolean",
            "description": "Attach raw RedSky response fragments for debugging or custom downstream parsing. This makes dataset rows much larger.",
            "default": false
          },
          "dedupeProducts": {
            "title": "Deduplicate Products",
            "type": "boolean",
            "description": "Save one row per TCIN across all sources and collect all matching search keywords in searchKeywords.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum Concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of product detail or fulfillment requests to run in parallel.",
            "default": 8
          },
          "requestDelayMs": {
            "title": "Retry Delay",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Base delay in milliseconds between retry attempts after transient failures.",
            "default": 500
          },
          "maxRetries": {
            "title": "Maximum Retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retry count for transient HTTP failures, proxy failures, Target 429s, and RedSky captcha-block responses.",
            "default": 4
          },
          "redskyApiKey": {
            "title": "RedSky API Key",
            "type": "string",
            "description": "Optional override. Leave blank to let the Actor scrape a current key from Target pages, then fall back to the bundled key if needed."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}