# Target Search API

> Search Target products by keyword with TCIN, brand, price, sale price, rating, reviews and pickup, delivery and shipping availability.

Source: https://www.sandbase.ai/apis/target/search
API reference: https://www.sandbase.ai/apis/target/search/docs

## Facts

- Provider: Target
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/target/search`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, target, ecommerce, product data
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/target/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `q` | string \| number \| boolean | yes |  |
| `page` | string \| number \| boolean | no |  |
| `sort` | any | no |  |
| `facet` | string \| number \| boolean | no |  |
| `spelling` | any | no |  |
| `store_id` | string \| number \| boolean | no |  |
| `max_price` | string \| number \| boolean | no |  |
| `min_price` | string \| number \| boolean | no |  |
| `category_id` | string \| number \| boolean | no |  |
| `delivery_zip` | string \| number \| boolean | no |  |
| `include_filters` | any | no |  |
| `json_restrictor` | string \| number \| boolean | no |  |

## FAQ

### How do I use the Target Search API?

Send a POST request to https://api.sandbase.ai/v1/api/target/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Target Search API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Target Search API accept?

Required: q (string | number | boolean). Optional: page (string | number | boolean), sort (any), facet (string | number | boolean), spelling (any), store_id (string | number | boolean) and max_price (string | number | boolean) and 5 more. The Parameters table and the Playground on this page list every field.

### What does the Target Search API return?

A JSON result. This endpoint runs asynchronously, so the response tells you how to fetch the finished result.

### Do I need a Target developer account or API key?

No. Target Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Target API access separately.

## README

### Target Search

Search Target products by keyword with TCIN, brand, price, sale price, rating, reviews and pickup, delivery and shipping availability.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "target/search", "q": "wireless earbuds"}'
```

This API runs asynchronously. `/v1/run` returns a task `id` with status `pending`; poll `GET https://api.sandbase.ai/v1/run/{id}` until `status` is `completed` and read the result from `outputs[0].data`.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `q` | string/number/boolean | Yes | The query you want to search. You can use anything that you would use in a regular Target search (e.g., `coffee`, `65 inch tv`, or `lego star wars`). |
| `category_id` | string/number/boolean | No | The category to search in (e.g., `hz89j` for Kitchen & Dining). Category IDs are available in the `Category` filter of the results when `include_filters` is set to `true`. |
| `delivery_zip` | string/number/boolean | No | The US ZIP code to deliver to (e.g., `10001`). It's used for the shipping dates and the same day delivery availability. It defaults to the location of the store. |
| `facet` | string/number/boolean | No | The filters to apply, like Target's filters (e.g., deals, brands, sizes, colors, or guest ratings). It's a comma-separated list of filter IDs (e.g., `5tdv0,4yagy` for Sale and Dark Roast). Filter IDs … |
| `include_filters` | any | No | Whether to include the `filters` of the search in the JSON response, with the IDs to use in `facet` and `category_id`. It can be set to `true` or `false` (default). |
| `json_restrictor` | string/number/boolean | No | The fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
| `max_price` | string/number/boolean | No | The maximum price of the products, in US dollars (e.g., `50`). |
| `min_price` | string/number/boolean | No | The minimum price of the products, in US dollars (e.g., `10`). |
| `page` | string/number/boolean | No | Value is used to get results on a specific page. (e.g., `1` (default) is the first page of results, `2` is the 2nd page of results, `3` is the 3rd page of results, etc.). Target returns up to 24 resul… |
| `sort` | any | No | The sorting of the results. It defaults to `relevance`. Available options: `relevance` - Relevance `featured` - Featured `price_low` - Price: low to high `price_high` - Price: high to low `rating_high… |
| `spelling` | any | No | Whether to fix the spelling of misspelled queries, like Target. It can be set to `true` (default) to search for the spelling fix (e.g., `coffee` for `cofee`), as shown in `search_information.spelling_… |
| `store_id` | string/number/boolean | No | The Target store to get prices and availability for, like the store selected on Target (e.g., `1375` for Mpls Nicollet Mall, MN). The store ID is the number at the end of the store's page URL on Targe… |

#### Pricing

Flat price per call. Failed calls are not charged.
