{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Scraper",
    "description": "Target Scraper SD - Target Scraper is an e-commerce data tool that extracts Target.com search, category and brand results, full product details and customer reviews: TCIN, price, sale price, rating, seller, UPC, specifications, variants and review text - no login.",
    "version": "1.0",
    "x-build-id": "IuFiEXxcA7CNjLsO6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~target-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~target-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~target-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "products",
              "reviews"
            ],
            "type": "string",
            "description": "products = one row per product (search, category and brand URLs give the result list; a product URL or TCIN gives the full product). reviews = one row per customer review of every product given by URL / TCIN or found by the search terms.",
            "default": "products"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What you would type in the Target search box, one per line. Example: coffee maker",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Target URLs or TCINs (optional)",
            "type": "array",
            "description": "Search URLs (https://www.target.com/s?searchTerm=air+fryer), category URLs (https://www.target.com/c/kitchen-appliances-dining/-/N-5xtrs), brand URLs (https://www.target.com/b/keurig/-/N-5uvm4), product URLs (https://www.target.com/p/-/A-94469587) or bare TCINs (94469587). The kind is detected from each line.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows in total (products in products mode, reviews in reviews mode). Result pages are read until this number is reached or Target has no more.",
            "default": 20
          },
          "maxPagesPerSearch": {
            "title": "Max result pages per search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Safety limit on result pages (24 products each) read per search term, category or brand. Target serves at most 50 pages (1,200 products) per query.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "default",
              "relevance",
              "Featured",
              "PriceLow",
              "PriceHigh",
              "RatingHigh",
              "bestselling",
              "newest"
            ],
            "type": "string",
            "description": "Order of search, category and brand results, using Target's own sort options. Default keeps Target's order (relevance for searches, featured for categories).",
            "default": "default"
          },
          "includeSponsored": {
            "title": "Include sponsored products",
            "type": "boolean",
            "description": "Add the sponsored (ad) placements Target mixes into unsorted results, flagged isSponsored = true. An advertised product can then appear twice: once as an ad and once in its organic position.",
            "default": false
          },
          "includeDetails": {
            "title": "Add full product details to search results",
            "type": "boolean",
            "description": "Products mode: reads the product API for every search result and adds UPC, description, highlights, specifications, all images, category path, review and question counts, rating distribution and variants. One extra request (about 1 second) per row. Product URLs and TCINs always get these details.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 1,
            "type": "integer",
            "description": "Reviews mode: maximum number of reviews read for each product (50 per request). The run still stops at Max results.",
            "default": 20
          },
          "reviewsSort": {
            "title": "Sort reviews by",
            "enum": [
              "most_recent",
              "helpfulness_desc",
              "highest_rating",
              "lowest_rating"
            ],
            "type": "string",
            "description": "Reviews mode: order in which Target returns the reviews.",
            "default": "most_recent"
          },
          "storeId": {
            "title": "Target store id (optional)",
            "type": "string",
            "description": "Target store number sent as the API's pricing store, e.g. 3412 (New York, Chelsea). Empty = the store Target itself assigns to the visitor (read from the page on every run). Each row's priceLocationId shows the location Target actually priced it at.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Target serves US visitors. A US residential proxy is recommended and is the default.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}