{
  "openapi": "3.0.1",
  "info": {
    "title": "Target Category Scraper",
    "description": "Target Category Scraper scrapes Target.com products from category URLs, search keywords or product URLs in bulk: price and sale price, rating, reviews, UPC, DPCI, variants, seller and store stock near any ZIP code. Export JSON, CSV or Excel, or use the API.",
    "version": "0.1",
    "x-build-id": "ANftA6aUjmMCdKVhB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fastdataapi~target-category-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fastdataapi-target-category-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/fastdataapi~target-category-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fastdataapi-target-category-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/fastdataapi~target-category-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fastdataapi-target-category-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": {
          "categoryUrls": {
            "title": "🔗 Category URLs",
            "type": "array",
            "description": "Target category links or category IDs, one per line (e.g. https://www.target.com/c/kitchen-dining/-/N-hz89j or hz89j). Filters in the link (brand, price, pick-up today...) are kept. Each category returns its own products.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔎 Search keywords",
            "type": "array",
            "description": "Words to search on Target, one per line (e.g. coffee maker). Each keyword returns its own products, the same as Target's search page.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "🆔 Product URLs or TCINs",
            "type": "array",
            "description": "Target product links or TCIN numbers, one per line (e.g. https://www.target.com/p/-/A-1014534035 or 1014534035). One row per product; a link to a color or size returns that variant.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max products per input",
            "minimum": 0,
            "maximum": 1200,
            "type": "integer",
            "description": "How many products to return for EACH category URL and EACH search keyword. Target lists at most 1,200 products per category or search; 0 = all of them. Product URLs always return one row each. Free plan: up to 20 products per run (all inputs together) and 200 per month; paid plans have no limit.",
            "default": 20
          },
          "sort": {
            "title": "🔃 Sort by",
            "enum": [
              "featured",
              "price_low",
              "price_high",
              "rating",
              "bestselling",
              "newest"
            ],
            "type": "string",
            "description": "Order of the category and search results.",
            "default": "featured"
          },
          "zipCode": {
            "title": "📍 ZIP code",
            "type": "string",
            "description": "US ZIP code. The nearest Target store to it is used for the store stock fields (pick-up, in-store, quantity).",
            "default": "55403"
          },
          "storeId": {
            "title": "📍 Pricing store ID",
            "type": "string",
            "description": "Target store ID whose prices are shown (prices can differ by store). 3991 = Target.com online prices.",
            "default": "3991"
          },
          "includeDetails": {
            "title": "✅ Include details and store stock",
            "type": "boolean",
            "description": "Adds description, review count, UPC, seller, variants and stock at the nearest store to every product. Turn off for faster runs with listing fields only.",
            "default": true
          },
          "includeSponsored": {
            "title": "✅ Include sponsored products",
            "type": "boolean",
            "description": "Also return the sponsored products Target shows in category and search results (flagged in is_sponsored).",
            "default": false
          },
          "startPage": {
            "title": "🔢 Start page",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Category and search results start at this page (24 products per page). Use it to continue an earlier run.",
            "default": 1
          },
          "categoryTree": {
            "title": "🆔 Category tree for",
            "type": "array",
            "description": "Lists Target's categories: enter top for the top-level categories, or a category URL/ID for its sub-categories. Rows go to the separate 'categories' dataset (not charged). Use it to find category IDs.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "⚡ Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Result pages loaded at the same time (details use twice this).",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "🔁 Max request retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Attempts per request when it fails.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "⏳ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one answer before retrying.",
            "default": 30
          },
          "requestDelaySecs": {
            "title": "⏳ Delay between pages (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Polite pause before each result page. 0 = no pause.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional proxy to start with.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}