# Olx Portugal Scraper (`mrdoe/olx-portugal-scraper`) Actor

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

![OLX Portugal Scraper - OLX Portugal scraper showing price, city and seller info for each listing](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/olx-portugal-scraper--hero.png)

### What does OLX Portugal Scraper do?

OLX Portugal Scraper reads the exact olx.pt search or category URL you give it - filters, price range and sort already applied - and returns every listing on it: title, description, price, currency, location, category params, photos, seller signals and promotion flags. It paginates automatically up to your max results or OLX's own 1000-item search cap.

### Why use OLX Portugal Scraper?

- Takes your own search URL directly, so any filter or sort you've already set up in your browser is respected exactly.
- Returns seller signals (member since, online status, business flag) alongside the listing, not just the price.
- Captures promotion flags (top ad, highlighted, urgent) so you can separate paid placements from organic listings.
- Works for both keyword search URLs and category browse URLs.
- No account or API key.

### What makes this different

Most classifieds scrapers need you to pick a category from a dropdown. This Actor takes the exact olx.pt URL you already built in your browser - search terms, filters, price range and sort all included - and scrapes it as-is.

### Who can use the OLX Portugal Scraper and how?

- **Resellers and flippers:** Monitor a specific search (e.g. a model + price range) for new listings.
- **Market researchers:** Track price distributions for a product category across Portugal.
- **Price-drop alert builders:** Re-run a saved search URL on a schedule and diff the results.
- **Lead generation:** Collect seller contact signals for a category of interest.

### How it works

![OLX Portugal Scraper workflow: your input, collection, output](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/olx-portugal-scraper--how-it-works.png)

1. **Your input** — build your search or category URL on olx.pt with the filters and sort you want
2. **The Actor collects it** — paste that URL into the Actor
3. **Your output** — get one row per listing, following the site's own pagination

### What data can you extract?

The dataset has 28 fields per row:

| Field | Type | Description |
|---|---|---|
| `id` | integer | OLX's internal listing ID. |
| `title` | string | Listing title. |
| `description` | string | Listing description. |
| `url` | string | Listing page URL. |
| `priceDisplay` | string | Price as displayed, e.g. "399 €". |
| `price` | number | Price value. |
| `currency` | string | Currency code, e.g. "EUR". |
| `isNegotiable` | boolean | Whether the price is negotiable. |
| `isFree` | boolean | Whether the item is listed for free. |
| `isExchange` | boolean | Whether the seller is open to exchange/trade. |
| `condition` | string | Item condition. |
| `category` | string | Category type. |
| `categoryId` | integer | Category ID. |
| `params` | array | Category-specific filter params (key, name, value). |
| `city` | string | City/area name. |
| `region` | string | Region name. |
| `photos` | array | Photo URLs. |
| `isBusiness` | boolean | Whether the seller is a business account. |
| `sellerId` | integer | Seller's internal user ID. |
| `sellerName` | string | Seller's display name. |
| `sellerMemberSince` | string | When the seller joined OLX. |
| `sellerIsOnline` | boolean | Whether the seller is currently online. |
| `isPromoted` | boolean | Whether the listing is promoted. |
| `isHighlighted` | boolean | Whether the listing is highlighted. |
| `isTopAd` | boolean | Whether the listing is a paid top ad. |
| `isUrgent` | boolean | Whether the listing is marked urgent. |
| `createdTime` | string | When the listing was created. |
| `validToTime` | string | When the listing expires. |

### How to use OLX Portugal Scraper

![OLX Portugal Scraper input form](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/olx-portugal-scraper--input.png)

