# OLX Public Classified Listing Scraper (`w3crawler/olx-global-scraper`) Actor

Collects public OLX classified listings through a built-in OLX India search mode or supplied public search, category, and ad URLs. Optional deep scraping adds descriptions, sellers, locations, images, phones, and specifications.

- **URL**: https://apify.com/w3crawler/olx-global-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 listings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does OLX Public Classified Listing Scraper do?

OLX Public Classified Listing Scraper collects classified listings that are exposed on supported public OLX country sites. It can build a keyword search, crawl a supplied public search or category URL, or inspect supplied public listing URLs. Optional deep scraping follows search results to collect additional public detail fields.

The Actor uses bounded direct HTTP requests by default and can use standard Apify Proxy when explicitly configured. It does not log in, solve CAPTCHA or JavaScript challenges, use private APIs, bypass access controls, or fabricate listing data. A blocked, empty, malformed, or failed response becomes a structured diagnostic row.

### Why use OLX Public Classified Listing Scraper?

Use it for public-market inventory research, price comparisons, regional supply checks, lead discovery, and scheduled monitoring across multiple OLX country domains. The output keeps normal listings separate from diagnostics and records the country, source URL, transport, proxy state, and page position needed for downstream review.

The Actor supports these public OLX roots through the `countryCode` search mode or by URL validation: `olx.in`, `olx.pl`, `olx.ua`, `olx.com.br`, `olx.com.pk`, `olx.co.id`, `olx.com.ar`, `olx.com.tr`, `olx.pt`, `olx.kz`, `olx.ro`, `olx.bg`, `olx.ba`, `olx.uz`, `olx.lk`, `olx.ph`, `olx.co.ke`, `olx.co.za`, `olx.com.eg`, `olx.com.ng`, `olx.com.gh`, `olx.com.tn`, `olx.ma`, and `olx.dz`.

### What data can OLX Public Classified Listing Scraper extract?

Normal records are emitted only when the public response supplies an identifiable listing ID, title, and listing URL. Optional fields appear only when exposed by the source; missing seller, phone, price, image, or specification fields are not inferred.

| Field                                               | Type                     | Meaning                                                                            |
| --------------------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------- |
| `recordType`                                        | string                   | `olx-global-listing` for a listing or `run_diagnostic` for an operational outcome. |
| `targetType`                                        | string                   | `olx-listing`.                                                                     |
| `id` / `listingId`                                  | string                   | Stable row identity and public listing identifier.                                 |
| `source`                                            | string                   | `olx-global`.                                                                      |
| `dataAvailable`                                     | boolean                  | Whether usable public listing data is present.                                     |
| `verified` / `verificationStatus`                   | boolean / string         | Whether the row came from an observed public listing (`public_listing`).           |
| `accessStatus` / `sourceBlocked`                    | string / boolean         | Observed access state and whether a source boundary was hit.                       |
| `transport` / `sourceTransport`                     | string                   | `http` for live requests or `fixture` for an explicitly supplied QA fixture.       |
| `proxyUsed`                                         | boolean                  | Whether Apify Proxy supplied the request.                                          |
| `requestUrl` / `finalUrl`                           | URI                      | Public request and final response URLs.                                            |
| `httpStatus`                                        | integer                  | Observed HTTP status, when available.                                              |
| `pageType` / `sourceType`                           | string                   | `search` or `detail`; diagnostics use `sourceType: "diagnostic"`.                  |
| `price` / `priceAmount` / `currency`                | string / number / string | Displayed price, parsed amount, and currency when available.                       |
| `title` / `url`                                     | string / URI             | Listing headline and public listing URL.                                           |
| `description` / `location`                          | string                   | Public description and locality.                                                   |
| `date` / `posted`                                   | string                   | Public listing date or posted text when exposed.                                   |
| `seller` / `phone`                                  | string                   | Public seller label or phone value when exposed.                                   |
| `image` / `images`                                  | URI / URI array          | Public image URLs that pass the supported OLX asset-host boundary.                 |
| `imageCount` / `videoCount`                         | integer                  | Media counts when available or derived from normalized images.                     |
| `specs`                                             | object                   | Up to 100 public specification entries with string values.                         |
| `featured`                                          | boolean                  | Whether the source marks the listing as featured.                                  |
| `countryCode`                                       | string                   | Country inferred from the public OLX root or selected for search.                  |
| `searchQuery`                                       | string                   | Built-in search query context.                                                     |
| `searchUrl` / `sourceUrl` / `pageUrl` / `detailUrl` | URI                      | Search, source, page, and optional detail provenance.                              |
| `pageNumber` / `itemPosition`                       | integer                  | One-based page and result position.                                                |
| `scrapedAt`                                         | date-time                | Time the Actor normalized the row.                                                 |
| `error` / `errorCode`                               | string                   | Diagnostic explanation and stable machine-readable code.                           |

