# Complete Guide: How to Pull Rozetka Product Listings Using Python

Rozetka is an online marketplace in Ukraine. A category page on its site lists products in pages of 60, with a price, a discount badge and a few lines of text for each. That layout suits a shopper, but it makes a price comparison across a category slow, and it is hard to keep a history of prices. This guide shows how to read those category pages into structured rows from Python. Each row keeps the price, the discount and the seller in separate columns, so a category becomes a table you can sort and compare. The same steps work for any category address on the Ukrainian site.

**Rozetka Scraper** (`reventadata/rozetka-scraper`) is the Apify Actor for this site. You paste one or more category addresses, and it returns one row per product. It reads the public category pages directly, so it needs no browser and no login.

## TL;DR

Install `apify-client`, set your Apify API token in the environment, and call the Actor with a `categoryUrls` list. Each row is a dictionary with the product title, prices in UAH and USD, the old price and discount, the brand, the seller, the rating and the stock status. The sample row in this guide comes from a run that the Actor's README records on 2026-11-07, and its values are copied without edits.

---

## Prerequisites and setup

You need:

1. Python 3.11 or newer with `pip`.
2. A free **Apify account**. You can sign up with an email address or a GitHub login.
3. Your **API token**, found in the Apify Console under the integrations settings.

Install the client. The code in this guide uses the 3.x line:

```bash
pip install -U "apify-client~=3.0"
```

Set the token in your shell so the script never contains it. A token written into a script is copied into every shared file that holds it, so keep it in the environment only:

```bash
export APIFY_API_TOKEN="your-token-here"
```

---

## Understanding Rozetka Scraper

The Actor takes four inputs and returns one dataset item per product. The category address is the only required input, and it must be a category page on the Ukrainian site.

| Input | What it does |
| --- | --- |
| `categoryUrls` | Required. Category pages in the form `https://rozetka.com.ua/ua/<name>/c<number>/`, optionally followed by one filter segment copied from the site. |
| `maxItems` | A cap on products across all categories. The default is 1000. |
| `maxPagesPerCategory` | A cap on pages per category, 60 products each. The default and maximum are 100. |
| `includeProductDetails` | Adds the brand name, the seller name, the rating, the stock status and all the photos. On by default. |

Search pages, query strings, comma-separated lists and sort segments are refused. The refusal happens when you enter an address the Actor does not accept, so check the form of each address before you start a long run. A product listed in two categories in the same run is returned once.

---

## Step-by-step walkthrough

### Step 1: Open the Actor

