# Levi's Scraper (`datascrapers/levi-scraper`) Actor

Scrapes Levi's product listings from search queries or category URLs, with optional product details and reviews.

- **URL**: https://apify.com/datascrapers/levi-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper** creates a structured dataset of apparel products collected from Levi's. Each dataset item is one product and can include the product code, title, current and regular price, currency, review score, review count, and product URL. Query the source with search terms, category or product URLs, or product codes, choose a locale such as `DE/de_DE`, optionally add sizes and reviews, limit results with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![Levi's Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/levi-scraper/levi-scraper-value-demo.gif)](https://apify.com/datascrapers/levi-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | levi.com |
| Record unit | One product |
| Input methods | `searchQueries`, `startUrls`, `productIds`, `locale` |
| Main identifiers | `productCode`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, and other Apify dataset exports |
| Update model | Fresh records per Actor run |
| Pricing | $1.50 per 1,000 products on the Free plan |

### Coverage and available records

Search terms use the market in `locale`. Start URLs can be Levi's category, search, or product pages. `productIds` accepts Levi's product codes. `includeProductDetails` adds description, stock, and sizes when the product page is fetched. `includeReviews` adds reviews, up to `maxReviewsPerProduct`. `detailConcurrency` sets how many detail requests run at once. `maxItems` caps products.

Each saved row is one `productCode`. The Actor does not collect account wish lists or checkout data.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| productCode | string | No | Levi's product code used for deduplication | A93110000 |
| title | string | No | Product name | High-Rise Baggy Shorts |
| url | string | No | Product URL | https://www.levi.com/DE/de_DE/c/p/A93110000 |
| currentPrice | number | Yes | Current price | 52.5 |
| regularPrice | number | Yes | Price before discount | 69.95 |
| currency | string | Yes | Currency | EUR |
| reviewScore | number | Yes | Average review score | 4.5039 |
| reviewCount | integer | Yes | Review count | 381 |
| sourceQuery | string | Yes | Search that found the product | shorts |
| details | object | Yes | Description, stock, and sizes when details are on | {"stockStatus": "IN_STOCK"} |
| reviews | array | Yes | Review objects when reviews are on | \[] |

### Example dataset record

```json
{
  "title": "High-Rise Baggy Shorts",
  "productCode": "A93110000",
  "url": "https://www.levi.com/DE/de_DE/c/p/A93110000",
  "currency": "EUR",
  "currentPrice": 52.5,
  "regularPrice": 69.95,
  "reviewScore": 4.5039,
  "reviewCount": 381,
  "sourceQuery": "shorts"
}
```

### Query and input reference

| Field | Required | Description |
|---|---|---|
| searchQueries | No | Search terms, such as `shorts` |
| startUrls | No | Levi's category, search, or product URLs |
| productIds | No | Levi's product codes |
| locale | No | Market for searches and codes, such as `DE/de_DE` |
| includeProductDetails | No | Fetch stock and sizes and charge `product-details` |
| includeReviews | No | Fetch reviews and charge `product-reviews` |
| maxReviewsPerProduct | No | Review cap per product |
| detailConcurrency | No | Parallel detail requests |
| maxItems | No | Maximum products |
| proxyConfiguration | No | Apify proxy settings |

Provide a search term, a URL, or a product code.

### Retrieve the data through the API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/levi-scraper").call(run_input={
    "searchQueries": ["shorts"],
    "locale": "DE/de_DE",
    "includeProductDetails": True,
    "maxItems": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["currentPrice"], item["productCode"])
