# Levi's Product Scraper - Prices, Sizes & Stock (`axlymxp/levis-product-scraper`) Actor

Scrape Levi's products — price, discount, colourways, images and per-size stock levels — from a keyword search, any category, the full sitemap, or your own URL list. Covers 24 country storefronts in local currency. Clean JSON for price monitoring and assortment tracking. Pay only for results.

- **URL**: https://apify.com/axlymxp/levis-product-scraper.md
- **Developed by:** [axly](https://apify.com/axlymxp) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 dataset items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Levi's Product Scraper — Prices, Sizes & Stock

Turn [levi.com](https://www.levi.com) into a clean product dataset. Every row carries
the full picture of a Levi's colourway: **current price, regular price and discount,
per-size stock levels, colourway swatches, images, fit/wash/material attributes,
ratings and GTIN barcodes** — across **24 country storefronts** in local currency.

Point it at a keyword, a whole category, the entire market sitemap, or your own list
of product URLs. No account, no API key, and no proxy required.

> **Per-size stock is included in every row at no extra cost.** Most fashion scrapers
> bill size/stock data as a separate premium event — here it is part of the standard
> result.

***

### Who uses this

| You are… | You use it to… |
| --- | --- |
| **Retail / e-commerce analyst** | Track Levi's assortment, RRP vs. sale price and discount depth by market. |
| **Price-monitoring or repricing SaaS** | Feed a daily per-SKU price and stock signal into your platform. |
| **Reseller / sourcing buyer** | Spot clearance colourways and find which sizes are still in stock. |
| **Brand & competitive intelligence** | Compare Levi's pricing between the US, UK, Germany and 21 more storefronts. |
| **Researcher / data journalist** | Build reproducible fashion pricing and assortment datasets. |

***

### What you get — output fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Levi's PC9 product/colourway code, e.g. `005010193`. |
| `name` | string | Product name, localized to the market. |
| `product_url` | string | Absolute product page URL. |
| `color_name` | string | Colourway, e.g. `Medium Stonewash - Medium Wash`. |
| `price` | number | Current selling price. |
| `regular_price` | number | Regular (pre-discount) price. |
| `discount_percent` | number | Percentage off, or `null` when not on sale. |
| `on_sale` | boolean | Whether the product is currently discounted. |
| `currency` | string | ISO currency of the market (`USD`, `GBP`, `EUR`…). |
| `price_formatted` | string | Localized price string, e.g. `$74.99`, `119,95 €`. |
| **`sizes`** | array | **Per-size rows: size label, PC13 code, UPC, `stock_level` (integer), `in_stock`, price.** |
| `sizes_in_stock` / `sizes_total` | integer | How many sizes are available out of how many offered. |
| `total_stock` | integer | Units in stock summed across every size. |
| `in_stock` | boolean | True when at least one size is available. |
| `swatches` | array | Sibling colourways of the same style (code, colour, swatch image, URL). |
| `images` / `primary_image` | array / string | Full-resolution product imagery. |
| `breadcrumbs` / `category_path` | array / string | Category trail, e.g. `Clothing > Men > Jeans > Straight`. |
| `attributes` | object | Every published attribute as a name/value map. |
| `fit`, `wash`, `material`, `leg_opening`, `closure`, `stretch`, `rise` | string | Attributes promoted to their own columns. |
| `average_rating` / `review_count` | number / integer | Customer rating and number of ratings. |
| `merchant_badge` / `promotional_badge` | string | e.g. `Best Seller`, `11% off Price as Marked`. |
| `gtin` | string | GTIN-12/13 barcode — join key for your own catalogue. |
| `meta_title` / `meta_description` | string | SEO metadata from the product page. |
| `department`, `item_type`, `gender`, `inseam`, `size_guide` | string | Merchandising detail. |
| `pre_order`, `back_order`, `coming_soon`, `returnable`, `customizable` | boolean | Availability flags. |
| `last_modified` | string | Sitemap `lastmod` date (sitemap mode) — great for change detection. |
| `country` / `locale` | string | Which storefront the row came from. |
| `scraped_at` | string | UTC ISO-8601 timestamp. |

Full field documentation lives in the Actor's **dataset schema**.

***

### High-value use cases

**1. Daily price & stock monitoring.** Run in `sitemap` mode with `changedSince` set to
yesterday. Levi's publishes a `lastmod` date per product, so you only re-scrape what
actually changed — keeping large catalogues cheap to track.

**2. Discount and markdown intelligence.** `regular_price`, `price` and
`discount_percent` come straight from the storefront, so you can measure markdown depth
by category, fit or market and time your own promotions against it.

**3. Size-level availability and sell-through.** `sizes[].stock_level` exposes the unit
count per size. Watch it over time to infer sell-through, spot size curves that sell out
first, and find restocks the moment they land.

**4. Cross-market price arbitrage.** The same style is priced independently per country.
Run the same category across `US`, `GB`, `DE` and `JP` and compare local prices.

**5. Catalogue enrichment.** `gtin` gives you a barcode to join Levi's data onto your own
PIM, marketplace listings or resale inventory.

***

### Input parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | enum | `search` | `search`, `category`, `sitemap`, or `urls`. |
| `searchQuery` | string | `501 jeans` | Keyword, used in `search` mode. |
| `categoryId` | string | — | Category code for `category` mode, e.g. `levi_clothing_men_jeans`. |
| `productUrls` | array | — | Product URLs or bare codes for `urls` mode. |
| `changedSince` | string | — | `YYYY-MM-DD`; in `sitemap` mode, skip products unchanged since this date. |
| `country` | enum | `US` | Storefront: US, CA, GB, IE, DE, AT, CH, FR, BE, NL, ES, IT, PT, PL, CZ, SE, DK, FI, NO, AU, NZ, JP, IN, MX. |
| `maxItems` | integer | `100` | Stop after this many product rows. |
| `fetchDetails` | boolean | `true` | Fetch the product page for per-size stock and attributes. Off = faster, listing fields only. |
| `includeSwatches` | boolean | `false` | Also return sibling colourways of each style. |
| `sortBy` | enum | `relevance` | `relevance`, `price`, `latest-arrival`, `best-seller`. |
| `sortOrder` | enum | `descending` | `ascending` or `descending`. |
| `minRequestInterval` | number | `1.0` | Politeness delay in seconds between requests. |
| `proxyConfiguration` | object | disabled | Optional — the scraper works without a proxy. |

#### Finding a `categoryId`

Open any Levi's category page and take the last URL segment:

```
https://www.levi.com/US/en_US/clothing/men/jeans/c/levi_clothing_men_jeans
                                                    └──────────────────────┘
                                                    categoryId
```

***

### Example

**Input — every men's jeans product in the UK store, with colourways:**

```json
{
    "mode": "category",
    "categoryId": "levi_clothing_men_jeans",
    "country": "GB",
    "maxItems": 500,
    "fetchDetails": true,
    "includeSwatches": true
}
```

**Output (one row, abridged):**

```json
{
    "code": "005010193",
    "name": "501® Original Men's Jeans",
    "product_url": "https://www.levi.com/US/en_US/clothing/men/jeans/straight/501-original-mens-jeans/p/005010193",
    "color_name": "Medium Stonewash - Medium Wash",
    "price": 74.99,
    "regular_price": 84.95,
    "discount_percent": 11.72,
    "on_sale": true,
    "currency": "USD",
    "in_stock": true,
    "total_stock": 14225,
    "sizes_in_stock": 37,
    "sizes_total": 40,
    "sizes": [
        {
            "code": "00501019302830",
            "size": "28W X 30L",
            "upc": "00039307480499",
            "stock_level": 245,
            "in_stock": true,
            "price": 74.99
        }
    ],
    "average_rating": 4.2424,
    "review_count": 11546,
    "category_path": "Clothing > Men > Jeans > Straight",
    "fit": "Original, Straight",
    "wash": "Medium Wash",
    "material": "Denim",
    "gtin": "00886878787539",
    "merchant_badge": "Best Seller",
    "promotional_badge": "11% off Price as Marked",
    "primary_image": "https://lscoglobal.scene7.com/is/image/lscoglobal/MB_00501-0193_GLO_CM_DA?$qv_desktop_full$",
    "country": "US",
    "scraped_at": "2026-09-16T02:31:44Z"
}
```

***

### Scheduling, webhooks & integrations

- **Schedule** a daily or hourly run from the Apify Console — pair `mode: "sitemap"`
  with `changedSince` for efficient incremental monitoring.
- **Webhooks** can fire on `ACTOR.RUN.SUCCEEDED` to push fresh data straight into your
  own service.
- **Export** to JSON, CSV, Excel, XML or RSS, or pull from the
  [Dataset API](https://docs.apify.com/api/v2#/reference/datasets).
- **Connect** to Google Sheets, Airtable, Make, Zapier, Slack, AWS S3 and more through
  Apify integrations.

***

### Use it from an AI assistant (MCP)

This Actor is callable over the [Apify MCP server](https://mcp.apify.com), so agents in
Claude, VS Code, Cursor or any MCP client can run it as a tool:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/sse?actors=axlymxp/levis-product-scraper",
            "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
        }
    }
}
```

Then simply ask: *"Get me every discounted Levi's men's jean in the UK store with at
least 3 sizes in stock."*

***

### FAQ

**How many products can I scrape in one run?**
There is no hard cap — set `maxItems` to whatever you need. `sitemap` mode reaches the
full market catalogue; large runs checkpoint automatically and resume where they left
off if interrupted.

**How fresh is the data?**
It is read live from Levi's storefront at run time, so prices and stock reflect what a
shopper sees at that moment.

**Does search cover non-US catalogues?**
Levi's runs a single US-wide search index, so `search` mode discovers products from the
US catalogue — though price and stock are still localized to your chosen market during
detail enrichment. For a true per-market catalogue, use `category` or `sitemap` mode,
both of which are fully market-specific.

**Why do some products return no row in a non-US market?**
Product codes differ per storefront. When a code is not carried by the market you
selected, the Actor logs it and skips it rather than emitting an empty row.

**Do I need proxies?**
No. The scraper works without proxies by default. You can enable Apify Proxy for very
large runs or if your region is restricted.

**Is a size list always returned?**
Yes, whenever `fetchDetails` is on and the product publishes size variants. A few
catalogue entries (accessories, gift cards, marketing placeholders) have no size
breakdown; those return `sizes_total: null`.

**Is scraping this data legal?**
The Actor collects only publicly available product information — no personal data and no
login-protected content. You are responsible for ensuring your use complies with
applicable laws and the site's terms.

**Something broke — how fast are fixes?**
Runtime failures are reported to the maintainer automatically. Open an issue on the
Actor's Issues tab and it will be looked at promptly.

# Actor input Schema

## `mode` (type: `string`):

Search the catalogue, sweep a category, crawl the market sitemap (largest coverage), or scrape a specific list of product URLs.

## `searchQuery` (type: `string`):

Keyword to search for. Used when mode is 'search'. Note: Levi's search index is US-wide; prices and stock are still localized to your chosen market during detail enrichment.

## `categoryId` (type: `string`):

Used when mode is 'category'. This is the last segment of a Levi's category URL — for https://www.levi.com/US/en\_US/clothing/men/jeans/c/levi\_clothing\_men\_jeans use 'levi\_clothing\_men\_jeans'.

## `productUrls` (type: `array`):

Used when mode is 'urls'. Full product page URLs, or bare product codes such as 005010193.

## `changedSince` (type: `string`):

Used when mode is 'sitemap'. Skips products whose sitemap 'lastmod' is older than this date — ideal for cheap daily price and stock monitoring.

## `country` (type: `string`):

Which Levi's country storefront to scrape. Drives currency, local pricing, product names and the catalogue itself.

## `maxItems` (type: `integer`):

Stop after this many product rows. Each row is one billable result.

## `fetchDetails` (type: `boolean`):

Fetch each product's detail page to add per-size stock levels, fit/wash/material attributes, full image gallery and breadcrumbs. Turn off for a faster, lighter run that returns listing fields only.

## `includeSwatches` (type: `boolean`):

Add every other colour of the same style (code, colour name, swatch image, URL). Costs one extra request per product family.

## `sortBy` (type: `string`):

Result ordering for search and category modes.

## `sortOrder` (type: `string`):

Direction applied to 'Sort by'.

## `minRequestInterval` (type: `number`):

Politeness delay. Increase to 2-3 seconds if you see rate-limit warnings on very large runs.

## `proxyConfiguration` (type: `object`):

Leave disabled unless you have your own proxies. Levi's Akamai currently rejects Apify's shared datacenter and residential pools outright, so enabling them lowers the success rate. When a proxy is configured the scraper rotates sessions automatically after a block.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "501 jeans",
  "categoryId": "levi_clothing_men_jeans",
  "productUrls": [
    "https://www.levi.com/US/en_US/clothing/men/jeans/straight/501-original-mens-jeans/p/005010193"
  ],
  "changedSince": "2026-09-01",
  "country": "US",
  "maxItems": 100,
  "fetchDetails": true,
  "includeSwatches": false,
  "sortBy": "relevance",
  "sortOrder": "descending",
  "minRequestInterval": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every scraped Levi's product as a structured JSON row — price, discount, per-size stock levels, colourways, images and attributes.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "501 jeans",
    "categoryId": "levi_clothing_men_jeans",
    "productUrls": [
        "https://www.levi.com/US/en_US/clothing/men/jeans/straight/501-original-mens-jeans/p/005010193"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/levis-product-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "501 jeans",
    "categoryId": "levi_clothing_men_jeans",
    "productUrls": ["https://www.levi.com/US/en_US/clothing/men/jeans/straight/501-original-mens-jeans/p/005010193"],
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/levis-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "501 jeans",
  "categoryId": "levi_clothing_men_jeans",
  "productUrls": [
    "https://www.levi.com/US/en_US/clothing/men/jeans/straight/501-original-mens-jeans/p/005010193"
  ]
}' |
apify call axlymxp/levis-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axlymxp/levis-product-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/D7Sscfw75oFyNnTOz/builds/C24gABif4YkUlP2Fi/openapi.json
