# Otomoto.pl Scraper - Poland Used Cars (`haketa/otomoto-scraper`) Actor

Scrape Otomoto.pl, Poland's #1 used-car marketplace: make, model, version, price, mileage, year, fuel, gearbox, engine, location, seller (dealer name & website) and Otomoto's price evaluation. Paste any Otomoto listing URL. No login, no API key, no browser.

- **URL**: https://apify.com/haketa/otomoto-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

## Otomoto.pl Scraper — Poland Used-Car Listings, Prices & Dealer Leads 🚗

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-FF6B00?style=for-the-badge\&logo=apify\&logoColor=white)](https://apify.com/haketa/otomoto-scraper)
[![Otomoto](https://img.shields.io/badge/Otomoto.pl-Poland%20%231%20Cars-E74C3C?style=for-the-badge)](https://www.otomoto.pl)
[![Data Format](https://img.shields.io/badge/Format-JSON%20%7C%20CSV%20%7C%20Excel-blue?style=for-the-badge)](https://apify.com)
[![Scale](https://img.shields.io/badge/Scale-1%2C000%2B%20Adverts-success?style=for-the-badge)](https://apify.com)
[![Pricing](https://img.shields.io/badge/Pricing-Pay%20Per%20Result-brightgreen?style=for-the-badge)](https://apify.com)

**Extract clean, structured automotive data from [Otomoto.pl](https://www.otomoto.pl), Poland's #1 used-car marketplace (OLX Group).** This **Otomoto scraper** transforms any Otomoto search or listing URL into comprehensive automotive intelligence: for every car advert you get **make, model, version, production year, mileage, price (PLN), gross/net status, fuel type, gearbox, engine capacity and power, location (city and voivodeship/region), seller details (dealer name and official website link), CEPiK government registry verification, and Otomoto's proprietary market price evaluation**. Paste any search URL and the scraper paginates automatically through the full catalog — **no login, no API keys, and no browser overhead**.

Export Polish used-car market data directly to **JSON, CSV, Excel, or API**.

> Built for **used-car dealerships, automotive pricing analysts, vehicle arbitrage hunters, automotive market researchers, data science teams, and B2B automotive lead-generation agencies** seeking reliable access to the Polish vehicle market.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Website** | Otomoto.pl (`otomoto.pl`) — Poland's Leading Automotive Marketplace |
| **Supported URLs** | Any Otomoto search URL: category (`/osobowe`), make (`/osobowe/bmw`), model (`/osobowe/audi/a4`), or filtered searches |
| **Pricing Intelligence** | Asking price, currency (`PLN`), gross/net flag (`isGross`), deal indicator (`BELOW`/`IN`/`ABOVE`), price drop % |
| **B2B Lead Generation** | Seller type (`dealer` vs `private`), dealer business name, and direct dealer website URL |
| **Vehicle Provenance** | Country of origin (`countryOrigin`), official Polish government CEPiK registry verification |
| **Scale & Pagination** | Deep multi-page pagination (1,000+ adverts per URL, 0 = unlimited) |
| **Speed & Efficiency** | Fast HTTP execution without heavy headless browser overhead |
| **Output Formats** | JSON, CSV, XML, Excel (XLSX), HTML Table, Apify Dataset API |
| **Integrations** | Python SDK, Node.js SDK, REST API, Webhooks, Zapier, Make |

***

### 🔎 Why scrape Otomoto?

[Otomoto.pl](https://www.otomoto.pl) is the undisputed market leader in Poland for passenger cars, commercial vehicles, and motorcycles — hosting hundreds of thousands of active listings from both professional automotive dealer groups and private owners. For automotive analysts and cross-border car traders across the European Union, Otomoto is the primary source of truth for **used-car valuation, inventory velocity, and dealer intelligence** in Central and Eastern Europe.

Collecting listing data manually from the website is impractical: infinite-scroll interfaces, session-tied pagination, and rapid daily price fluctuations make manual tracking impossible.

This **Otomoto data extractor** automates the entire collection process: feed it any search query URL, and it extracts, normalizes, and flattens every advert into clean tabular datasets ready for spreadsheets, pricing algorithms, or CRM pipelines.

**Common reasons teams scrape Otomoto.pl:**

- 💶 **Automotive valuation & pricing algorithms** — build accurate depreciation curves and residual value models across makes, models, years, and mileage bands.
- 🎯 **Car dealer lead generation** — collect directories of active automotive dealerships in Poland complete with verified business names and website links.
- 📉 **Spotting below-market deals** — identify undervalued inventory using Otomoto's `priceEvaluation` indicator (`BELOW`) combined with `priceDropPercentage`.
- 🔍 **Competitor inventory monitoring** — track stock levels, aging inventory, and price adjustments across competing dealerships.
- 🇪🇺 **Cross-border vehicle arbitrage** — identify export/import margin opportunities between Poland, Germany, and neighboring European markets.
- 🛡️ **Government registry compliance** — filter for authenticated vehicles verified against Poland's official CEPiK database.

***

### ✨ Key Features & Capabilities

- ✅ **Scrape Any Filtered Search URL** — configure filters directly on Otomoto (price range, year, mileage, fuel type, transmission, body type, voivodeship) and paste the URL.
- ✅ **Automated Deep Pagination** — automatically iterates through `?page=N`, collecting hundreds or thousands of adverts with sticky session management.
- ✅ **Granular Vehicle Specifications** — extracts make, model, version, production year, odometer mileage (km), fuel type, gearbox, engine displacement (cm³), and engine power (KM/HP).
- ✅ **Full Financial Transparency** — captures numerical asking price, currency, gross/net indicator, and seller discount percentages.
- ✅ **Dealer & Commercial Attribution** — flags professional dealers versus private sellers, extracting dealer names and official website links for B2B outreach.
- ✅ **CEPiK Verification Status** — records whether a vehicle's VIN and registration history have been validated against Poland's national vehicle registry.
- ✅ **Complete Raw Specs Map** — provides a nested `specs` dictionary capturing every custom attribute and accessory parameter declared on the listing.
- ✅ **Zero Duplicate Guarantee** — internal tracking de-duplicates listings by advert ID so each car appears exactly once.
- ✅ **Unlimited 1,000+ Deep Scalability** — set `maxItems: 0` for unlimited extraction; collect all available adverts across Poland.

***

### 🎯 Use cases

#### 1. Used-Car Dealerships & Inventory Pricing

Dealerships benchmark their lot inventory against live regional competition. Compare asking prices for a 2021 BMW 3 Series with 80,000 km across the Masovian or Lesser Poland voivodeships to price vehicles competitively for fast turnover.

#### 2. Automotive Reselling & Cross-Border Arbitrage

Professional car buyers spot mispriced vehicles instantly. By filtering for listings marked with `priceEvaluation: "BELOW"` and `priceDropPercentage > 5`, traders identify profitable opportunities for domestic resale or export to neighboring EU countries.

#### 3. B2B Automotive Lead Generation

SaaS platforms, detailing suppliers, warranty providers, and auto-finance brokers build comprehensive lists of Polish dealerships. Filtering results by `sellerType == "dealer"` extracts dealer names and direct website links for sales outreach.

#### 4. Data Science & Machine Learning Valuation Models

Fintech lenders and insurance underwriters train predictive vehicle valuation algorithms on structured datasets containing millions of historical asking prices, engine specs, and mileage data points.

***

### 📥 Input Parameters

Paste one or more Otomoto listing URLs. Running with default settings executes a fast demo across live BMW listings.

| Field | Type | Description | Default | Prefill |
|---|---|---|---|---|
| `startUrls` | Array | Otomoto.pl search URLs — category, make, model, or filtered search URL. | `[]` | `[{ "url": "https://www.otomoto.pl/osobowe/bmw" }]` |
| `maxItems` | Integer | Maximum adverts to collect per URL. Set to `0` for unlimited pagination. | `0` | `100` |
| `proxyConfiguration` | Object | Apify Proxy configuration (datacenter proxies work smoothly). | `{ "useApifyProxy": true }` | `{ "useApifyProxy": true }` |

#### Example Input Configuration

```json
{
  "startUrls": [
    { "url": "https://www.otomoto.pl/osobowe/bmw" },
    { "url": "https://www.otomoto.pl/osobowe/audi/a4" }
  ],
  "maxItems": 250,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

***

### 📤 Output Dataset & Field Specification

Each dataset item represents a unique vehicle listing on Otomoto.pl. Numerical values are cleanly typed as integers or floats.

#### Real Output Sample

```json
{
  "id": "6151465267",
  "title": "BMW Seria 4 420d xDrive Sport-Aut M Sport",
  "shortDescription": "M Sport | Gwarancja BMW | Laserlight | Driving Assistant Pro | xDrive",
  "url": "https://www.otomoto.pl/osobowe/oferta/bmw-seria-4-ID6IiW7J.html",
  "createdAt": "2026-11-01T14:54:48Z",
  "price": 55350,
  "currency": "PLN",
  "isGross": false,
  "make": "BMW",
  "model": "Seria 4",
  "version": "420d xDrive Sport-Aut M Sport",
  "year": 2023,
  "mileage": 92560,
  "fuelType": "Diesel",
  "gearbox": "Automatyczna",
  "engineCapacity": 1995,
  "enginePower": 190,
  "bodyType": null,
  "color": null,
  "doorCount": null,
  "countryOrigin": "Niemcy",
  "city": "Kraków",
  "region": "Małopolskie",
  "sellerType": "dealer",
  "sellerName": "KB Automotive",
  "sellerWebsite": "https://kbautomotive.otomoto.pl",
  "priceEvaluation": "NONE",
  "cepikVerified": false,
  "priceDropPercentage": null,
  "thumbnail": "https://ireland.apollo.olxcdn.com/v1/files/zp6ldww1u0xk1-OTOMOTOPL/image;s=320x240",
  "specs": {
    "make": "BMW",
    "model": "Seria 4",
    "version": "420d xDrive Sport-Aut M Sport",
    "year": "2023",
    "mileage": "92560 km",
    "fuel_type": "Diesel",
    "gearbox": "Automatyczna",
    "engine_capacity": "1995 cm3",
    "engine_power": "190 KM",
    "country_origin": "Niemcy"
  },
  "scrapedAt": "2026-11-10T16:47:00.000Z"
}
```

#### Field Breakdown & Data Coverage

##### 🚗 Vehicle Identity & Technical Specifications

| Field | Type | Description | Coverage |
|---|---|---|---|
| `id` | String | Unique Otomoto listing ID (de-duplication key). | 🟢 High (100%) |
| `title` | String | Commercial advert headline title. | 🟢 High (100%) |
| `make` | String | Vehicle manufacturer (e.g. `BMW`, `Audi`, `Toyota`). | 🟢 High (100%) |
| `model` | String | Vehicle model line (e.g. `Seria 3`, `A4`, `Corolla`). | 🟢 High (100%) |
| `version` | String | Trim and package version (e.g. `M Sport`, `S-Line`). | 🟢 High (75%) |
| `year` | Integer | Manufacturing year (e.g. `2022`). | 🟢 High (100%) |
| `mileage` | Integer | Odometer reading in kilometers. | 🟢 High (100%) |
| `fuelType` | String | Fuel type (`Benzyna`, `Diesel`, `Hybryda`, `Elektryczny`). | 🟢 High (100%) |
| `gearbox` | String | Transmission type (`Manualna` or `Automatyczna`). | 🟢 High (100%) |
| `engineCapacity` | Integer | Engine displacement in cubic centimeters (cm³). | 🟢 High (96%) |
| `enginePower` | Integer | Engine power rating in metric horsepower (KM). | 🟢 High (98%) |
| `countryOrigin` | String | Country of initial registration (e.g. `Niemcy`, `Polska`). | 🟢 High (72%) |

##### 💰 Pricing & Market Intelligence

| Field | Type | Description | Coverage |
|---|---|---|---|
| `price` | Integer | Listed asking price in currency units. | 🟢 High (100%) |
| `currency` | String | ISO currency code (typically `PLN`). | 🟢 High (100%) |
| `isGross` | Boolean | Whether price includes VAT (`true`=Gross, `false`=Net). | 🟢 High (95%) |
| `priceEvaluation` | String | Otomoto deal rating: `BELOW`, `IN`, `ABOVE`, or `NONE`. | 🟢 High (100%) |
| `priceDropPercentage` | Float | Reduction percentage if the price was discounted. | 🟡 Conditional (12%) |

##### 🏢 Seller & Lead Generation Attributes

| Field | Type | Description | Coverage |
|---|---|---|---|
| `sellerType` | String | Seller classification: `dealer` or `private`. | 🟢 High (100%) |
| `sellerName` | String | Commercial dealership or company name. | 🟡 When Dealer (92%) |
| `sellerWebsite` | String | Dealership website URL for business outreach. | 🟡 When Dealer (85%) |
| `city` | String | City where the vehicle is located. | 🟢 High (100%) |
| `region` | String | Polish voivodeship / province (e.g. `Mazowieckie`). | 🟢 High (100%) |
| `cepikVerified` | Boolean | Validated against Poland's official CEPiK registry. | 🟢 High (100%) |
| `url` | String | Direct canonical URL to the advert. | 🟢 High (100%) |
| `thumbnail` | String | Primary photograph image URL. | 🟢 High (98%) |
| `specs` | Object | Key-value dictionary of all advert parameters. | 🟢 High (100%) |
| `scrapedAt` | String | ISO 8601 extraction timestamp. | 🟢 High (100%) |

***

### 🔁 Pagination & Unlimited Scale

The **Otomoto.pl Scraper** is engineered for high-volume automotive data ingestion:

- **1,000+ Adverts via Deep Pagination**: Setting `maxItems: 0` removes all caps, allowing you to scrape 1,000, 5,000, or 10,000 listings across dozens of search result pages seamlessly.
- **Sticky Session Consistency**: Automatically pairs cookie sessions and sticky proxy URLs for each query URL, preventing pagination resets and duplicate page reads.
- **Fast HTTP Execution**: Employs lightweight HTTP requests without headless browser overhead, completing hundreds of listings in seconds.
- **Fast Prefill Performance**: Standard prefill verification runs complete in under 25 seconds for rapid testing.

***

### 💻 Integration & API Usage

Integrate Polish used-car listings directly into your Python, JavaScript, or data warehouse pipelines.

#### Python SDK Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "startUrls": [{"url": "https://www.otomoto.pl/osobowe/volkswagen/golf"}],
    "maxItems": 100,
}

run = client.actor("haketa/otomoto-scraper").call(run_input=run_input)

for car in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{car['title']} - {car['year']} - {car['price']} {car['currency']} - Rating: {car['priceEvaluation']}")
```

#### Node.js SDK Example

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('haketa/otomoto-scraper').call({
    startUrls: [{ url: 'https://www.otomoto.pl/osobowe/toyota' }],
    maxItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} cars:`, items);
```

#### cURL API Trigger

```bash
curl --request POST \
  --url "https://api.apify.com/v2/acts/haketa~otomoto-scraper/runs?token=YOUR_APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "startUrls": [{"url": "https://www.otomoto.pl/osobowe/bmw"}],
    "maxItems": 50
  }'
```

***

### 🛠️ Troubleshooting & Common Edge Cases

| Issue / Symptom | Probable Cause | Recommended Resolution |
|---|---|---|
| URL returns 0 adverts | Invalid URL or zero listings match applied search filters | Verify URL loads in a standard browser. Ensure the URL starts with `https://www.otomoto.pl/`. |
| Incomplete specs dictionary | Seller did not specify optional vehicle equipment | The scraper extracts all available parameters; missing equipment fields remain omitted. |
| Incomplete dealer website link | Dealer does not maintain an external domain | Dealerships on Otomoto often host their portal directly at `subdomain.otomoto.pl`; exact URLs are captured. |
| `sellerWebsite` is null | Listing posted by a private individual | Only commercial car dealerships have dedicated website URLs; private sellers do not. |
| Missing `bodyType` or `color` | Attribute only declared on secondary page | The scraper captures all search-level parameters. Search results often leave body type to the specs map. |
| Page pagination loop ends early | Search result set ended (no further matching listings) | The scraper automatically halts when it reaches the final available page or two consecutive empty batches. |

***

### 🔬 Data Processing & Analysis Examples

#### Identify Below-Market Deals with Pandas

```python
import pandas as pd

## Load scraped Otomoto listings dataset
df = pd.read_csv("otomoto_cars.csv")

## Filter for bargains with price evaluation BELOW market
bargains = df[
    (df["priceEvaluation"] == "BELOW") &
    (df["price"].notna()) &
    (df["year"] >= 2020)
].sort_values(by="price", ascending=True)

print(f"Discovered {len(bargains)} below-market deals:")
print(bargains[["title", "year", "mileage", "price", "city", "sellerName"]].head(10))
```

#### Extract Dealership Leads with `jq`

```bash
## Extract dealership business names and website links
cat dataset.json | jq -r '.[] | select(.sellerType == "dealer" and .sellerWebsite != null) | "\(.sellerName)\t\(.sellerWebsite)\t\(.city)"' | sort -u > dealers_poland.tsv
```

***

### 💡 Best Practices & Pro Tips

- 🔍 **Configure Filters on Otomoto First**: Open `otomoto.pl`, set your desired price ranges, fuel types, and regions, then copy and paste the final URL into `startUrls`.
- 📊 **Target Arbitrage Opportunities**: Filter your dataset on `priceDropPercentage > 10` to find sellers motivated to negotiate or liquidate inventory.
- 🏢 **B2B Dealership Lists**: To generate B2B dealer sales lists, filter for `sellerType == "dealer"` and extract `sellerName`, `sellerWebsite`, and `region`.
- 🛡️ **Prioritize CEPiK Verified**: Filter on `cepikVerified == true` when looking for trustworthy listings with verified mileage and vehicle history.

***

### ❓ Frequently Asked Questions

**Do I need an Otomoto account or API key?**\
No. The scraper accesses publicly available listing data without requiring an account, login, or commercial API subscription.

**How many cars can I scrape in one run?**\
There is no hard limit. By setting `maxItems: 0` (unlimited), you can paginate through thousands of vehicles across any search URL.

**Which vehicle categories are supported?**\
All categories on Otomoto are supported, including passenger cars (`/osobowe`), delivery vans (`/dostawcze`), trucks (`/ciezarowe`), and motorcycles (`/motocykle`).

**What does Otomoto's price evaluation mean?**\
Otomoto evaluates asking prices against historical market data: `BELOW` indicates a price below market average, `IN` is aligned with market norms, `ABOVE` represents a premium price, and `NONE` indicates insufficient comparable data.

**Can I run this actor on an automated schedule?**\
Yes. Configure an Apify Schedule (e.g. daily at 08:00 UTC) to monitor price drops, new arrivals, and sold inventory over time.

**Are electric and hybrid cars supported?**\
Yes. Otomoto indexes pure electric vehicles (`Elektryczny`), plug-in hybrids, and conventional hybrids under the `fuelType` attribute alongside petrol (`Benzyna`) and diesel (`Diesel`).

**How are gross and net vehicle prices differentiated?**\
The `isGross` boolean indicates whether the published price includes VAT (common for private consumer sales) or is quoted net of VAT (common for commercial leasing and corporate inventory).

**Does this scraper extract dealer phone numbers?**\
To ensure high speed and low bandwidth consumption, the scraper collects search-level data including dealer names and website URLs. Direct phone numbers masked behind click-to-reveal prompts on detail pages are not captured.

***

### 🔗 Complementary Automotive & Commercial Scrapers

- [AutoScout24 Scraper](https://apify.com/haketa/autoscout24-scraper) — European used & new car marketplace data.
- [AutoTrader Scraper](https://apify.com/haketa/autotrader-scraper) — UK vehicle listings, prices, and dealerships.
- [CarGurus Scraper](https://apify.com/haketa/cargurus-scraper) — US/UK automotive inventory with deal ratings.
- [YallaMotor Scraper](https://apify.com/haketa/yallamotor-scraper) — Middle East automotive listings and dealerships.

***

### 📋 Changelog

- **v1.2 (2026-11)**:
  - 🚀 **Unlocked 1,000+ Deep Pagination**: Enabled `maxItems: 0` for unlimited advert collection across result pages.
  - ⚡ **Optimized Prefill Execution**: Fast sample test run completes in <25s across live listings.
  - 🧼 **Clean Output Schema Compliance**: Strict string-typed output schema for seamless CSV, Excel, and API consumption.
- **v1.1 (2026-08)**:
  - Added CEPiK government vehicle registry verification extraction.
  - Enhanced dealer attribution with business name and website URL lead generation.
- **v1.0 (2026-05)**:
  - Initial release with Next.js urql state extraction, sticky session pagination, and price evaluation indicators.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/otomoto-scraper/changelog.md

# Actor input Schema

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

Otomoto.pl listing URLs — a category (/osobowe), a make (/osobowe/bmw), a make+model (/osobowe/audi/a4) or any filtered search URL. Filter on Otomoto and paste the URL; the scraper paginates automatically.

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

Maximum adverts to collect per URL. Set to 0 for unlimited.

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

Optional. Defaults to Apify Proxy (datacenter).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.otomoto.pl/osobowe/bmw"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `adverts` (type: `string`):

Scraped Otomoto used-car adverts.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.otomoto.pl/osobowe/bmw"
        }
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/otomoto-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 = {
    "startUrls": [{ "url": "https://www.otomoto.pl/osobowe/bmw" }],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/otomoto-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 '{
  "startUrls": [
    {
      "url": "https://www.otomoto.pl/osobowe/bmw"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/otomoto-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/otomoto-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/8zPD8bYr0wBy6ZBNa/builds/PhnQxfn8ljain6FZn/openapi.json