```

### Data quality and record handling

Deduplicate on `productCode`. `url` is a second key. `details` and `reviews` are present only after those options succeed. A failed detail or review request is not charged. Each run writes a new dataset.

### Pricing and cost examples

Pay per event. Prices are per 1,000 events. Platinum and Diamond use the Gold rate. Platform usage is not billed separately.

| Event | Free | Bronze | Silver | Gold |
|---|---:|---:|---:|---:|
| product | $1.50 | $1.40 | $1.30 | $1.20 |
| product-details | $1.50 | $1.40 | $1.30 | $1.20 |
| product-reviews | $1.50 | $1.40 | $1.30 | $1.20 |

A Free-plan run that saves 1,000 products costs $1.50. Details and reviews are charged only when those options return data. One thousand saved reviews cost $1.50.

### Limitations and responsible data use

Search uses `locale`. Prices and stock change with the live catalog. Collect public product fields only, and keep `maxItems` and `maxReviewsPerProduct` small on the first run.

### Dataset questions

#### What is one dataset item?

One Levi's product, identified by `productCode`.

#### When are reviews charged?

Once per review saved, and only when `includeReviews` is on.

#### Which field should I use to merge runs?

`productCode` or `url`.

### Related datasets from Data Scrapers

- [H\&M Scraper](https://apify.com/datascrapers/h-and-m-scraper) for apparel
- [Calvin Klein Scraper](https://apify.com/datascrapers/calvinklein-scraper) for apparel
- [MediaMarkt Scraper](https://apify.com/datascrapers/mediamarkt-de-scraper) for retail products

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com.

# Actor input Schema

## `searchQueries` (type: `array`):

Product search terms, for example shorts or 501 jeans. Uses the Locale field. You can combine these with start URLs.

## `startUrls` (type: `array`):

Levi's category, search, or product URLs, for example https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/c/levi_clothing_men_jeans, https://www.levi.com/DE/de_DE/search/shorts, or https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/gerader-schnitt/levis-501-original-jeans/p/005013649.

## `productIds` (type: `array`):

Levi's PC9 product codes, for example 005013649. Uses the Locale field.

## `locale` (type: `string`):

Storefront locale for search queries and product IDs, such as DE/de_DE, US/en_US, or FR/fr_FR. Category, search, and product URLs use the locale in the URL path instead.

## `includeProductDetails` (type: `boolean`):

Fetch description, features, sizes, and stock for each product. Charged as a product-details event in addition to the product event. Requests run in parallel with a fresh proxy per request.

## `includeReviews` (type: `boolean`):

Fetch individual product reviews and store them as a list on each product record. Charged as product-reviews events (one per review). Disabled by default.

## `maxReviewsPerProduct` (type: `integer`):

Maximum reviews to fetch per product when Include Reviews is enabled. Use 0 for all reviews.

## `detailConcurrency` (type: `integer`):

How many products to enrich at once when product details or reviews are enabled. Each request uses a new proxy.

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

Maximum number of products to scrape. Use 0 for no limit.

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

Proxy settings. Residential proxies are recommended. When product details or reviews are enabled, each request uses a new proxy.

## Actor input object example

```json
{
  "searchQueries": [
    "shorts"
  ],
  "startUrls": [
    {
      "url": "https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/c/levi_clothing_men_jeans"
    }
  ],
  "locale": "DE/de_DE",
  "includeProductDetails": false,
  "includeReviews": false,
  "maxReviewsPerProduct": 10,
  "detailConcurrency": 10,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Scraped Levi's products, details, and reviews

## `runStats` (type: `string`):

Aggregate scrape statistics for this run

# 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 = {
    "searchQueries": [
        "shorts"
    ],
    "startUrls": [
        {
            "url": "https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/c/levi_clothing_men_jeans"
        }
    ],
    "locale": "DE/de_DE",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/levi-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 = {
    "searchQueries": ["shorts"],
    "startUrls": [{ "url": "https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/c/levi_clothing_men_jeans" }],
    "locale": "DE/de_DE",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/levi-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 '{
  "searchQueries": [
    "shorts"
  ],
  "startUrls": [
    {
      "url": "https://www.levi.com/DE/de_DE/bekleidung/ikonischer-style-langlebig/jeans/c/levi_clothing_men_jeans"
    }
  ],
  "locale": "DE/de_DE",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/levi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascrapers/levi-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/wDYRYjRxYTYjh5fUX/builds/xaC9wevuc9VralJHy/openapi.json
