> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# Target Search Products

Structured Target data: send `queries`. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/target-search-products/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/target-search-products/` with `queries`. The results are in `data.products`; send `data.next_cursor` back as `cursor` to get the next page. 5 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/target-search-products/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "queries=baking sheet" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/target-search-products/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"queries": "baking sheet"},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["products"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `queries` | string | yes | e.g. `baking sheet` | Search term or Target search/category/brand URL. Required first call. ~24-30 products per page. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `sort_by` | string | no | — | One of: `relevance`, `featured`, `price_low`, `price_high`, `newest`, `bestselling`, `rating`. Locked in cursor. |
| `zip_code` | string | no | `52404` | Store/fulfillment ZIP. Locked in cursor. |
| `fetch_product_details` | boolean | no | `false` | +1 pdp call per product. Locked in cursor. |
| `include_sponsored` | boolean | no | `true` | Locked in cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.products`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "queries": "baking sheet",
    "search_query": "baking sheet",
    "source_url": "https://www.target.com/s?searchTerm=baking+sheet",
    "page": 1,
    "page_size": 29,
    "total_results": 381,
    "products": [
      {
        "keyword": "baking sheet",
        "tcin": "1005061896",
        "product_title": "Sur La Table Kitchen Essentials Bake Sale 3-Piece Cookie Sheet Set – Nonstick Carbon 13, 15, 18 Inch",
        "brand": "Sur La Table Kitchen Essentials",
        "current_price": 45,
        "regular_price": 45,
        "on_sale": false,
        "price_type": "reg",
        "discount_amount": 0,
        "discount_percent": 0,
        "formatted_price": "$45.00",
        "average_rating": 0,
        "review_count": 0,
        "url": "https://www.target.com/p/sur-la-table-kitchen-essentials-bake-sale-3-piece-cookie-sheet-set-nonstick-carbon-13-15-18-inch/-/A-1005061896",
        "image_url": "https://target.scene7.com/is/image/Target/GUEST_1dd4d4f7-4945-44ae-bba2-8bed0de32d53",
        "images": [
          "https://target.scene7.com/is/image/Target/GUEST_1dd4d4f7-4945-44ae-bba2-8bed0de32d53",
          "https://target.scene7.com/is/image/Target/GUEST_dc884a7e-e196-4579-a20b-cc8c8782eaed",
          "https://target.scene7.com/is/image/Target/GUEST_3d788d77-7fd5-45b8-8f6c-80040aa48524"
        ],
        "available_online": true,
        "currency": "USD",
        "is_sponsored": true,
        "relationship_type": "Stand Alone",
        "parent_tcin": "1005061896",
        "dpci": null,
        "is_marketplace": true,
        "sold_by": "Gibson Homewares",
        "item_type": "Bakeware Sets",
        "category_id": "4rqx4",
        "badges": [],
        "position": 1,
        "page": 1,
        "search_query": "baking sheet",
        "source_url": "https://www.target.com/s?searchTerm=baking+sheet",
        "total_results": 381,
        "next_page": "https://www.target.com/s?searchTerm=baking+sheet&Nao=24",
        "description": null,
        "highlights": null,
        "specifications": {
          "Features": "Rectangle (shape)",
          "Number of Pieces": "3",
          "Baking Cooking Surface": "Carbon Steel",
          "Lid Material": "No Lid",
          "Includes": "3 cookie sheets",
          "Care & Cleaning": "Hand Wash"
        },
        "weight": null,
        "dimensions": null,
        "package_dimensions": null,
        "country_of_origin": null,
        "upc": null,
        "category_path": null,
        "shipping": null,
        "variation_attributes": null,
        "variants": null,
        "rating_distribution": null,
        "recommended_percentage": null,
        "return_policy": null,
        "scraped_at": "2026-09-26T11:03:33.092Z"
      }
    ],
    "next_cursor": "eyJpIjoiYmFraW5nIHNoZWV0IiwibGsiOnsiZmV0Y2hfcHJvZHVjdF9kZXRhaWxzIjpmYWxzZSwiaW5jbHVkZV9zcG9uc29yZWQiOnRydWUsInNvcnRfYnkiOm51bGwsInppcCI6IjUyNDA0In0sIm4iOjI5LCJvIjoyNCwicCI6MiwicSI6ImJha2luZyBzaGVldCIsInMiOiJnbWR5cTAuMWdqNHZ0LmdwazczNC4xZzgwN2suOHZkdGkuZ203ODA4LjFraGZ1Yy4xaHdsYXkuMWc4MDdtLjFiaG16NC4xZzgxNzAuMWh3bGNnLjFnODA3bC52NTZubS4xZzgxNnkuMWQyczBrLjl3eXV1LjFnaGhxMi45MzdlOC4xYmhtejYudWJkNGkuMTlpNnFqLjFiaHJ6aC43dW9zYi4xa2thdTkuZ2txbHp1LjFqMzJjMi4xYmhtejcuMWF1ZmZoIiwic2IiOm51bGwsInN0Ijp7InN0YXRlIjoiSUEiLCJzdG9yZV9pZCI6IjE3NzEiLCJ6aXAiOiI1MjQwNCJ9LCJ1IjoiaHR0cHM6Ly93d3cudGFyZ2V0LmNvbS9zP3NlYXJjaFRlcm09YmFraW5nK3NoZWV0In0"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `queries` | string | `baking sheet` |  |
