By the end of this tutorial you will have a Python script that searches bazar.bg, the Bulgarian classifieds site, for iPhone ads and prints one line per ad: the price as the site shows it, the city and the title. The search runs through Bazar.bg Scraper (reventadata/bazar-bg-scraper), an Apify Actor that reads public pages on bazar.bg and returns each ad as a structured row.

The Actor is unofficial. It is not affiliated with, authorised by or endorsed by Bazar.bg or its operator. It reads the same public pages a visitor sees, with no login.

The sample rows below come from a real run of the Actor's public example on 16 November 2026. They are copied from the run's dataset, not written by hand.

Prerequisites

You need three things:

  1. Python with the Apify client installed.
  2. A free Apify account, which you can create with an email address or a GitHub login.
  3. Your API token, from Settings > API & Integrations in Apify Console.

Install the client and export the token:

pip install -U "apify-client~=3.0" export APIFY_API_TOKEN="your_apify_token_here" 

No scraping code is needed on your side. The Actor does the reading.

What you'll achieve

You will search bazar.bg for the keyword iphone, read the rows in Python and print one line per ad. By default the Actor keeps only ads whose title contains the keyword, so the same script works for any other keyword you put in.

The example stops at ten rows. That is the maxItems value of the run the sample rows come from, so change it when you want more.

Step 1: Open the Actor

The Actor's page is at apify.com/reventadata/bazar-bg-scraper. This tutorial calls it from Python, so you only need its name, reventadata/bazar-bg-scraper.

Step 2: Choose the search

The search is described by a handful of input fields:

  • searchQueries: one or more keywords. Bulgarian (Cyrillic) and Latin keywords both work. This field is required.
  • priceFrom and priceTo: a price range in euros, applied by the site.
  • sortBy: relevance (the default), newest, priceAsc or priceDesc.
  • titleMustContainKeywords: on by default. An ad is kept only if its title contains every word of the keyword, with accents and capitals ignored. The site's search is fuzzy, so this switch removes ads that only loosely match.
  • excludeWords: ads whose title contains any of these words are dropped.
  • includeDetails: off by default. When on, the Actor also opens every kept ad and adds its description, photos, parameters and the public seller name and profile.
  • maxItems and maxPages: caps on rows and on result pages per keyword. A page holds about 68 ads, and the site serves at most 25 pages for one search.

Keep in mind that a search for a common word can match thousands of ads. The site shows at most 25 pages per search, so for a broad search, split it into price bands with priceFrom and priceTo, and run each band as its own search.

The input for the run in this tutorial is short:

{ "searchQueries": ["iphone"], "maxItems": 10, "maxPages": 1 } 

Step 3: Run it from Python

This script starts the Actor, waits for it, reads the dataset and prints one line per ad:

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 search: one keyword, ten rows at most run_input = { "searchQueries": ["iphone"], "maxItems": 10, "maxPages": 1, } # 3. Start the Actor and wait for it to finish run = client.actor("reventadata/bazar-bg-scraper").call(run_input=run_input) if run is None: raise SystemExit("The Actor run was not found.") # 4. Read the rows from the run's default dataset items = list(client.dataset(run.default_dataset_id).iterate_items()) print(f"Retrieved {len(items)} ads.\n") # 5. Print one line per ad: price as shown, city, title for item in items: print(f"{item.get('priceText')} | {item.get('city')} | {item.get('title')}") 

Save the script as a Python file and run it with python followed by its file name. The first line says how many ads came back, and each line after it is one ad.

Step 4: Read the rows

Each ad is one row in the run's dataset. This is the first row of the example run, copied from the dataset. The scrapedAt field is left out of this sample:

{ "id": "56926131", "url": "https://bazar.bg/obiava-56926131/telefon-iphone-14-pro", "title": "Телефон Iphone 14 pro", "price": 330, "currency": "EUR", "priceText": "330 €", "isNegotiable": false, "location": "гр. Стара Загора, Загорка", "city": "Стара Загора", "listedText": "днес", "imageUrl": "https://cdn9.focus.bg/bazar/c4/pics/c4ce0f99ed3c974be029d99df1965e89.webp", "isPromoted": true, "hasTopBadge": true, "listedOn": "2026-11-16", "matchedKeyword": "iphone", "searchUrl": "https://bazar.bg/obiavi?q=iphone" } 

The fields you will use most are:

  • price and priceText: the amount as a number, and the price text as the site shows it, with its own thousands separator.
  • currency: EUR for every ad in this run.
  • city, location: the city on its own, and the full location text.
  • listedText and listedOn: the date the site shows, and the same day as an ISO date. The site shows the day and month, with no year. The Actor works the year out.
  • isPromoted and hasTopBadge: whether the ad is marked as a paid placement, and whether it carries the site's TOP badge.

Understanding your results

The example run returned ten rows, and their prices run from 101.24 EUR to 1,350 EUR. Four of the ten have isPromoted and hasTopBadge both set to true. Those four are priced at 250, 330, 720 and 1,350 EUR. The other six are priced between 101.24 and 450 EUR. Eight of the ten show днес in listedText, which means today, and listedOn gives that day as 2026-11-16. The other two show 6 November and 10 November.

No row in this run was marked isNegotiable, and every field had a value on every row.

When price is null, the ad had no number to read. An ad with a negotiable price keeps its priceText, and isNegotiable is true for it.

Pro tips

  1. Use price bands for broad keywords. The site serves at most 25 pages for one search. Run the same keyword with priceFrom and priceTo set to different bands to reach past that limit.
  2. Use newest for monitoring. sortBy: "newest" puts the most recent ads first, which suits a schedule that checks for new listings.
  3. Keep the title filter on. Without it the Actor keeps every ad the site returns for the keyword, including the looser matches.
  4. Add includeDetails only when you need it. It opens every kept ad, so the run is slower. The rows then also carry the public seller name and profile.
  5. Use excludeWords to drop an accessory word. Ads whose title contains a word you list are removed, for example a word that names a case.

Troubleshooting

  • No searchQueries given. The run fails with a message about the input. Add at least one keyword.
  • Zero rows, status SUCCEEDED. The site answered but no ad matched, and the run's status message says so. Try a shorter keyword, or turn off the title filter to see what the site returns.
  • Ad rows without detail fields. If an ad page cannot be read while includeDetails is on, the row is kept without the detail fields, and the run log counts it.
  • Fewer rows than expected. The run log ends with Skipped N: reason lines for rows removed by your filters, followed by Pushed N row(s)..

Next steps

To repeat a search, save it as an Apify task and attach a schedule.

For current pricing and details, see the Store page.

What are you planning to search for on Bazar.bg? Drop a comment! 💬

About the author: reventadata builds and publishes data extraction Actors on the Apify Store.