### How to scrape OLX public listings

1. Open the Actor in Apify Console and select the **Input** tab.
2. Choose a mode and complete the fields required by that mode.
3. Set `maxItems`, `maxPages`, `deepScraping`, and the request controls for the intended run size.
4. Click **Save & Run**. The Actor sends bounded public requests and stops when the limits or a source boundary are reached.
5. Open the **Dataset** tab for listing and diagnostic rows. Open the **Key-value store** tab and select `OUTPUT_SUMMARY` for the run summary.
6. Use the **API** tab or the [Apify API documentation](https://docs.apify.com/api/v2) for integrations and scheduling.

In built-in `search` mode, the Actor constructs a country-aware keyword route. Poland uses the public `/oferty/q-<term>/` route; other configured roots use their public `/items/q-<term>` route. In URL modes, the supplied URL determines the country and must be HTTPS on a supported OLX root.

### How much will it cost to scrape OLX public listings?

Apify account billing for compute, network traffic, storage, and any selected proxy service applies. This repository does not promise a fixed dollar-per-1,000-record price; check the current Apify pricing and the Actor’s Pricing tab before production use. Direct HTTP is the default. A configured proxy can add account-specific proxy costs.

The runtime bounds are:

- At most 100 normal listing rows per run (`maxItems`).
- At most 10 search/category pages (`maxPages`).
- A 5,000–60,000 ms timeout per public request (`timeoutMs`).
- A 1,000–10,000,000 byte response limit (`maxBytes`).
- At most three retries per request (`maxRequestRetries`).
- At most 100 supplied listing URLs in `adUrls`.

Deep scraping adds one public detail request per accepted search listing and may increase compute, request, and proxy usage. A diagnostic-only run can complete as an Apify run, but it is not evidence that listing data was collected.

### Input

The input is a JSON object. Unknown keys, explicit `null` values, invalid types, unsupported country codes, unsafe URLs, and missing mode-specific values are rejected. `mode`, `searchQuery`, and `countryCode` default only when omitted; an explicitly blank mode or country code is not silently replaced.

| Input                | Type and bounds                                                                                                                                      | Default        | Description                                                                                                                                         |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`               | enum: `search`, `searchUrl`, `categoryUrl`, `adUrl`                                                                                                  | `search`       | Selects built-in keyword search, supplied search URL, supplied category/city URL, or supplied listing URLs.                                         |
| `searchQuery`        | string, maximum 300 characters                                                                                                                       | `iphone`       | Built-in search term. Required to be non-blank in `search` mode.                                                                                    |
| `countryCode`        | enum: `IN`, `PL`, `UA`, `BR`, `PK`, `ID`, `AR`, `TR`, `PT`, `KZ`, `RO`, `BG`, `BA`, `UZ`, `LK`, `PH`, `KE`, `ZA`, `EG`, `NG`, `GH`, `TN`, `MA`, `DZ` | `IN`           | Country root for built-in search. `searchUrl` and `categoryUrl` infer the country from the supplied URL; `adUrl` infers it per listing URL.         |
| `adUrls`             | array of at most 100 HTTPS strings, each maximum 2,000 characters                                                                                    | `[]`           | Public listing URLs required by `adUrl` mode. Duplicates are removed.                                                                               |
| `searchUrl`          | HTTPS supported-OLX URL, maximum 2,000 characters                                                                                                    | omitted        | Public search URL required by `searchUrl` mode.                                                                                                     |
| `categoryUrl`        | HTTPS supported-OLX URL, maximum 2,000 characters                                                                                                    | omitted        | Public category or city URL required by `categoryUrl` mode.                                                                                         |
| `maxItems`           | integer, 1–100                                                                                                                                       | `50`           | Maximum normal listing rows.                                                                                                                        |
| `maxPages`           | integer, 1–10                                                                                                                                        | `5`            | Maximum public source pages or URLs visited; it also caps the number of supplied `adUrls` processed in one run.                                     |
| `deepScraping`       | boolean                                                                                                                                              | `false`        | Follows accepted search results to public detail pages for richer fields. It is ignored for an explicit fixture and is not needed for `adUrl` mode. |
| `proxyConfiguration` | object                                                                                                                                               | omitted/direct | Optional standard Apify Proxy configuration. Credentials are resolved by the SDK.                                                                   |
| `timeoutMs`          | integer, 5,000–60,000                                                                                                                                | `30,000`       | Per-request timeout in milliseconds.                                                                                                                |
| `maxBytes`           | integer, 1,000–10,000,000                                                                                                                            | `5,000,000`    | Maximum response size accepted for parsing.                                                                                                         |
| `requestDelayMs`     | integer, 0–10,000                                                                                                                                    | `250`          | Bounded delay before retries or detail requests.                                                                                                    |
| `maxRequestRetries`  | integer, 0–3                                                                                                                                         | `1`            | Retry budget for transient and access-boundary responses. Proxy sessions rotate between retry attempts when a proxy is configured.                  |
| `fixturePath`        | relative `.html`, `.htm`, `.json`, or `.txt` path, maximum 260 characters                                                                            | omitted        | Explicit checked-in QA fixture; never an implicit fallback for failed live access.                                                                  |

#### Built-in search input

```json
{
  "mode": "search",
  "searchQuery": "laptop",
  "countryCode": "IN",
  "maxItems": 10,
  "maxPages": 2
}
```

#### Supplied URL input

```json
{
  "mode": "searchUrl",
  "searchUrl": "https://www.olx.in/items/q-laptop",
  "maxItems": 25,
  "deepScraping": true
}
```

#### Direct listing input

```json
{
  "mode": "adUrl",
  "adUrls": ["https://www.olx.in/item/laptop-thinkpad-iid-123456789"],
  "deepScraping": true
}
```

#### Proxy input

```json
{
  "mode": "search",
  "searchQuery": "iphone",
  "countryCode": "IN",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["StaticUS3"],
    "apifyProxyCountry": "US"
  }
}
```

#### Explicit local QA fixture input

```json
{
  "mode": "search",
  "searchQuery": "laptop",
  "countryCode": "IN",
  "maxItems": 5,
  "maxPages": 1,
  "fixturePath": "test/fixtures/global.html"
}
```

`fixturePath` is for deterministic repository validation only. It must be supplied explicitly and is not a production data source.

### Output

The Dataset contains normalized public listing rows and separate `run_diagnostic` rows when an operational condition prevents reliable extraction. The Actor also writes the same summary object to `OUTPUT` and `OUTPUT_SUMMARY` in the default key-value store.

#### Normal listing record

```json
{
  "recordType": "olx-global-listing",
  "targetType": "olx-listing",
  "id": "123456789",
  "listingId": "123456789",
  "source": "olx-global",
  "dataAvailable": true,
  "verified": true,
  "verificationStatus": "public_listing",
  "accessStatus": "public_page",
  "sourceBlocked": false,
  "transport": "http",
  "sourceTransport": "http",
  "proxyUsed": false,
  "title": "Laptop ThinkPad T14",
  "price": "₹45,000",
  "priceAmount": 45000,
  "currency": "INR",
  "location": "Mumbai",
  "seller": "Example seller",
  "url": "https://www.olx.in/item/laptop-thinkpad-iid-123456789",
  "image": "https://images.olx.in/images/laptop.jpg",
  "images": ["https://images.olx.in/images/laptop.jpg"],
  "imageCount": 1,
  "featured": false,
  "countryCode": "IN",
  "searchQuery": "laptop",
  "searchUrl": "https://www.olx.in/items/q-laptop",
  "sourceUrl": "https://www.olx.in/items/q-laptop",
  "pageUrl": "https://www.olx.in/items/q-laptop",
  "pageNumber": 1,
  "itemPosition": 1,
  "scrapedAt": "2026-09-09T00:00:00.000Z"
}
```

#### Deep-scraping fallback

When a search listing is valid but its optional detail request is blocked or fails, the Actor retains the verified base search record and emits a separate detail diagnostic. It does not discard the listing or fill missing detail fields with guesses:

```json
{
  "recordType": "olx-global-listing",
  "targetType": "olx-listing",
  "id": "123456789",
  "listingId": "123456789",
  "source": "olx-global",
  "dataAvailable": true,
  "verified": true,
  "verificationStatus": "public_listing",
  "accessStatus": "public_page",
  "sourceBlocked": false,
  "transport": "http",
  "sourceTransport": "http",
  "proxyUsed": false,
  "title": "Laptop ThinkPad T14",
  "url": "https://www.olx.in/item/laptop-thinkpad-iid-123456789",
  "searchUrl": "https://www.olx.in/items/q-laptop",
  "scrapedAt": "2026-09-09T00:00:00.000Z"
}
```

#### Access diagnostic

```json
{
  "recordType": "run_diagnostic",
  "targetType": "olx-listing",
  "id": "diagnostic:ACCESS_BOUNDARY:https://www.olx.in/items/q-laptop",
  "source": "olx-global",
  "url": "https://www.olx.in/items/q-laptop",
  "requestUrl": "https://www.olx.in/items/q-laptop",
  "finalUrl": "https://www.olx.in/items/q-laptop",
  "httpStatus": 403,
  "pageType": "search",
  "accessStatus": "access_boundary",
  "sourceBlocked": true,
  "transport": "http",
  "sourceTransport": "http",
  "proxyUsed": false,
  "dataAvailable": false,
  "sourceType": "diagnostic",
  "countryCode": "IN",
  "searchQuery": "laptop",
  "error": "OLX returned an anti-automation or JavaScript challenge; no bypass was attempted.",
  "errorCode": "ACCESS_BOUNDARY",
  "scrapedAt": "2026-09-09T00:00:00.000Z"
}
```

Other stable diagnostic codes include `NO_RESULTS`, `RATE_LIMITED`, `PROXY_ERROR`, `REQUEST_TIMEOUT`, `REQUEST_FAILED`, `HTTP_ERROR`, `REDIRECT_OFF_HOST`, `NON_TEXT_RESPONSE`, `RESPONSE_TOO_LARGE`, `EMPTY_RESPONSE`, `PARSE_FAILED`, `DETAIL_FAILED`, and `FIXTURE_READ_FAILED`.

#### `OUTPUT_SUMMARY`

`OUTPUT` and `OUTPUT_SUMMARY` contain the same JSON object. `normalCount`, `recordCount`, `listingCount`, and `resultCount` count normal listing rows; `diagnosticCount` counts diagnostic rows. `attemptCount` and `requests` count live request attempts, while `transportCounts` shows live versus explicit-fixture transport.

```json
{
  "recordType": "olx-global-run-summary",
  "id": "run-summary",
  "status": "partial",
  "runState": "stopped",
  "diagnosticOnly": false,
  "dataAvailable": true,
  "itemCount": 3,
  "normalCount": 2,
  "recordCount": 2,
  "listingCount": 2,
  "resultCount": 2,
  "diagnosticCount": 1,
  "duplicateCount": 0,
  "pageCount": 2,
  "detailRequests": 2,
  "attemptCount": 2,
  "requests": 2,
  "failedPages": 1,
  "blockedCount": 1,
  "noResultCount": 0,
  "sourceCount": 1,
  "sessionRotations": 0,
  "maxItems": 50,
  "maxPages": 5,
  "fixtureUsed": false,
  "fixturePath": null,
  "sourceTransport": "http",
  "transportCounts": { "http": 2, "fixture": 0 },
  "proxyRequested": false,
  "proxyUsed": false,
  "completedAt": "2026-09-09T00:00:00.000Z"
}
```

Possible `status` values are `success`, `partial`, `diagnostic_only`, and `empty`. `runState: "stopped"` indicates that a source boundary ended traversal; a completed diagnostic-only run still does not mean data was collected.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Tips and advanced options

#### Choose the smallest useful mode

Use `search` for a keyword on a configured country root, `searchUrl` for a source URL you already know, `categoryUrl` for browse pages, and `adUrl` for direct public listings. For URL modes, the URL itself is authoritative for country selection; do not pair a URL from one country with a different `countryCode` expectation.

#### Direct, proxy, and retry behavior

Direct HTTP is the default. With `useApifyProxy: true`, the Actor uses a consistent session name for the run and rotates the session between retry attempts after retryable access or transport failures. The Dataset exposes only boolean proxy provenance; proxy URLs and credentials are never written to records or logs. Proxy authentication failures are reported as `PROXY_ERROR` and are not treated as source data.

#### Deep scraping and fallback behavior

`deepScraping: true` follows accepted search results to public detail pages. A detail failure produces a diagnostic while preserving the base search row. Deep scraping is skipped for explicit fixtures so local tests remain deterministic, and it is unnecessary for `adUrl` mode because those URLs are already detail targets.

#### Local validation

From the Actor directory, run `npm ci`, then `npm run check`. The checked-in `test/fixtures/global.html` fixture exercises the active `src/run.js` entrypoint only when `fixturePath` is explicitly supplied. A fixture pass proves parser and contract behavior; it is not proof that any OLX site is accessible from Apify Cloud.

### FAQ, support, and responsible use

#### Why did the run return only diagnostics?

The source may return a rate limit, login wall, JavaScript challenge, empty markup, unsupported response, proxy-authentication failure, or HTTP error. Inspect `errorCode`, `httpStatus`, `accessStatus`, `sourceBlocked`, `transport`, and `proxyUsed`, then review the run log. Do not interpret a diagnostic-only run as successful extraction.

#### Does this Actor bypass login, CAPTCHA, or anti-bot controls?

No. It uses ordinary public HTTP and fails closed at access boundaries. It does not use stealth browsing, CAPTCHA solving, credentialed sessions, private endpoints, or fabricated fallback records.

#### API and Issues

Use the Actor’s **API** tab or the [Apify API documentation](https://docs.apify.com/api/v2) for programmatic access. Report reproducible software issues through the Actor’s **Issues** tab and include the run ID, mode, and diagnostic code. Do not include proxy credentials or private user data in an issue.

#### Privacy, legal use, and non-affiliation

This Actor is an independent community tool and is not affiliated with, endorsed by, or sponsored by OLX or its affiliates. Use only publicly exposed listing information, respect each OLX site’s terms, robots or access policies, rate limits, and applicable law. Comply with relevant privacy, consumer-protection, copyright, and data-protection requirements. Do not use the Actor to collect private information, evade access controls, harass people, or make decisions that require protected or sensitive personal data. You are responsible for confirming that your collection and downstream use are lawful.

The source implementation and contract checks are available in the project files. Run `npm run check` before publishing changes.

# Changelog

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

# Actor input Schema

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

Select the type of input you want to scrape from

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

Search term for the built-in OLX India search. For other countries, use Search URL or Category URL mode.

## `countryCode` (type: `string`):

Two-letter OLX country code used only by built-in search mode. URL modes infer the country from the supplied URL.

## `adUrls` (type: `array`):

Public listing URLs from supported OLX country sites.

## `searchUrl` (type: `string`):

Full public OLX country search URL.

## `categoryUrl` (type: `string`):

Full public OLX country category URL.

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

Maximum number of items to scrape

## `deepScraping` (type: `boolean`):

Enable deep scraping to extract detailed ad information including seller info, description, location, etc.

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

Optional standard Apify Proxy configuration. Direct access is the default; credentials are resolved by the SDK and never written to logs or records.

## `maxPages` (type: `integer`):

Safety cap on public search/category pages.

## `timeoutMs` (type: `integer`):

Maximum time to wait for each public response.

## `maxBytes` (type: `integer`):

Safety limit for each public response.

## `requestDelayMs` (type: `integer`):

Optional bounded delay between public requests.

## `maxRequestRetries` (type: `integer`):

Retry budget for transient public-request failures.

## `fixturePath` (type: `string`):

Optional checked-in relative fixture for local validation; it never replaces a failed live request unless explicitly supplied.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "iphone",
  "countryCode": "IN",
  "maxItems": 50,
  "deepScraping": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxPages": 5,
  "timeoutMs": 30000,
  "maxBytes": 5000000,
  "requestDelayMs": 250,
  "maxRequestRetries": 1
}
```

# Actor output Schema

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

Search or detail records with price, source context, and optional deep fields.

## `summary` (type: `string`):

Counts for listings, diagnostics, pages, retries, and duplicates.

# 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": "iphone",
    "maxItems": 50,
    "deepScraping": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/olx-global-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": "iphone",
    "maxItems": 50,
    "deepScraping": False,
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/olx-global-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": "iphone",
  "maxItems": 50,
  "deepScraping": false
}' |
apify call w3crawler/olx-global-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/olx-global-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/RhvQSjPdz88zucAA9/builds/V34sUCOTkDkhhVf7N/openapi.json