| `search_query` | string | `baking sheet` |  |
| `source_url` | string | `https://www.target.com/s?searchTerm=baking+sheet` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `29` |  |
| `total_results` | integer | `381` |  |
| `products` | array | `[1 item]` | The results. |
| `next_cursor` | string | `eyJpIjoiYmFraW5nIHNoZWV0IiwibGsiOnsiZmV0Y2hfc…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `products[].keyword` | string | `baking sheet` |  |
| `products[].tcin` | string | `1005061896` |  |
| `products[].product_title` | string | `Sur La Table Kitchen Essentials Bake Sale 3-P…` |  |
| `products[].brand` | string | `Sur La Table Kitchen Essentials` |  |
| `products[].current_price` | integer | `45` |  |
| `products[].regular_price` | integer | `45` |  |
| `products[].on_sale` | boolean | `false` |  |
| `products[].price_type` | string | `reg` |  |
| `products[].discount_amount` | integer | `0` |  |
| `products[].discount_percent` | integer | `0` |  |
| `products[].formatted_price` | string | `$45.00` |  |
| `products[].average_rating` | integer | `0` |  |
| `products[].review_count` | integer | `0` |  |
| `products[].url` | string | `https://www.target.com/p/sur-la-table-kitchen…` |  |
| `products[].image_url` | string | `https://target.scene7.com/is/image/Target/GUE…` |  |
| `products[].images` | array | `[7 items]` |  |
| `products[].available_online` | boolean | `true` |  |
| `products[].currency` | string | `USD` |  |
| `products[].is_sponsored` | boolean | `true` |  |
| `products[].relationship_type` | string | `Stand Alone` |  |
| `products[].parent_tcin` | string | `1005061896` |  |
| `products[].dpci` | null | `null` |  |
| `products[].is_marketplace` | boolean | `true` |  |
| `products[].sold_by` | string | `Gibson Homewares` |  |
| `products[].item_type` | string | `Bakeware Sets` |  |
| `products[].category_id` | string | `4rqx4` |  |
| `products[].badges` | array | `[]` |  |
| `products[].position` | integer | `1` |  |
| `products[].page` | integer | `1` |  |
| `products[].search_query` | string | `baking sheet` |  |
| `products[].source_url` | string | `https://www.target.com/s?searchTerm=baking+sheet` |  |
| `products[].total_results` | integer | `381` |  |
| `products[].next_page` | string | `https://www.target.com/s?searchTerm=baking+sh…` |  |
| `products[].description` | null | `null` |  |
| `products[].highlights` | null | `null` |  |
| `products[].specifications` | object | `{…}` |  |
| `products[].weight` | null | `null` |  |
| `products[].dimensions` | null | `null` |  |
| `products[].package_dimensions` | null | `null` |  |
| `products[].country_of_origin` | null | `null` |  |
| `products[].upc` | null | `null` |  |
| `products[].category_path` | null | `null` |  |
| `products[].shipping` | null | `null` |  |
| `products[].variation_attributes` | null | `null` |  |
| `products[].variants` | null | `null` |  |
| `products[].rating_distribution` | null | `null` |  |
| `products[].recommended_percentage` | null | `null` |  |
| `products[].return_policy` | null | `null` |  |
| `products[].scraped_at` | string | `2026-09-26T11:03:33.092Z` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/target-search-products/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {"queries": "baking sheet"}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("products") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Locked into the cursor: `sort_by`, `zip_code`, `fetch_product_details`, `include_sponsored`. Set them on the first call; later pages reuse them.

## Related

- [Target Category](https://docs.scrapier.io/api-reference/target/target-category.md): Structured Target data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [Target Reviews](https://docs.scrapier.io/api-reference/target/target-reviews.md): Structured Target data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [Target Single Product Info](https://docs.scrapier.io/api-reference/target/target-single-product-info.md): Structured Target data: send `urls`. Single lookup, 1 credit per successful call.
- [Target Stores](https://docs.scrapier.io/api-reference/target/target-stores.md): Structured Target data: send `queries`. Cursor-paginated, 1 credit per successful call.