1. Open the Actor and go to the **Input** tab.
2. Paste a full olx.pt search or category URL (copy it straight from your browser's address bar after applying filters).
3. Optionally set filters and a **Max results** limit.
4. Click **Start**. A default run finishes in under a minute.
5. Open the **Output** tab, then download the dataset or connect it to your tools.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchUrl` | string | No | `"https://www.olx.pt/ads/q-iphone/"` | A full olx.pt search or category URL, with any filters, price range or sort already applied (just copy it from your browser). Example: https://www.olx.pt/ads/q-iphone/ |
| `maxItems` | integer | No | `50` | Maximum number of listings to return (up to 1000, OLX's own search result cap). |
| `proxyConfiguration` | object | No | `{"useApifyProxy":false}` | OLX Portugal's listing pages work without a proxy for moderate volumes. Enable Apify Proxy for larger runs. |

### Output Data

![OLX Portugal Scraper dataset table](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/olx-portugal-scraper--output.png)

Each row is one listing: title, description, price, currency, location, category params, photos, seller signals and promotion flags.

![OLX Portugal Scraper field map of one record](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/olx-portugal-scraper--fields.png)

A real dataset item:

```json
{
  "id": 674117616,
  "title": "iPhone 14 Pro Max 128GB Deep Purple | Muito Bom Estado",
  "description": "Vendo Apple iPhone 14 Pro Max 128GB na cor Deep Purple (Roxo Escuro).\n\nModelo: iPhone 14 Pro Max\n\nCapacidade: 128GB\n\nCor: Deep Purple / Rox…",
  "url": "https://www.olx.pt/d/anuncio/iphone-14-pro-max-128gb-deep-purple-muito-bom-estado-IDJCvMM.html",
  "priceDisplay": "399 €",
  "price": 399,
  "currency": "EUR",
  "isNegotiable": false,
  "isFree": false,
  "isExchange": false,
  "condition": "Usado",
  "category": "electronics",
  "categoryId": 5407,
  "params": [
    {
      "key": "state",
      "name": "Estado",
      "value": "Usado"
    },
    {
      "key": "model",
      "name": "Modelo",
      "value": "iPhone 14 Pro Max"
    },
    {
      "key": "operador",
      "name": "Operador",
      "value": "Desbloqueado"
    },
    {
      "key": "capacity",
      "name": "Capacidade",
      "value": "128GB"
    }
  ],
  "city": "Cascais E Estoril",
  "region": "Lisboa",
  "photos": [
    "https://ireland.apollo.olxcdn.com:443/v1/files/airqn54tudjb3-PT/image;s=750x1000",
    "https://ireland.apollo.olxcdn.com:443/v1/files/505y0aqliyhu3-PT/image;s=750x1000",
    "https://ireland.apollo.olxcdn.com:443/v1/files/6jg8ge43pr9g-PT/image;s=750x1000",
    "https://ireland.apollo.olxcdn.com:443/v1/files/t4hth0gvxr1j1-PT/image;s=750x1000"
  ],
  "isBusiness": false,
  "sellerId": 23687875,
  "sellerName": "Domenico",
  "sellerMemberSince": "2016-07-24T00:40:58+01:00",
  "sellerIsOnline": false,
  "isPromoted": true,
  "isHighlighted": false,
  "isTopAd": true,
  "isUrgent": false,
  "createdTime": "2026-10-05T16:14:07+01:00",
  "validToTime": "2026-11-04T15:14:07+00:00"
}
```

### Usage Examples

#### Search by keyword

```json
{
  "searchUrl": "https://www.olx.pt/ads/q-iphone/",
  "maxItems": 50
}
```

#### Browse a category

```json
{
  "searchUrl": "https://www.olx.pt/telemoveis-e-tablets/",
  "maxItems": 100
}
```

### Tips for Best Results

- Apply your filters and sort directly on olx.pt first, then copy that URL in - don't try to reconstruct filter params by hand.
- Re-run on a schedule with the same saved search URL to catch new listings.
- Default is 5 results for a fast test. Set the max to 0 to return everything available.

### Known Limitations

- Capped at 1000 results per search, matching OLX's own search result limit.
- Promoted/top ads can appear on multiple pages, so duplicate IDs across pages are automatically skipped.

### Integrations

Run it from the Apify API, on a schedule, or from a webhook. Send results straight to Google Sheets, Make, Zapier, Slack or your own database with Apify's built-in integrations.

### Export Formats

Download the dataset as JSON, CSV, Excel, XML, HTML table or RSS from the **Output** tab or the API.

### Frequently Asked Questions

#### Does it need an OLX account?

No. The Actor reads olx.pt's public listing pages and needs no account or key.

#### Can I use my own filters?

Yes - build the search or category URL on olx.pt with whatever filters, price range and sort you want, then paste that exact URL in.

#### How many results can I get?

Up to 1000 per run - that's OLX's own cap on a single search's result count.

#### Does it work for category browse pages too, not just search?

Yes - both /ads/q-{keyword}/ search URLs and category browse URLs (e.g. /telemoveis-e-tablets/) work.

#### Do I need an account or login?

No. The Actor reads public data and needs no account or key.

#### Am I charged for failed runs or empty results?

You are only charged for results that are actually written to the dataset.

#### Can I run it on a schedule?

Yes. Create a Task with your input and add a schedule in Apify Console. With monitor mode on, each scheduled run returns only what changed since the previous one.

### Enterprise and custom work

Need higher volumes, a custom output schema, dedicated scheduling or a no-breaking-changes commitment for a production pipeline? Open an issue on the Actor page and describe your use case. Bulk terms and custom builds are available.

### Support

Questions or a missing field? Open an issue from the **Issues** tab on this Actor's page and it will be looked at.

### Legal / Responsible Use

You are responsible for using the data in line with the source's terms and applicable law. The Actor collects publicly available data only and is not affiliated with the source.

# Actor input Schema

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

A full olx.pt search or category URL, with any filters, price range or sort already applied (just copy it from your browser). Example: https://www.olx.pt/ads/q-iphone/

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

Maximum number of listings to return (up to 1000, OLX's own search result cap).

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

OLX Portugal's listing pages work without a proxy for moderate volumes. Enable Apify Proxy for larger runs.

## Actor input object example

```json
{
  "searchUrl": "https://www.olx.pt/ads/q-iphone/",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "searchUrl": "https://www.olx.pt/ads/q-iphone/",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/olx-portugal-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 = {
    "searchUrl": "https://www.olx.pt/ads/q-iphone/",
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/olx-portugal-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 '{
  "searchUrl": "https://www.olx.pt/ads/q-iphone/",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call mrdoe/olx-portugal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdoe/olx-portugal-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/uTuhNV1bR0rSjgQI6/builds/41LQRBfljQGvyiI9u/openapi.json
