Target API endpoint
Returns every dynamic filter group and option for either a product query or category. Provide exactly one of q or category_id. Pass currently selected option ids through filter_ids to obtain the remaining context-aware options.
/target/filter-optionsProvide exactly one of q (a 2-200 character product query) or category_id (from /target/categories). store_id defaults to 2885; look up real store IDs near a location with /target/stores. filter_ids optionally accepts up to 40 comma-separated currently selected option IDs.
The response returns every dynamic filter group and option for the current result set, including departments, deals and discounts, price, size, brand, guest rating, fulfillment and shipping methods, and include-out-of-stock when Target offers them. The list is context-aware, so groups vary by query, category, store, and prior selections.
| Field | Filled in, of 9 checked | Values in the sample |
|---|---|---|
| id | 9 | |
| display_name | 9 | |
| type | 9 | checkbox (6), url (1), price (1) and 1 more |
| expanded | 9 | true in 5 of 9 |
| options | 9 | median 10 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | No | Product search query; mutually exclusive with category_id | coffee | |
| category_id | string | No | Target category id; mutually exclusive with q | 5q0ga | |
| store_id | integer | No | Target store id used for pricing Minimum: 1. | ||
| filter_ids | string | No | Comma-separated selected Target filter option ids | 5tdv1,fwtfr | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/target/filter-options?q=coffee" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"category_id": "5q0ga",
"store_id": 2885,
"total": 4158,
"count": 2,
"applied_filter_ids": [],
"filter_groups": [
{
"id": "d_deals",
"display_name": "Deals",
"type": "checkbox",
"options": [
{
"id": "5tdv1",
"display_name": "Clearance"
}
]
},
{
"id": "d_channel",
"display_name": "Shipping & Pickup",
"type": "checkbox",
"options": [
{
"id": "fwtfr",
"display_name": "Include out of stock"
}
]
}
]
}
}Request schema
No body schema
Response schema
#/definitions/target.filterOptionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | target.FilterOptionsResponse | No | ||||
| data.applied_filter_ids | array | No | Ids of the filter options currently applied. | |||
| data.category_id | string | No | 5q0ga | Target category id the filters are for. Omitted when filters were requested by search query. | ||
| data.count | integer | No | 7 | Number of filter groups returned. | ||
| data.fetched_at | string | No | Time the data was fetched, in UTC (RFC 3339). | |||
| data.filter_groups | array | No | Filter groups and their options for the current result set. | |||
| data.filter_groups[].display_name | string | No | Deals | Name of the filter group as Target shows it, such as `Deals`. | ||
| data.filter_groups[].expanded | boolean | No | Whether Target shows the group expanded. | |||
| data.filter_groups[].id | string | No | d_deals | Target filter group id, such as `d_deals`. | ||
| data.filter_groups[].options | array | No | Filter options in the group. | |||
| data.filter_groups[].options[].display_name | string | No | Clearance | Label of the option as Target shows it, such as `Clearance`. | ||
| data.filter_groups[].options[].id | string | No | 5tdv1 | Target filter option id, such as `5tdv1`. | ||
| data.filter_groups[].options[].selected | boolean | No | Whether the option is currently applied. | |||
| data.filter_groups[].options[].url | string | No | d_deals:clearance | Filter reference for the option, such as `d_deals:clearance`. | ||
| data.filter_groups[].options[].value | string | No | clearance | Value of the option, such as `clearance`. | ||
| data.filter_groups[].type | string | No | checkbox | Kind of control Target uses for the group, such as `checkbox`. | ||
| data.query | string | No | coffee | Search query the filters are for. Omitted when filters were requested by category. | ||
| data.source_url | string | No | URL the data was read from. | |||
| data.store_id | integer | No | 2885 | Target store id the results are for. | ||
| data.total | integer | No | 4158 | Number of products in the current result set. | ||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/target/filter-options?q=coffee" \
-H "x-api-key: $CRAWLORA_API_KEY"