# Uniqlo Search API Documentation

<p><strong>Uniqlo Search API</strong> returns 36 products per page for a keyword: product id, name, gender, price with a sale flag, rating, colours with swatch and image, sizes, labels and the product url. Narrow to a <code>category</code> (get the id or <code>category_path</code> from the <code>categories</code> of the product route). Filter by <code>colorCodes</code>, <code>sizeCodes</code>, <code>flagCodes</code> (for example <code>discount</code>) and one <code>priceRanges</code> value. Sort by price or rating.</p><p>Use the <code>product_id</code> of an item in the product route. <code>price.on_sale</code> is true for items Uniqlo flags as a sale. Uniqlo sends the sale price as the current price and usually no original price, so <code>original_price</code>, <code>sale_price</code> and <code>discount_percent</code> are filled only when Uniqlo sends a higher original price (use the product route for the regular price of an item in a sale price group). An item can sit in more than one price group (00 regular, 01 sale): send its <code>price_group</code> to the product route. A filter that matches nothing and a page past the last page return 422, never an empty answer. Regions: us and jp. A successful request costs 1 credit.</p>

- **Documentation:** [https://scrappa.co/docs/uniqlo-api/uniqlo_search](https://scrappa.co/docs/uniqlo-api/uniqlo_search)
- **API group:** Uniqlo API
- **Endpoint:** `GET https://scrappa.co/api/uniqlo/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search keyword. |
| `region` | string | No | Region: us (default) or jp. |
| `page` | integer | No | One-based page number, 1 to 100 (default 1). 36 products per page. |
| `colorCodes` | string | No | Colour codes like COL09, separated by commas. Products with any of them match. |
| `sizeCodes` | string | No | Size codes like SMA003, separated by commas. Products with any of them match. |
| `flagCodes` | string | No | Flag codes like discount (sale), separated by commas. |
| `priceRanges` | string | No | One price range in the major currency unit of the region, inclusive, like 0-30 (US dollars) or 3000-5000 (Japanese yen). Items outside the range are never returned. |
| `category` | string | No | Optional category: one category id, or the category_path from the categories of the product route, for example 22210,23296,23339 (Women, Bottoms, Jeans). A path is gender, class, category and subcategory ids. An unknown category returns 422. |
| `sort` | string | No | RELEVANCE (default), PRICE_LOW_TO_HIGH, PRICE_HIGH_TO_LOW or RATING. |

## Example response

```json
{
    "data": {
        "page": 1,
        "sort": "RELEVANCE",
        "items": [
            {
                "url": "https://www.uniqlo.com/us/en/products/E479000-000/00",
                "name": "Barrel Jeans",
                "tags": [
                    "UNISEX"
                ],
                "price": {
                    "amount": 39.9,
                    "on_sale": false,
                    "currency": "USD",
                    "sale_price": null,
                    "original_price": null,
                    "discount_percent": null
                },
                "sizes": [
                    {
                        "code": "INS022",
                        "name": "22inch"
                    },
                    {
                        "code": "INS023",
                        "name": "23inch"
                    },
                    {
                        "code": "INS024",
                        "name": "24inch"
                    }
                ],
                "colors": [
                    {
                        "code": "COL04",
                        "name": "GRAY",
                        "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/479000/item/usgoods_04_479000_3x4.jpg",
                        "swatch_url": "https://image.uniqlo.com/UQ/ST3/WesternCommon/imagesgoods/479000/chip/goods_04_479000_chip.jpg",
                        "color_group": "GRAY",
                        "display_code": "04"
                    },
                    {
                        "code": "COL08",
                        "name": "DARK GRAY",
                        "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/479000/item/usgoods_08_479000_3x4.jpg",
                        "swatch_url": "https://image.uniqlo.com/UQ/ST3/WesternCommon/imagesgoods/479000/chip/goods_08_479000_chip.jpg",
                        "color_group": "GRAY",
                        "display_code": "08"
                    }
                ],
                "gender": "unisex",
                "labels": [
                    "Limited-Time Offer until 11/4"
                ],
                "rating": {
                    "count": 591,
                    "average": 4.7
                },
                "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/479000/item/usgoods_04_479000_3x4.jpg",
                "product_id": "E479000-000",
                "price_group": "00",
                "store_stock_only": false
            },
            {
                "url": "https://www.uniqlo.com/us/en/products/E487206-000/00",
                "name": "Straight Jeans",
                "tags": [],
                "price": {
                    "amount": 49.9,
                    "on_sale": false,
                    "currency": "USD",
                    "sale_price": null,
                    "original_price": null,
                    "discount_percent": null
                },
                "sizes": [
                    {
                        "code": "INS027",
                        "name": "27inch"
                    },
                    {
                        "code": "INS028",
                        "name": "28inch"
                    },
                    {
                        "code": "INS029",
                        "name": "29inch"
                    }
                ],
                "colors": [
                    {
                        "code": "COL67",
                        "name": "BLUE",
                        "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/487206/item/usgoods_67_487206_3x4.jpg",
                        "swatch_url": "https://image.uniqlo.com/UQ/ST3/WesternCommon/imagesgoods/487206/chip/goods_67_487206_chip.jpg",
                        "color_group": "BLUE",
                        "display_code": "67"
                    },
                    {
                        "code": "COL07",
                        "name": "GRAY",
                        "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/487206/item/usgoods_07_487206_3x4.jpg",
                        "swatch_url": "https://image.uniqlo.com/UQ/ST3/WesternCommon/imagesgoods/487206/chip/goods_07_487206_chip.jpg",
                        "color_group": "GRAY",
                        "display_code": "07"
                    }
                ],
                "gender": "men",
                "labels": [
                    "Limited-Time Offer until 11/4"
                ],
                "rating": {
                    "count": 24,
                    "average": 4.7
                },
                "image_url": "https://image.uniqlo.com/UQ/ST3/us/imagesgoods/487206/item/usgoods_67_487206_3x4.jpg",
                "product_id": "E487206-000",
                "price_group": "00",
                "store_stock_only": false
            }
        ],
        "query": "jeans",
        "total": 72,
        "region": "us",
        "filters": null,
        "category": null,
        "page_size": 36,
        "total_pages": 2
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The search does not exist. This response is not billable. |
| 422 | Validation Error | A parameter is missing or invalid, or the filter, page or place matches nothing. This response is not billable. |
| 503 | Upstream Unavailable | Uniqlo could not be reached, or it returned data that does not match the request. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
