{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Scraper — Products, Prices, Stock & Reviews",
    "description": "Scrape Target.com search, category, brand and product pages: price, regular price, sale and clearance flags, Circle offers, stock, store pickup, UPC, variants and reviews.",
    "version": "0.1",
    "x-build-id": "l3ZNAWULMGYNnXxjx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~target-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~target-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~target-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Target.com, one per line (e.g. \"headphones\", \"air fryer\"). Each term is searched separately and paginated automatically: one request returns 24 products plus sponsored ones.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Target.com URLs instead of (or in addition to) search terms: search pages (https://www.target.com/s?searchTerm=lego), category pages (https://www.target.com/c/headphones-electronics-tech/-/N-5xteg), brand pages (https://www.target.com/b/shokz/-/N-q643leuuk8t) or product pages (https://www.target.com/p/-/A-89827259, returned with full details). Filters in the URL (facetedValue, sortBy, Z... facet ids) are kept.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "tcins": {
            "title": "Product IDs (TCIN)",
            "type": "array",
            "description": "Target item numbers (TCIN, the digits after /A- in a product URL, e.g. 89827259). Each one is returned with full product details.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many dataset items in total. Products and reviews both count, so with reviews on raise it accordingly (100 products with 20 reviews each = 2,100 items). Target shows 1,200 products per search; above that the search is split into price ranges automatically.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max products per search",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on products per search term or start URL, so several searches in one run each get their share of Max items. Empty = no per-search cap."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_low",
              "price_high",
              "bestselling",
              "newest",
              "rating_high",
              "featured"
            ],
            "type": "string",
            "description": "Result order for search terms, category and brand pages, as in Target's own \"Sort by\" menu.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price (Target's own price filter). Sponsored products ignore Target's filter, so those outside the range are dropped before saving and never charged."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price (Target's own price filter)."
          },
          "includeSponsored": {
            "title": "Include sponsored products",
            "type": "boolean",
            "description": "Target mixes up to 6 sponsored products into each results page. They are saved with isSponsored = true. Turn this off to keep organic results only (recommended for monitoring: ads rotate between visits).",
            "default": true
          },
          "storeId": {
            "title": "Store ID (for store pickup stock)",
            "type": "string",
            "description": "Target store id (e.g. 1176, shown in the store's URL on target.com/sl/...). Adds store pickup and in-store status, quantity and aisle for that store to every product. Leave empty for online availability only."
          },
          "zipCode": {
            "title": "ZIP code (nearest store)",
            "type": "string",
            "description": "US ZIP code; the nearest Target store is used for store pickup stock (ignored when Store ID is set)."
          },
          "includeDetails": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Also fetch each product's details: UPC, category path, description, highlights, specifications, all images, every variant (color / size) with its own price and UPC, rating breakdown, seller for marketplace items, return policy and package dimensions. One extra request and one extra `detail` charge per product.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Also collect customer reviews for every product, as separate items with type = \"review\" (rating, title, text, date, reviewer nickname as Target shows it, verified purchaser, helpful votes, photos). Up to 50 reviews per request.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on reviews per product.",
            "default": 20
          },
          "reviewSort": {
            "title": "Sort reviews",
            "enum": [
              "most_recent",
              "helpful",
              "rating_high",
              "rating_low"
            ],
            "type": "string",
            "description": "Order in which reviews are collected (matters when a cap is set). \"Most recent\" is best for monitoring; \"Lowest rating\" surfaces complaints.",
            "default": "most_recent"
          },
          "reviewsNewerThan": {
            "title": "Only reviews newer than",
            "type": "string",
            "description": "Only reviews newer than: a date (YYYY-MM-DD) or a period such as '7 days' or '24 hours'. Reviews are then read newest first and reading stops at the first review page that is entirely older. Applies when Include reviews is on."
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged. Compared: price, regular price, online availability (plus store availability with a store, and rating count with reviews on). Max items is then the watched window: that many products are checked each run.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy (the default) works: Target's public APIs are read directly, no browser and no Unblocker needed. Residential proxy also works but costs more.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}