# Target Scraper (`anyxsolutions/target-scraper`) Actor

Scrapes Target product details, in-store availability, and store locations, returning titles, prices, ratings, variants, fulfilment status, and store addresses.

- **URL**: https://apify.com/anyxsolutions/target-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/anyxsolutions) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.69 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

![banner](<run ./scripts/banner.sh to generate>)

## Target Scraper

**Product details, prices, availability, and store locations from Target — no API key required.**

Scrapes Target product details, in-store availability, and store locations, returning titles,
prices, ratings, variants, fulfilment status, and store addresses. Feed it product URLs, store
pages, the store sitemap, or store numbers and get clean JSON, CSV, or Excel back. Useful for price
monitoring, stock alerts, catalogue enrichment, and retail location analysis.

### ⚡ Quick start

```json
{
  "startUrls": [
    { "url": "https://www.target.com/sl/sitemap_0001.xml.gz" },
    {
      "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693"
    }
  ],
  "maxItems": 5,
  "includeAvailability": false
}
```

### 🧩 Input

| Field                 | Type    | Required | Default                      | Description                                                                            |
| --------------------- | ------- | -------- | ---------------------------- | -------------------------------------------------------------------------------------- |
| `startUrls`           | array   | yes      | —                            | Target URLs to scrape. Product pages, store pages and the store sitemap are supported. |
| `storeIds`            | array   | no       | —                            | Target store numbers to scrape store details for, e.g. `3` or `1771`.                  |
| `maxItems`            | integer | no       | `5`                          | Maximum results per start URL or store ID.                                             |
| `includeAvailability` | boolean | no       | `false`                      | Also return per-variant pricing and fulfilment for every product page scraped.         |
| `storeId`             | string  | no       | —                            | Store number to price and check fulfilment against, e.g. `1771`.                       |
| `zipCode`             | string  | no       | —                            | US postal code used for delivery estimates, e.g. `52404`.                              |
| `proxyConfiguration`  | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. Not needed for this Actor.                                             |

### 📤 Output

Every result is one dataset row. The `itemType` field tells the four shapes apart: `product` for a
full product page, `availability` for a per-variant pricing and fulfilment row, `storeLocation` for
a store entry from the sitemap, and `store` for a full store record.

#### Fields

| Field                       | Type    | Description                                                            |
| --------------------------- | ------- | ---------------------------------------------------------------------- |
| `itemType`                  | string  | `product`, `availability`, `storeLocation`, or `store`.                |
| `tcin`                      | string  | Target product number.                                                 |
| `url`                       | string  | Canonical Target URL of the product or store.                          |
| `title`                     | string  | Product name.                                                          |
| `rating`                    | number  | Average customer rating out of 5.                                      |
| `review_count`              | number  | Number of customer reviews.                                            |
| `variants`                  | array   | Per-variant product number, price, free-shipping flag, and stock flag. |
| `price`                     | object  | Current and regular price, formatted price, and the pricing location.  |
| `free_shipping`             | boolean | Whether the variant ships free.                                        |
| `fulfillment`               | object  | Shipping, pickup, and delivery options as offered.                     |
| `in_stock`                  | boolean | Whether any fulfilment channel can supply the item.                    |
| `slug`                      | string  | URL slug of the store.                                                 |
| `store_id`                  | string  | Target store number.                                                   |
| `location_name`             | string  | Store name, e.g. `Cedar Rapids South`.                                 |
| `status`                    | string  | Store status, e.g. `Open`.                                             |
| `is_test_location`          | boolean | Whether the location is a test store.                                  |
| `geofence`                  | object  | Store latitude, longitude, and radius.                                 |
| `mailing_address`           | object  | Street, city, county, state, country, and postal code.                 |
| `main_voice_phone_number`   | string  | Store phone number.                                                    |
| `capabilities`              | array   | Services offered at the store, e.g. Drive Up or pharmacy.              |
| `drive_up`                  | object  | Drive Up parking and pickup details.                                   |
| `contact_information`       | array   | Additional store contact channels.                                     |
| `physical_specifications`   | object  | Building area, floor count, and format.                                |
| `geographic_specifications` | object  | Region, market, and district identifiers.                              |
| `miscellaneous`             | object  | Remodel dates, store class, and similar attributes.                    |
| `rolling_operating_hours`   | object  | Opening hours by day, including department hours.                      |

