# Target Product Scraper - Pricing, Reviews, Inventory (`elliotpadfield/target-scraper`) Actor

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.

- **URL**: https://apify.com/elliotpadfield/target-scraper.md
- **Developed by:** [Elliot Padfield](https://apify.com/elliotpadfield) (community)
- **Categories:** E-commerce, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 target product scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Target Product Scraper - Prices, UPCs & Inventory

Scrape Target.com product search results, prices, sale prices, UPC barcodes, ratings, reviews, images, descriptions, category data, and optional store-level availability from Target's RedSky API.

This Actor is built for price monitoring, retail analytics, UPC enrichment, MAP compliance, affiliate catalogs, deal discovery, and SKU-level competitor research. It uses raw HTTPS requests to Target's RedSky API through Apify Residential Proxy, so it is much faster and cheaper than browser-driven Target scrapers.

### What this Target scraper does

- Searches Target.com by keyword
- Enriches exact Target product URLs or TCINs
- Pulls current price, regular price, sale price, and discount percentage
- Extracts product title, TCIN, DPCI, brand, image URLs, bullets, and descriptions
- Fetches UPC barcodes and fuller PDP metadata when product detail enrichment is enabled
- Optionally fetches local shipping and pickup availability for a store, ZIP, and state
- Deduplicates TCINs across multiple keywords and records all matching keywords
- Uses Target RedSky endpoints directly, with no browser rendering
- Uses Apify Residential Proxy automatically
- Retries Target 429s, 5xxs, proxy failures, and RedSky captcha-block responses

### Why use RedSky instead of a browser?

Target's website is a React storefront backed by RedSky JSON endpoints. The browser page is just the expensive way to get to the same product data. This Actor calls the same backend data surface directly, which means:

- Faster runs: one search request returns up to 24 products
- Lower memory: no Chromium instance
- Cleaner data: structured product JSON instead of fragile DOM selectors
- Better coverage: prices, reviews, UPCs, images, categories, and availability signals are exposed as fields

### Input examples

#### Basic keyword search

```json
{
  "searchQueries": ["wireless headphones", "coffee maker"],
  "maxProductsPerQuery": 50
}
````

#### Pull UPCs, descriptions, and category data

```json
{
  "searchQueries": ["running shoes"],
  "maxProductsPerQuery": 25,
  "includeProductDetails": true
}
```

#### Check local availability

```json
{
  "searchQueries": ["lego"],
  "maxProductsPerQuery": 100,
  "storeId": "3991",
  "zip": "10001",
  "state": "NY",
  "includeProductDetails": true,
  "includeFulfillment": true
}
```

#### Enrich specific Target products

```json
{
  "productUrls": [
    "https://www.target.com/p/-/A-86696921"
  ],
  "tcins": ["54191097"],
  "includeProductDetails": true,
  "includeFulfillment": true
}
```

### Input fields

| Field | Type | Default | Description |
|---|---:|---:|---|
| `searchQueries` | string\[] | `["wireless headphones"]` | Target.com search keywords to scrape. |
| `queries` | string\[] | none | Alias for `searchQueries`. |
| `productUrls` | string\[] | none | Target product URLs. The Actor extracts TCINs automatically. |
| `tcins` | string\[] | none | Target Content Item Numbers to enrich directly. |
| `maxProductsPerQuery` | integer | `100` | Maximum search products per keyword. Target returns 24 products per page. |
| `maxProducts` | integer | none | Alias for `maxProductsPerQuery`, supported for compatibility with other Target scraper inputs. |
| `storeId` | string | `"3991"` | Target store ID used for local pricing and fulfillment context. |
| `zip` | string | `"10001"` | ZIP code for optional fulfillment checks. |
| `state` | string | `"NY"` | Two-letter state code for optional fulfillment checks. |
| `includeProductDetails` | boolean | `true` | Fetch PDP RedSky data for UPC, descriptions, bullets, and richer metadata. |
| `fetchProductDetails` | boolean | none | Alias for `includeProductDetails`, supported for compatibility with other Target scraper inputs. |
| `includeFulfillment` | boolean | `false` | Fetch store-level shipping and pickup availability per product. |
| `includeRawData` | boolean | `false` | Attach raw RedSky fragments for debugging or custom parsing. |
| `dedupeProducts` | boolean | `true` | Save one row per TCIN across all sources and collect all matched keywords. |
| `maxConcurrency` | integer | `8` | Concurrent product detail and fulfillment requests. |
| `requestDelayMs` | integer | `500` | Base retry delay in milliseconds. |
| `maxRetries` | integer | `4` | Retries for transient failures and RedSky blocks. |
| `redskyApiKey` | string | blank | Optional override. Leave blank for automatic key scrape plus fallback. |

### Output fields

#### Product identity

| Field | Description |
|---|---|
| `title` | Product title from Target. |
| `tcin` | Target Content Item Number. |
| `dpci` | Target DPCI when available. |
| `upc` | UPC barcode from PDP enrichment when available. |
| `brand` | Product brand. |
| `url` | Target product URL. |
| `sourceType` | `search`, `tcin`, or `productUrl`. |
| `sourceValue` | Keyword, TCIN, or URL that produced the row. |
| `searchKeyword` | First search keyword that discovered the product. |
| `searchKeywords` | All matching keywords when dedupe is enabled. |
| `searchRank` | Rank within the search result page sequence. |
| `searchPage` | Search page number. |

#### Pricing

| Field | Description |
|---|---|
| `price` | Current retail price. |
| `regularPrice` | Regular non-sale price when Target exposes it. |
| `salePrice` | Sale price when discounted. |
| `saveAmount` | Dollar discount. |
| `savePercent` | Percentage discount. |
| `formattedPrice` | Display price string. |
| `formattedRegularPrice` | Display regular price string. |
| `formattedSalePrice` | Display sale price string. |

#### Ratings and media

| Field | Description |
|---|---|
| `rating` | Average star rating. |
| `reviewCount` | Number of reviews. |
| `imageUrl` | Primary Target image URL. |
| `alternateImages` | Additional Target image URLs. |

#### PDP enrichment

| Field | Description |
|---|---|
| `description` | Short cleaned product description. |
| `bulletDescriptions` | Product bullet/spec list. |
| `fullDescription` | Fuller cleaned PDP description when exposed. |
| `category` | Category label. |
| `categoryId` | Category identifier. |
| `categoryBreadcrumbs` | Breadcrumb path when exposed. |
| `isMarketplace` | Whether the product appears to be marketplace sold. |
| `sellerName` | Seller name when exposed. |

#### Availability enrichment

| Field | Description |
|---|---|
| `availabilityStatus` | Shipping or pickup status from fulfillment data. |
| `inStock` | Whether shipping or pickup appears in stock. |
| `shippingAvailable` | Whether shipping is in stock. |
| `pickupAvailable` | Whether pickup is in stock. |
| `shippingQuantity` | Available-to-promise quantity when exposed. |
| `storeId` | Store ID used for the run. |
| `zip` | ZIP used for fulfillment checks. |
| `state` | State used for fulfillment checks. |

### Output example

```json
{
  "title": "Sony WH-1000XM5 Wireless Noise Canceling Headphones",
  "tcin": "86696921",
  "dpci": "008-07-1234",
  "upc": "027242923782",
  "brand": "Sony",
  "url": "https://www.target.com/p/-/A-86696921",
  "searchKeyword": "wireless headphones",
  "searchKeywords": ["wireless headphones", "noise cancelling headphones"],
  "searchRank": 1,
  "searchPage": 1,
  "sourceType": "search",
  "sourceValue": "wireless headphones",
  "price": 269.99,
  "regularPrice": 399.99,
  "salePrice": 269.99,
  "saveAmount": 130,
  "savePercent": 32.5,
  "formattedPrice": "$269.99",
  "rating": 4.7,
  "reviewCount": 1842,
  "imageUrl": "https://target.scene7.com/is/image/Target/GUEST_abc123",
  "alternateImages": [
    "https://target.scene7.com/is/image/Target/GUEST_def456"
  ],
  "description": "Industry-leading noise cancellation | 30-hour battery life",
  "bulletDescriptions": [
    "Industry-leading noise cancellation with Auto NC Optimizer",
    "30-hour battery life with quick charging"
  ],
  "category": "Headphones",
  "categoryBreadcrumbs": "Electronics > Headphones > Wireless Headphones",
  "availabilityStatus": "IN_STOCK",
  "inStock": true,
  "shippingAvailable": true,
  "pickupAvailable": false,
  "shippingQuantity": 4,
  "storeId": "3991",
  "zip": "10001",
  "state": "NY",
  "scrapedAt": "2026-05-31T22:00:00.000Z"
}
```

### Performance notes

- Search runs use `plp_search_v2`, 24 products per request.
- PDP enrichment uses `pdp_client_v1`, one extra request per product.
- Fulfillment enrichment uses `product_fulfillment_and_variation_hierarchy_v1`, one extra request per product.
- Keep `includeFulfillment` off for broad catalog runs where inventory is not needed.
- Keep `dedupeProducts` on for multi-keyword monitoring to avoid paying twice for the same TCIN.

### Comparison

| Feature | This Actor | Basic RedSky Target scrapers | Browser-based Target scrapers | Generic retail scrapers |
|---|---|---|---|---|
| Search by keyword | Yes | Yes | Usually | Usually |
| Product URL and TCIN enrichment | Yes | Usually no | Usually | Sometimes |
| RedSky API engine | Yes | Yes | No | Mixed |
| No browser required | Yes | Yes | No | Mixed |
| UPC support | Yes, via PDP enrichment | Sometimes | Rare | Rare |
| Regular vs sale price split | Yes | Yes | Partial | Partial |
| Ratings and review counts | Yes | Yes | Usually | Sometimes |
| Category breadcrumbs | Yes, when exposed by PDP | Yes | Rare | Rare |
| Store-level price context | Yes | Yes | Sometimes | Sometimes |
| Store-level fulfillment checks | Yes, optional per TCIN | Usually no | Sometimes, slow | Usually no |
| Multi-keyword dedupe | Yes | Usually no | Usually no | Usually no |
| Raw response debugging | Optional | Usually no | No | No |
| RedSky key override | Yes | Usually no | Not applicable | Usually no |

The main difference is that this Actor is built as a production catalog tool, not only a keyword scraper. It supports the competitor-style keyword workflow, but also accepts exact product URLs and TCINs, can check fulfillment, dedupes repeated TCINs across keywords, and exposes compatibility aliases for `maxProducts` and `fetchProductDetails`.

### Pricing

This Actor is designed for pay-per-result pricing. One saved Target product row counts as one result. Failed requests, skipped duplicate TCINs, and enrichment failures that do not produce a dataset row should not count as saved results.

For broad monitoring runs, disable `includeFulfillment` unless you need inventory. PDP enrichment is the right default for catalog-quality output because it unlocks UPCs, fuller descriptions, and category data.

### Code examples

#### From the Apify API

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~target-products-prices-inventory-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["wireless headphones"],
    "maxProducts": 25,
    "storeId": "3991",
    "fetchProductDetails": true
  }'
```

#### From Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("YOUR_USERNAME/target-products-prices-inventory-scraper").call(run_input={
    "searchQueries": ["coffee maker", "espresso machine"],
    "maxProductsPerQuery": 50,
    "includeProductDetails": True,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item.get("price"), item.get("upc"))
