# Target API by APISH (`apish/target-api`) Actor

Target data as clean JSON via APISH: Store availability of a Target item, Target brand page, Target category and 10 more endpoints. Pay per credit; failed calls are free.

- **URL**: https://apify.com/apish/target-api.md
- **Developed by:** [APISH](https://apify.com/apish) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 credits

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Target API by APISH

Get public Target data as clean, consistent JSON: store availability of a Target item, target brand page, target category, one Target product, target product recommendations, target product variants and more. 13 endpoints, one response shape, numbers parsed, absolute URLs.

### How to use

1. Pick an **Endpoint**. Each option shows what it returns and its price in credits.
2. Enter its **Parameters** as JSON, for example `{"url":"95213693"}`. All parameters are listed below.
3. Run. Each call becomes one row in the dataset. Use **Batch** to run the same endpoint for many inputs and **Pages per input** to follow pagination.

### Pricing

Pay per event: you pay per APISH credit the call used. The price of each endpoint is in the table below. Calls that fail on our side (server errors, timeouts, blocks) are free.

### Endpoints

| Endpoint | Returns | Required parameters | Credits |
|---|---|---|---|
| `/target/v1/availability` | Store availability of a Target item | `tcin`, `store_id`, `zip` | 1 |
| `/target/v1/brand` | Target brand page | — | 1 |
| `/target/v1/category` | Target category | — | 2 |
| `/target/v1/product` | One Target product | `url` | 1 |
| `/target/v1/product/recommendations` | Target product recommendations | `tcin` | 1 |
| `/target/v1/product/variations` | Target product variants | `tcin` | 1 |
| `/target/v1/questions` | Target product questions and answers | — | 1 |
| `/target/v1/reviews` | Target product reviews | — | 1 |
| `/target/v1/search` | Target search | `q` | 1 |
| `/target/v1/store` | Target store | `store_id` | 1 |
| `/target/v1/store-sitemap` | Target store sitemap URLs | — | 1 |
| `/target/v1/stores` | Target stores near a ZIP code | `zip` | 1 |
| `/target/v1/suggest` | Target search suggestions | `q` | 1 |

### Output

Each dataset row has `endpoint`, `params`, `status`, `credits_used` and the endpoint's data. Add `"raw": 1` to the parameters to also get the site's original record, or `"fields": "a,b.c"` to return only the fields you need.

### Endpoint details

#### Store availability of a Target item

Endpoint `/target/v1/availability` · 1 credit per successful call.

Parameters:

- `tcin` (required)
- `store_id` (required)
- `zip` (required)

Example parameters: `{"tcin":"95213693","store_id":"1375","zip":"55403"}`

#### Target brand page

Endpoint `/target/v1/brand` · 1 credit per successful call.

The products of a Target brand page (target.com/b/...), with every brand-page filter and sort: TCIN, title, brand, price, regular price, saving, rating, reviews, images, link and promotions; plus the total, facets (to pass back as `facets`) and sort options. Pass `next_page` back as `page`; null on the last page.

Parameters:

- `url`: Brand page link (target.com/b/<brand>/-/N-<id>).
- `brand_id`: Brand id (the part after N- in the link) instead of url.
- `sort` — one of `featured`, `price_asc`, `price_desc`, `rating`, `bestselling`, `newest`: Order (default: the site's).
- `facets`: Facet ids from `facets`, comma-separated.
- `store_id`: Target store id for prices and availability (default 3991).
- `page`: Page number (default 1, 24 per page).

Example parameters: `{"url":"https://www.target.com/b/genexa/-/N-q643lel65ir"}`

#### Target category

Endpoint `/target/v1/category` · 2 credits per successful call.

Products of a Target category (browse) page, 24 per page: title, brand, price, rating, images, promotions and more, with the category name, breadcrumbs, related categories, facets (pass their ids back as `facets`) and sort options. Pass `next_page` from the previous response; `next_page` is null on the last page.

Parameters:

- `category`: A Target category id, the part after N- in a target.com/c/ link (5xt1a is Grocery). Required unless `url` is given.
- `url`: A target.com/c/<name>/-/N-<id> category page; facets in the link are applied too.
- `page`: Page number. Pass `next_page` from the previous response; `next_page` is null on the last page.
- `sort` — one of `featured`, `price_asc`, `price_desc`, `rating`, `bestselling`, `newest`
- `facets`: Facet ids from `facets` (brand, price, rating, deals...), comma separated.
- `store_id`: Target store id for prices and availability (default 3991).

Example parameters: `{"category":"5xt1a"}`

#### One Target product

Endpoint `/target/v1/product` · 1 credit per successful call.

Parameters:

- `url` (required): Product URL or TCIN.

Example parameters: `{"url":"95213693"}`

#### Target product recommendations

Endpoint `/target/v1/product/recommendations` · 1 credit per successful call.

A product page's recommendation shelf: "Guests also viewed" (also_viewed) or "Discover more options" (more_options), each product with TCIN, title, brand, price, regular price, rating, reviews, image, link and promotions.

Parameters:

- `tcin` (required): Target product id (TCIN) or a product link.
- `kind` — one of `also_viewed`, `more_options`: Which shelf (default also_viewed).
- `store_id`: Target store id for prices and availability (default 3991).

Example parameters: `{"tcin":"95216327"}`

#### Target product variants

Endpoint `/target/v1/product/variations` · 1 credit per successful call.

Every child variant of a Target product (each size, color, ...): TCIN, attribute values (e.g. Color, Size), title, DPCI, UPC, price, current and regular retail, price type, original price, saving, image, swatch, link, shipping and store availability flags, free shipping and promotions; plus the variation dimensions and the parent's price range. A product without variants answers an empty list.

Parameters:

- `tcin` (required): Target product id (TCIN) of the product or any of its variants, or a product link.
- `store_id`: Target store id for prices and availability (default 3991).

Example parameters: `{"tcin":"95216327"}`

#### Target product questions and answers

Endpoint `/target/v1/questions` · 1 credit per successful call.

Customer questions about a product, each with its answers (author, date, helpful votes, whether Target answered). Pass `next_page` back as `page`; `next_page` is null on the last page.

Parameters:

- `tcin`: Target item number (TCIN). Either tcin or url is required.
- `url`: A target.com product link (…/A-<tcin>).
- `page`: Page number, from 1.
- `sort` — one of `most_answers`, `newest`, `recent_answers`, `helpful`: Default most_answers.
- `size`: Questions per page, 1–50 (default 10).

Example parameters: `{"tcin":"91863920"}`

#### Target product reviews

Endpoint `/target/v1/reviews` · 1 credit per successful call.

Customer reviews of a product with rating statistics (average, 1–5 distribution, secondary ratings such as quality and value). Pass `next_page` back as `page`; `next_page` is null on the last page.

Parameters:

- `tcin`: Target item number (TCIN). Either tcin or url is required.
- `url`: A target.com product link (…/A-<tcin>).
- `page`: Page number, from 1.
- `sort` — one of `most_recent`, `helpfulness_desc`, `highest_rating`, `lowest_rating`: Default most_recent.
- `rating`: Only reviews with this many stars (1–5).
- `verified_only`: Only verified purchases.
- `photos_only`: Only reviews with photos.
- `size`: Reviews per page, 1–50 (default 10).

Example parameters: `{"tcin":"91863920"}`

#### Target search

Endpoint `/target/v1/search` · 1 credit per successful call.

Pass `next_page` from the previous response; `next_page` is null on the last page.

Parameters:

- `q` (required)
- `page`: Page number. Pass `next_page` from the previous response; `next_page` is null on the last page.
- `store_id`: Target store id for prices and availability (default 3991).
- `sort` — one of `relevance`, `price_asc`, `price_desc`, `bestselling`, `newest`, `rating`
- `facets`: Target facet ids from the response's `facets` list (price ranges, brands, ratings, deals…), comma separated.
- `category`: A Target category id to search within (e.g. 5xt1a).

Example parameters: `{"q":"LEGO Star Wars"}`

#### Target store

Endpoint `/target/v1/store` · 1 credit per successful call.

One Target store: name, status, link, full address, phone, coordinates, time zone, store format, floor area and levels, Google Maps link, services (Drive Up, pharmacy, Starbucks, ...) with start dates, department phone numbers, and the opening hours of the coming days for the store and each service.

Parameters:

- `store_id` (required): Store id (1375, T-1375) or a store page link (target.com/sl/<name>/1375).

Example parameters: `{"store_id":"1375"}`

#### Target store sitemap URLs

Endpoint `/target/v1/store-sitemap` · 1 credit per successful call.

#### Target stores near a ZIP code

Endpoint `/target/v1/stores` · 1 credit per successful call.

Parameters:

- `zip` (required)
- `limit`: Stores to return (max 50).
- `within`: Radius in miles (max 250).

Example parameters: `{"zip":"55403"}`

#### Target search suggestions

Endpoint `/target/v1/suggest` · 1 credit per successful call.

Target's search box suggestions for typed text: each term with its category (when the suggestion is scoped) and search link.

Parameters:

- `q` (required): Typed text.

Example parameters: `{"q":"lego"}`

### Support

Questions, bugs or a missing field? Open an issue in this Actor's Issues tab and we will reply there.

Public data only: nothing behind a login. You are responsible for how you use the data you collect.

# Actor input Schema

## `endpoint` (type: `string`):

Which Target endpoint to call. Each option shows what it returns and its price in credits.

## `params` (type: `object`):

Query parameters for the endpoint, as JSON. See the README for every endpoint's parameters. Example: {"url":"95213693"}

## `batch` (type: `array`):

Run the same endpoint for many inputs: a list of parameter objects. Each item is one call. Leave empty to use Parameters.

## `maxPages` (type: `integer`):

For paginated endpoints: follow next_cursor up to this many pages per input. 1 = first page only.

## Actor input object example

```json
{
  "endpoint": "/target/v1/product",
  "params": {
    "url": "95213693"
  },
  "batch": [],
  "maxPages": 1
}
```

# Actor output Schema

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

One row per call: endpoint, params, status, credits_used and the data.

# 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 = {
    "endpoint": "/target/v1/product",
    "params": {
        "url": "95213693"
    },
    "batch": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("apish/target-api").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 = {
    "endpoint": "/target/v1/product",
    "params": { "url": "95213693" },
    "batch": [],
}

# Run the Actor and wait for it to finish
run = client.actor("apish/target-api").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 '{
  "endpoint": "/target/v1/product",
  "params": {
    "url": "95213693"
  },
  "batch": []
}' |
apify call apish/target-api --silent --output-dataset

```

## MCP server setup

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

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/bAebuQzCjRuGWOHnq/builds/O3DGbwLBzRnijcG6I/openapi.json