<details><summary>Example output</summary>

```json
{
  "itemType": "product",
  "tcin": "95213693",
  "title": "Women's Lace Godet Tank Top - Wild Fable™ Black XXS",
  "rating": 4.29,
  "review_count": 42,
  "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693",
  "variants": [
    {
      "tcin": "95205382",
      "price": {
        "current_retail": 15.0,
        "reg_retail": 15.0,
        "formatted_current_price": "$15.00",
        "location_id": 3991
      },
      "free_shipping": false,
      "in_stock": true
    }
  ]
}
```

</details>

### 💡 Use cases

- **Price monitoring** — track current and regular prices per variant and catch promotions the day they start.
- **Stock alerts** — watch `in_stock` per variant at a specific store number and react when an item comes back.
- **Catalogue enrichment** — pull titles, ratings, review counts, and the full variant tree for products you already track.
- **Retail location analysis** — pull every store's address, hours, and services for coverage and catchment work.

### ❓ FAQ

- **Do I need a proxy?** No. Target serves this data without one, so proxies are off by default.
- **Can I scrape Target search results?** No. Target's `robots.txt` disallows the search results path for every user agent, so this Actor does not support it. Use product URLs instead.
- **How do I get prices for a specific store?** Turn on `includeAvailability` and set `storeId` (and optionally `zipCode`) to the store you care about.
- **How many results can I get?** `maxItems` caps results per start URL. Add more start URLs to widen coverage.
- **Can I get every Target store?** Yes — add the store sitemap URL to `startUrls` for the full list of store pages, then feed the store numbers back in via `storeIds`.
- **Why are some fields empty?** Not every product or store publishes every field. Sale prices and some store services are commonly absent.

### 🔗 More scrapers by Anyx

- [Google Play Store Scraper](https://apify.com/anyxsolutions/google-play-scraper)
- [Yellow Pages Scraper](https://apify.com/anyxsolutions/yellowpages-scraper)
- [Kleinanzeigen Scraper](https://apify.com/anyxsolutions/kleinanzeigen-scraper)
- [Indeed Scraper](https://apify.com/anyxsolutions/indeed-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

### 🖼 Image credit

Image credit: [target.com](https://www.target.com/)

# Actor input Schema

## `startUrls` (type: `array`):

Target URLs to scrape. Product pages (/p/.../-/A-...), store pages (/sl/<slug>/<id>) and the store sitemap (/sl/sitemap\_0001.xml.gz) are supported. Search result pages are not.

## `storeIds` (type: `array`):

Target store numbers to scrape store details for, for example 3 or 1771. One entry per store.

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

Maximum number of results to return per start URL or store ID. Products, listings, stores and availability rows all count towards it.

## `includeAvailability` (type: `boolean`):

Also return per-variant pricing and fulfilment for every product page scraped. Availability rows are returned as separate dataset items.

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

Store number to price and check fulfilment against, for example 1771. Leave empty to use online availability.

## `zipCode` (type: `string`):

US postal code used for delivery estimates, for example 52404. Only used when Include availability is enabled.

## `proxyConfiguration` (type: `object`):

Apify proxy settings. Target serves this data without a proxy, so proxies are disabled by default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.target.com/sl/sitemap_0001.xml.gz"
    },
    {
      "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693"
    }
  ],
  "maxItems": 5,
  "includeAvailability": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.target.com/sl/sitemap_0001.xml.gz"
        },
        {
            "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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 = { "startUrls": [
        { "url": "https://www.target.com/sl/sitemap_0001.xml.gz" },
        { "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/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 '{
  "startUrls": [
    {
      "url": "https://www.target.com/sl/sitemap_0001.xml.gz"
    },
    {
      "url": "https://www.target.com/p/women-s-lace-godet-tank-top-wild-fable/-/A-95213693"
    }
  ]
}' |
apify call anyxsolutions/target-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,anyxsolutions/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/OEF367sE4xw7zfQ7C/builds/dfS0A6qAaa2DXJ5t3/openapi.json