Open the [Rozetka Scraper page](https://apify.com/reventadata/rozetka-scraper) on Apify Store. Its input form matches the table above. A category address is easiest to find on the site: open the category and copy the address from the browser bar.

### Step 2: Choose the input

For a first test, keep the run small. The next block reads one filtered slice of the mobile phones category, returns ten products and reads one page.

```python
import os
from apify_client import ApifyClient

# 1. Initialise the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Describe the run: one phone category slice, ten products, one page
run_input = {
    "categoryUrls": ["https://rozetka.com.ua/ua/mobile-phones/c80003/price=1000-5000/"],
    "maxItems": 10,
    "maxPagesPerCategory": 1,
    "includeProductDetails": True,
}

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/rozetka-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
    status = run.status if run else "unknown"
    raise SystemExit(f"Run did not succeed (status: {status}).")

# 4. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} products.\n")

# 5. Print one line per product: title, price in UAH and USD, then seller
for item in items:
    print(f"{item.get('title')} | {item.get('price')} {item.get('currency')} | {item.get('priceUsd')} USD")
    print(f"  seller: {item.get('seller')}, rating: {item.get('rating')}, availability: {item.get('availability')}")
```

### Step 3: Run the Actor from Python

Save the block to a Python file in your project folder and run it:

```bash
python3 rozetka_search.py
```

The script waits for the run to end. If the status is not `SUCCEEDED`, it prints the status and stops, so a failed run never looks like an empty list.

### Step 4: Read one row

The sample below is one product from the 2026-11-07 run that the README records. Photos are shortened and the specification text is cut.

```json
{
    "id": "620419886",
    "url": "https://rozetka.com.ua/ua/apple-iphone-18-pro-max-256gb-burgundy/p620419886/",
    "title": "Мобільний телефон Apple iPhone 18 Pro Max 256GB Burgundy (MJXQ4AF/A)",
    "price": 84999,
    "oldPrice": null,
    "discountPercent": 0,
    "currency": "UAH",
    "priceUsd": 1888.87,
    "oldPriceUsd": null,
    "condition": "new",
    "brand": "Apple",
    "brandId": 69,
    "seller": "Rozetka",
    "sellerId": 5,
    "rating": 4.9,
    "reviewsCount": 56,
    "availability": "available",
    "availabilityText": null,
    "label": "ТОП ПРОДАЖІВ",
    "imageUrl": "https://content2.rozetka.com.ua/goods/images/original/684034536.jpg",
    "categoryId": 80003,
    "categoryName": "Мобільні телефони",
    "categoryUrl": "https://rozetka.com.ua/ua/mobile-phones/c80003/",
    "inputUrl": "https://rozetka.com.ua/ua/mobile-phones/c80003/"
}
```

---

## Working with the API

The Python client is one way in. The Apify API can start the same run with the same JSON input, and the results can be read from the dataset of the finished run. Use the client when your script is in Python, and the API when another tool, such as a spreadsheet macro or a workflow engine, starts the run.

Check the run's `status` before you read its dataset, as the script above does. A category with no products ends as `SUCCEEDED` with a status message and no rows, so a zero count is a result to report, not a failure to hide. A category address that does not exist ends the run as `FAILED` with a reason, and the reason tells you which address to fix.

Read the item count and the `inputUrl` of each row. When you paste several categories in one run, the `inputUrl` column shows which address a product came from. A product listed in two of your categories is returned once, so count products by `id` rather than by the number of category addresses you pasted.

---

## Advanced usage patterns

**Filter slices for big categories.** The site serves at most 100 pages per category address, which is 6,000 products. To read more of a category, copy a filter segment from the site, such as `price=1000-5000`, and run each slice as its own address.

**Discounts only.** Keep rows where `oldPrice` is not `null`, then sort by `discountPercent`. A `discountPercent` of 0 means the product has no old price to compare with.

**Currency-neutral sorting.** `price` is in UAH, and `priceUsd` is the same value in USD as a number. Sort by `priceUsd` when you want dollar figures.

**Details on or off.** Keep `includeProductDetails` on when brand, seller and rating matter to your analysis. Turn it off when you only need the listing fields, and accept that `brand`, `seller` and `rating` will be `null` for most rows.

**Repeat runs.** Store the `id` with the run date, and compare the `price` of one id across runs to see how a price moved. Because a product keeps its id, the same product can be followed from one week to the next even when its category changes its listing order.

**Keep rows, not pages.** The site pages its listing, so the unit you should store is the product row. Once rows are stored with their ids and run dates, you can rebuild any view without reading the site again.

---

## Understanding your data

| Field group | Fields | Notes |
| --- | --- | --- |
| Identity | `id`, `url`, `title` | `id` is the product number and the key for repeat runs. |
| Price | `price`, `currency`, `priceUsd`, `oldPrice`, `oldPriceUsd`, `discountPercent` | `oldPrice` is `null` without a discount. |
| Brand and seller | `brand`, `brandId`, `seller`, `sellerId` | Names arrive with details on. |
| Quality | `rating`, `reviewsCount` | `rating` is `null` when the site shows no mark. |
| Stock | `availability`, `availabilityText` | The site's own status words. |
| Category | `categoryId`, `categoryName`, `categoryUrl`, `inputUrl` | Where the row came from. |
| Media and badge | `imageUrl`, `images`, `label`, `condition` | `label` is the site's badge text. |

A field with no value is `null`, and the sample row keeps the key so your column list stays the same across rows.

---

## Troubleshooting guide

**The run ends as** `FAILED`**.** A category address that does not exist ends the run with a reason. Open the address on the site, copy it again, and run the Actor once more.

**The run succeeds with zero rows.** A category with no products ends with a status message and no rows. Check that the address is a category page and not a search page.

**A search address is refused.** Search pages and query strings are not accepted. Copy the category address from the category page instead.

**Fewer rows than the category shows.** The 100-page limit applies per address, so a large category needs filter slices.

**Price looks wrong.** Check `currency`. The `price` field is in the site's currency, and it is not converted, so compare it with `priceUsd` when you mix currencies.

---

## Best practices

- Keep `maxPagesPerCategory` small while you test, then raise it for the full run.
- Store the run date next to every saved batch of rows, so a later comparison knows which prices were current.
- Read `status` and the row count on each run. Alert when a scheduled run returns zero rows for a category that normally has products. A category that drops to zero is worth a look at the address, because the site may have moved it.
- Keep the token in an environment variable, never in the script.
- Pin the client to the 3.x line with `apify-client~=3.0`, so a future major release does not change the attributes your code reads.
- Keep a copy of the category addresses you use in a file, so each run reads the same slices. When you add a slice, record the filter segment next to the category name, so the next reader of the file knows what each address covers.

For current pricing and details, see the [Store page](https://apify.com/reventadata/rozetka-scraper).

---

## Conclusion and next steps

You now have a script that starts Rozetka Scraper, checks the run status, and prints two lines per product. Next, paste more category addresses, add filter slices for large categories, or save the input as an Apify task and attach a schedule to it. Then read each new dataset from Python in the same way, and keep the runs in a dated folder so that price changes show over time.

What would you track first? Share it in the comments.
