# Target Product Scraper (`crawlerbros/target-scraper`) Actor

Scrape Target.com products with search by keyword, browse by category, look up by TCIN, or fetch trending deals. Returns price, ratings, availability, images, and fulfillment options via Target's RedSky API. No proxy or auth required.

- **URL**: https://apify.com/crawlerbros/target-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 9 total users, 3 monthly users, 94.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Scrape Target.com products at scale — search by keyword, browse by department, look up specific products by TCIN, paste any Target URL, or pull trending deals. Returns prices, ratings, availability, images, and fulfillment options.

> **Proxy note:** Target.com geo-restricts its product API to US IPs. This actor automatically uses a US residential proxy — no proxy configuration is needed, but you must be on the **Apify Starter plan or above** (which includes residential proxies). Free-plan accounts will not return results.

### What this actor does

- **5 modes:** `search`, `byTcin`, `byCategory`, `byUrl`, `deals`
- **Full price data:** current price, original price, sale savings, promotion labels
- **Ratings & reviews:** average rating, review count, question count
- **Availability:** IN\_STOCK / LIMITED\_STOCK / OUT\_OF\_STOCK
- **Fulfillment options:** shipping, in-store pickup, same-day delivery flags
- **Images:** primary product image + additional image gallery
- **Filters:** price range, min rating, on-sale only, in-stock only
- **Empty fields are omitted** — clean, consistent output every time

### Output per product

| Field | Type | Description |
|---|---|---|
| `tcin` | string | Target product ID |
| `title` | string | Product title |
| `brand` | string | Brand name |
| `description` | string | Product description |
| `price` | number | Current selling price (USD) |
| `originalPrice` | number | Regular/list price (USD) |
| `isOnSale` | boolean | True when price < originalPrice |
| `saleSavings` | number | Dollar amount saved when on sale |
| `promotions` | array | Active promotion label texts |
| `rating` | number | Average customer rating (0–5) |
| `ratingCount` | integer | Total number of ratings |
| `questionCount` | integer | Number of customer Q\&As |
| `itemType` | string | Product category/department |
| `primaryImageUrl` | string | Main product image URL |
| `additionalImages` | array | Additional product image URLs |
| `availability` | string | IN\_STOCK / LIMITED\_STOCK / OUT\_OF\_STOCK |
| `fulfillment` | object | `{shipping, pickup, sameDay}` booleans |
| `productUrl` | string | Direct link to Target product page |
| `recordType` | string | Always `"product"` |
| `siteName` | string | Always `"Target"` |
| `scrapedAt` | string | ISO-8601 timestamp |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | Operating mode |
| `query` | string | `iPhone case` | Search keyword (mode=search) |
| `tcins` | array | – | TCIN product IDs (mode=byTcin) |
| `categoryId` | select | `electronics` | Department to browse (mode=byCategory) |
| `url` | string | – | Target product or search URL (mode=byUrl) |
| `minPrice` | number | – | Filter: minimum price in USD |
| `maxPrice` | number | – | Filter: maximum price in USD |
| `minRating` | number | – | Filter: minimum average rating (0–5) |
| `onSaleOnly` | boolean | `false` | Only return products currently on sale |
| `inStockOnly` | boolean | `true` | Only return in-stock products |
| `maxItems` | integer | `5` | Hard cap on returned products (1–500) |

### Modes

#### search — keyword search

```json
{
  "mode": "search",
  "query": "bluetooth headphones",
  "maxItems": 48,
  "inStockOnly": true
}
```

#### byTcin — fetch specific products

```json
{
  "mode": "byTcin",
  "tcins": ["84512345", "12345678"]
}
```

#### byCategory — browse a department

```json
{
  "mode": "byCategory",
  "categoryId": "electronics",
  "maxItems": 100,
  "onSaleOnly": true
}
```

#### byUrl — paste any Target URL

```json
{
  "mode": "byUrl",
  "url": "https://www.target.com/p/apple-airpods-pro/-/A-85978612"
}
```

#### deals — trending deals

```json
{
  "mode": "deals",
  "maxItems": 50,
  "maxPrice": 50.00
}
```

### Categories available

`electronics`, `clothing-women`, `clothing-men`, `toys`, `home`, `baby`, `beauty`, `food`, `sports-outdoors`, `books`, `video-games`, `furniture`, `kitchen`, `health`, `pets`, `automotive`, `office`, `school-supplies`, `movies`, `music`

### FAQ

**Do I need a Target account or API key?**
No. This actor uses Target's public RedSky API. No authentication required.

**Does this need a proxy?**
Yes — Target's product API is geo-restricted to US IPs. The actor manages this automatically using a US residential proxy. You do not configure anything; just make sure your Apify account is on the **Starter plan or above** (which includes residential proxies). Free-plan accounts will return no results.

**How many products can I scrape?**
Up to 500 per run. For large catalogs, run multiple times with different search terms or categories.

**Which mode is safest for smoke tests?**
`search` is the most reliable mode and is used as the default daily test. All 5 modes (`search`, `byTcin`, `byCategory`, `byUrl`, `deals`) produce real data, but `search` is the most consistent because it maps to Target's main search landing page API.

**Why might a field be missing?**
Target doesn't always return all fields for every product. Empty fields are automatically omitted to keep the output clean.

**What is a TCIN?**
A TCIN (Target Corporation Item Number) is Target's internal product identifier, visible in product page URLs as `/A-XXXXXXXX`.

# Actor input Schema

## `mode` (type: `string`):

What to fetch from Target.

## `query` (type: `string`):

Keyword to search for (mode=search). E.g. 'iPhone case'.

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

One or more Target product IDs (TCINs). Accepts numeric strings like '84512345'. Comma-separated strings are also accepted.

## `categoryId` (type: `string`):

Top-level department to browse (mode=byCategory).

## `url` (type: `string`):

A Target product detail page URL or search URL. E.g. 'https://www.target.com/p/item/-/A-12345678' or a search result URL.

## `minPrice` (type: `number`):

Filter out products cheaper than this price.

## `maxPrice` (type: `number`):

Filter out products more expensive than this price.

## `minRating` (type: `number`):

Filter out products with average rating below this value (0.0–5.0).

## `onSaleOnly` (type: `boolean`):

Only emit products that are currently on sale.

## `inStockOnly` (type: `boolean`):

Only emit products with IN\_STOCK availability.

## `maxItems` (type: `integer`):

Hard cap on emitted records (1–500).

## Actor input object example

```json
{
  "mode": "search",
  "query": "iPhone case",
  "tcins": [
    "94715153"
  ],
  "categoryId": "electronics",
  "onSaleOnly": false,
  "inStockOnly": true,
  "maxItems": 5
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing all scraped Target products.

# 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 = {
    "mode": "search",
    "query": "iPhone case",
    "tcins": [
        "94715153"
    ],
    "categoryId": "electronics",
    "onSaleOnly": false,
    "inStockOnly": true,
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/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 = {
    "mode": "search",
    "query": "iPhone case",
    "tcins": ["94715153"],
    "categoryId": "electronics",
    "onSaleOnly": False,
    "inStockOnly": True,
    "maxItems": 5,
}

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "search",
  "query": "iPhone case",
  "tcins": [
    "94715153"
  ],
  "categoryId": "electronics",
  "onSaleOnly": false,
  "inStockOnly": true,
  "maxItems": 5
}' |
apify call crawlerbros/target-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/target-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GWmazK4ZvjKireKN6/builds/gX7h4JOzjJzb4tv6Q/openapi.json