```

#### From Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('YOUR_USERNAME/target-products-prices-inventory-scraper').call({
  searchQueries: ['gaming monitor'],
  maxProducts: 40,
  storeId: '3991',
  fetchProductDetails: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(items.map((item) => ({
  title: item.title,
  price: item.price,
  upc: item.upc,
  rating: item.rating,
})));
```

### Reliability notes

Target can captcha-block direct datacenter and home IP requests to RedSky. This Actor forces Apify Residential Proxy and classifies RedSky captcha JSON as retryable. If Target rotates its RedSky API key, the Actor first tries to scrape a fresh key from public Target pages. You can also pass `redskyApiKey` explicitly if you have a known-good key from browser recon.

If a product detail or fulfillment call fails, the Actor keeps the search result row and logs the enrichment failure instead of discarding the product. Failed search pages stop that keyword only; other keywords and TCINs continue.

### FAQ

#### Do I need a Target account?

No. The Actor reads public Target product/search data exposed to guest shoppers through RedSky. RedCard member pricing and authenticated account-only data are not supported.

#### How do I find my Target store ID?

Open Target.com, choose a store, then inspect the URL or Network tab for `store_id`. Common examples include `3991`, `1375`, `2775`, and `1462`.

#### Does this scrape individual reviews?

No. It returns aggregate rating and review count. Individual review extraction would need a separate reviews endpoint workflow.

