> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ulta API

> Search Ulta and read its product pages as JSON: ranked products with prices, ratings, review counts and brands, and each product's price, stock, images, specs and options.

Search Ulta (ulta.com) and read its product pages through the async task API. Send `COMMERCE_SERP` with `site` `ulta` to get the products a search shows, in the store's order, or `COMMERCE_PRODUCT` with a product's `url` to read that product. A completed search or product page costs **0.5 credits**.

## Search

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_SERP", "payload": { "site": "ulta", "query": "moisturizer", "limit": 3 } }'
```

Submit the task, then poll `GET /v1/async/task/{id}` or receive its webhook. See [Async tasks](https://docs.querying.ai/concepts/async-tasks.md).

### Parameters

* `site`: Required. `ulta`.
* `query`: Required. The search query, 1-500 characters.
* `limit`: Optional integer from 1 to 40, default 20.
* `country`: Optional. Defaults to `US`, the store's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```json theme={"theme":"css-variables"}
{
  "site": "ulta",
  "query": "moisturizer",
  "country": "US",
  "returnedCount": 3,
  "products": [
    {
      "rank": 1,
      "productId": "pimprod2007113",
      "title": "Natural Moisturizing Factors + Hyaluronic Acid Daily Moisturizer",
      "url": "https://www.ulta.com/p/natural-moisturizing-factors-hyaluronic-acid-daily-moisturizer-pimprod2007113?sku=2551163",
      "price": 6.7,
      "currency": "USD",
      "rating": 4.2,
      "reviewCount": 2238,
      "brand": "The Ordinary",
      "imageUrl": "https://media.ultainc.com/i/ulta/2551163"
    },
    {
      "rank": 2,
      "productId": "pimprod2054921",
      "title": "Hydrating Milky Moisturizer",
      "url": "https://www.ulta.com/p/hydrating-milky-moisturizer-pimprod2054921?sku=2645477",
      "price": 16.99,
      "currency": "USD",
      "rating": 4.4,
      "reviewCount": 161,
      "brand": "BYOMA",
      "imageUrl": "https://media.ultainc.com/i/ulta/2645477"
    },
    {
      "rank": 3,
      "productId": "pimprod2023937",
      "title": "Lightweight Daily Moisturizer",
      "url": "https://www.ulta.com/p/lightweight-daily-moisturizer-pimprod2023937?sku=2582316",
      "price": 6,
      "currency": "USD",
      "rating": 4.4,
      "reviewCount": 1189,
      "brand": "Good Molecules",
      "imageUrl": "https://media.ultainc.com/i/ulta/2582316"
    }
  ]
}
```

### Result fields

* `site`, `query` and `country` echo the request. `returnedCount` is the number of entries in `products`.
* Each product includes `rank`, `productId`, `title` and `url`. `productId` is the store's own product ID. `rank` follows the store's default order, and listings the store marks as sponsored are left out.
* `price`, `rating`, `reviewCount`, `imageUrl` and `brand` appear when the results page shows them. `price` is a number in the product's `currency` (ISO 4217); when sizes are priced apart, it is the lowest one.
* `rating` uses a five-point scale. Abbreviated review counts such as 999+ are left out.
* Each search returns products from the store's first results page. Ulta sends some brand names to the brand page, and the products come from that page.

## Product page

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_PRODUCT", "payload": { "url": "https://www.ulta.com/p/natural-moisturizing-factors-hyaluronic-acid-daily-moisturizer-pimprod2007113?sku=2551163" } }'
```

### Parameters

* `url`: Required. A product page on Ulta, up to 2,048 characters: `ulta.com/p/{name}-{id}`. Product `url` values from a search work as they are. Parameters the result does not depend on, such as tracking codes, are dropped before the page is read.
* `country`: Optional. Defaults to `US`, the page's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```json theme={"theme":"css-variables"}
{
  "site": "ulta",
  "country": "US",
  "url": "https://www.ulta.com/p/natural-moisturizing-factors-hyaluronic-acid-daily-moisturizer-pimprod2007113?sku=2551163",
  "productId": "pimprod2007113",
  "title": "Natural Moisturizing Factors + Hyaluronic Acid Daily Moisturizer",
  "brand": "The Ordinary",
  "price": 12.5,
  "currency": "USD",
  "inStock": true,
  "rating": 4.2,
  "reviewCount": 2238,
  "images": [
    "https://media.ulta.com/i/ulta/2551163?w=500&h=500",
    "https://media.ulta.com/i/ulta/2551163_alt01?w=500&h=500"
  ],
  "description": "A lightweight, non-greasy daily moisturizer with hyaluronic acid and ceramides that provides immediate and all-day hydration. Suitable for sensitive skin. Awarded with the National Eczema Association…",
  "specs": [
    { "name": "Skin Concerns", "value": "Dryness, Oiliness, Anti-Aging" },
    { "name": "Face Form", "value": "Cream" },
    { "name": "Skin Type", "value": "Dry, Combination, Normal, Oily, Sensitive" }
  ],
  "options": [{ "name": "Size", "values": ["1.0 oz", "3.3 oz"] }],
  "categories": ["Skin Care", "Moisturizers", "Face Moisturizer"],
  "gtin": "769915193657"
}
```

### Result fields

* `site`, `country`, `url` and `productId` identify the page. `url` is the page that was read, and `productId` matches the one a search returns.
* `title` is always present. `brand`, `price`, `currency`, `inStock`, `rating`, `reviewCount`, `images`, `description`, `descriptionImages`, `specs`, `options`, `categories` and `gtin` appear when the page shows them.
* `price` is what a shopper pays as the page first shows it, before coupons and delivery, in `currency` (ISO 4217). `inStock` is the product's stock status.
* `rating` uses a five-point scale with two decimals. `reviewCount` is the number of reviews.
* `images` lists up to 30 photos from the product's gallery, in page order.
* `description` is plain text with one line per paragraph, up to 10,000 characters; text that appears only inside images is not included.
* `descriptionImages` lists up to 300 images from the product description, in page order. Banners and notices that sellers place in their description come along, and text inside the images is not read.
* `specs` lists up to 100 `{ name, value }` pairs from the product details. `options` lists up to 20 choices such as size or color, each with up to 100 `values`; the other fields describe the choice the page opens on. `categories` runs from the broadest category to the narrowest, up to 10 levels. `gtin` is the UPC, EAN or JAN the page lists.

## Errors and billing

* A search that returns no products ends as a failed task.
* A product page the store answers with 404 or 410, such as a removed product, ends the task with `PAGE_UNAVAILABLE`, and the message carries the store's answer. When the store refuses the read with 403, 412, 429 or 435, the task waits and asks again for up to 6 minutes. Other failed reads, and a refusal that lasts longer, end with `ENGINE_NO_RESULT`.
* Only completed tasks are charged: 0.5 credits for a search or a product page.

## Related

* [Amazon](https://docs.querying.ai/engines/amazon.md)
* [Walmart](https://docs.querying.ai/engines/walmart.md)
* [Target](https://docs.querying.ai/engines/target.md)
* [All Commerce stores](https://docs.querying.ai/engines/overview.md#commerce)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.