#### Does this support category URLs?

Not directly. Use a category-specific keyword such as `women's running shoes`, or pass exact product URLs/TCINs when you already know the catalog items.

#### Is this legal?

This Actor is intended for public product, price, and availability information visible to ordinary Target shoppers. Review Target's terms and get legal advice for your specific use case.

### Use cases

- Price monitoring for Target SKUs
- UPC enrichment for catalog matching
- MAP compliance checks
- Sale and markdown tracking
- Affiliate product feeds
- Retail competitor intelligence
- Local inventory checks by store
- Building historical Target pricing datasets

### Migration from other Target scrapers

The common competitor input below works here too:

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~target-products-prices-inventory-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["lego"],
    "maxProducts": 50,
    "storeId": "3991",
    "fetchProductDetails": true
  }'
```

You can then add this Actor's extra options, such as `includeFulfillment`, `productUrls`, `tcins`, `dedupeProducts`, and `includeRawData`, when you need a richer workflow.

### Changelog

- v1.0.0 - Initial RedSky-based Target scraper with keyword search, TCIN/product URL enrichment, PDP details, UPCs, ratings, pricing, images, category data, optional fulfillment, Apify schemas, and compatibility aliases.

# Actor input Schema

## `searchQueries` (type: `array`):

Target.com search keywords to scrape, such as wireless headphones, lego, coffee maker, or running shoes.

## `queries` (type: `array`):

Alias for Search Queries. Useful for API clients that use a shorter field name.

## `productUrls` (type: `array`):

Target product URLs to enrich. The Actor extracts TCINs from URLs like https://www.target.com/p/-/A-86696921.

## `tcins` (type: `array`):

Target Content Item Numbers to enrich directly.

## `maxProductsPerQuery` (type: `integer`):

Maximum search result products to save per keyword. Target search paginates in batches of 24.

## `maxProducts` (type: `integer`):

Alias for Maximum Products per Query. Supported for compatibility with other Target scraper inputs.

## `storeId` (type: `string`):

Target store ID used for local pricing and availability.

## `zip` (type: `string`):

ZIP code used when fetching optional fulfillment and availability data.

## `state` (type: `string`):

Two-letter state code used when fetching optional fulfillment and availability data.

## `includeProductDetails` (type: `boolean`):

Fetch the PDP RedSky endpoint for each TCIN to enrich results with UPC, full description, bullets, category fields, and richer metadata.

## `fetchProductDetails` (type: `boolean`):

Alias for Include Product Details. Supported for compatibility with other Target scraper inputs.

## `includeFulfillment` (type: `boolean`):

Fetch store-level shipping and pickup availability for each TCIN.

## `includeRawData` (type: `boolean`):

Attach raw RedSky response fragments for debugging or custom downstream parsing. This makes dataset rows much larger.

## `dedupeProducts` (type: `boolean`):

Save one row per TCIN across all sources and collect all matching search keywords in searchKeywords.

## `maxConcurrency` (type: `integer`):

Number of product detail or fulfillment requests to run in parallel.

## `requestDelayMs` (type: `integer`):

Base delay in milliseconds between retry attempts after transient failures.

## `maxRetries` (type: `integer`):

Retry count for transient HTTP failures, proxy failures, Target 429s, and RedSky captcha-block responses.

## `redskyApiKey` (type: `string`):

Optional override. Leave blank to let the Actor scrape a current key from Target pages, then fall back to the bundled key if needed.

## Actor input object example

```json
{
  "searchQueries": [
    "wireless headphones"
  ],
  "maxProductsPerQuery": 100,
  "storeId": "3991",
  "zip": "10001",
  "state": "NY",
  "includeProductDetails": true,
  "includeFulfillment": false,
  "includeRawData": false,
  "dedupeProducts": true,
  "maxConcurrency": 8,
  "requestDelayMs": 500,
  "maxRetries": 4
}
```

# Actor output Schema

## `results` (type: `string`):

Target products, prices, ratings, UPCs, descriptions, category data, images, and optional availability stored in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "wireless headphones"
    ],
    "maxProductsPerQuery": 100,
    "storeId": "3991",
    "zip": "10001",
    "state": "NY",
    "includeProductDetails": true,
    "includeFulfillment": false,
    "includeRawData": false,
    "dedupeProducts": true,
    "maxConcurrency": 8,
    "requestDelayMs": 500,
    "maxRetries": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("elliotpadfield/target-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["wireless headphones"],
    "maxProductsPerQuery": 100,
    "storeId": "3991",
    "zip": "10001",
    "state": "NY",
    "includeProductDetails": True,
    "includeFulfillment": False,
    "includeRawData": False,
    "dedupeProducts": True,
    "maxConcurrency": 8,
    "requestDelayMs": 500,
    "maxRetries": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("elliotpadfield/target-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "wireless headphones"
  ],
  "maxProductsPerQuery": 100,
  "storeId": "3991",
  "zip": "10001",
  "state": "NY",
  "includeProductDetails": true,
  "includeFulfillment": false,
  "includeRawData": false,
  "dedupeProducts": true,
  "maxConcurrency": 8,
  "requestDelayMs": 500,
  "maxRetries": 4
}' |
apify call elliotpadfield/target-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=elliotpadfield/target-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
