# olx.search

A page of the adverts an OLX site finds for a search, in seven countries: title, full text, price, attributes, place, photos and whether the seller is a business.

OLX search, one of the OLX scrapers.

| | |
| --- | --- |
| Id | `olx.search` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/olx.search/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | What to search for, in the site's language, e.g. `rower`. Limit: at least 1 characters, at most 200 characters. |
| `country` | "pl" \| "ua" \| "ro" \| "bg" \| "pt" \| "kz" \| "uz" | no | The OLX site to search, by country: `pl` (olx.pl), `ua` (olx.ua), `ro` (olx.ro), `bg` (olx.bg), `pt` (olx.pt), `kz` (olx.kz), `uz` (olx.uz). Default: `"pl"`. |
| `sort` | "relevance" \| "newest" \| "price_low" \| "price_high" | no | The order of the results. Default: `"relevance"`. |
| `page` | integer | no | The results page, from 1; 40 adverts a page beside the promoted ones, and OLX serves at most 25 pages. Limit: 1 to 25. Default: `1`. |

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `position` | integer or null | The advert's place on its results page, from 1. Null for `olx.listing`. |
| `page` | integer or null | The results page the advert is on. Null for `olx.listing`. |
| `listing_id` | string | OLX's id of the advert. |
| `country` | string | The OLX site the advert is on, as a two-letter country code: `pl`, `ua`, `ro`, `bg`, `pt`, `kz`, `uz`. |
| `url` | string | The advert's page. |
| `title` | string | The advert's title. |
| `description` | string or null | The advert's text, with line breaks kept. |
| `price` | number or null | The asking price. Null when the advert states none (given away, offered in exchange). For an advert priced in another currency than the site's own, OLX states the price in both: this is one of the two, in `currency`, and `price_label` is the other as printed. |
| `currency` | string or null | The price's currency as OLX names it, e.g. `PLN`, `UAH`, `EUR`, `RON`. |
| `price_label` | string or null | The price as the advert prints it, e.g. `9 999 zł`, `Za darmo`. |
| `previous_price` | number or null | The price before the seller lowered it, where the search results show one. Null from `olx.listing`. |
| `is_free` | boolean or null | True when the item is given away. |
| `is_exchange` | boolean or null | True when the item is offered in exchange for another. |
| `attributes` | array of object | The advert's attributes other than its price, in its order: condition, brand, size, and whatever its category asks for. |
| `attributes[].name` | string | The attribute's name as the advert shows it, in the site's language, e.g. `Stan`, `Marka`. |
| `attributes[].value` | string | Its value as the advert shows it, e.g. `Używane`, `250 W`. |
| `category_id` | integer or null | OLX's id of the category the advert is in. |
| `city` | string or null | The city or town the advert is in. |
| `district` | string or null | The district of the city, where the advert names one. |
| `region` | string or null | The region or province. |
| `latitude` | number or null | The latitude of the point the advert's map is centred on, in decimal degrees. The map shows an area, not an address. |
| `longitude` | number or null | The longitude of that point. |
| `photos` | array of string | The advert's photos, at full size, in its order. |
| `created_at` | string (date-time) or null | When the advert was first published. |
| `refreshed_at` | string (date-time) or null | When the advert was last renewed or moved up. |
| `valid_until` | string (date-time) or null | When the advert expires unless it is renewed. |
| `is_promoted` | boolean or null | True for an advert the seller paid to have shown at the top. |
| `is_business` | boolean or null | True when the seller is a business account; false for a private seller. |
| `seller_name` | string or null | The company name a business account states. Null for a private seller and for a business that states none. |
| `status` | string or null | The advert's state as OLX names it, e.g. `active`. |
| `fetched_at` | string (date-time) | When the advert was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/olx.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"rower","country":"pl"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "olx.search",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "query": "rower",
    "country": "pl"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "position": 1,
      "page": 1,
      "listing_id": "1106543889",
      "country": "pl",
      "url": "https://www.olx.pl/d/oferta/na-sprzedaz-rower-gorski-giant-talon-4-CID767-ID1cSVC5.html",
      "title": "Na sprzedaż: Rower górski Giant Talon 4",
      "description": "Na sprzedaż trafia niezawodny hardtail Giant Talon 4 w rzucającym się w oczy, dynamicznym kolorze Amber Glow (pomarańczowy/neonowy czerwony). Rower idealny zarówno na weekendowe wypady do lasu, jak i na codzienne dojazdy.\nRower jest w pełni … [truncated]",
      "price": 950,
      "currency": "PLN",
      "price_label": "950 zł",
      "previous_price": null,
      "is_free": false,
      "is_exchange": false,
      "attributes": [
        {
          "name": "Stan",
          "value": "Używane"
        },
        {
          "name": "Płeć",
          "value": "Uniseks"
        },
        {
          "name": "Wyposażenie dodatkowe",
          "value": "Dzwonek"
        }
      ],
      "category_id": 1651,
      "city": "Siedlisko",
      "district": null,
      "region": "Lubuskie",
      "latitude": 51.76621,
      "longitude": 15.80915,
      "photos": [
        "https://ireland.apollo.olxcdn.com:443/v1/files/5062kb2a9qtr-PL/image;s=1024x768",
        "https://ireland.apollo.olxcdn.com:443/v1/files/cdoaw0qx87ph2-PL/image;s=1024x768",
        "https://ireland.apollo.olxcdn.com:443/v1/files/2b1i37x5b8dt2-PL/image;s=1024x768"
      ],
      "created_at": "2026-10-21T18:03:00+02:00",
      "refreshed_at": "2026-10-31T16:51:22+01:00",
      "valid_until": "2026-11-20T17:03:01+01:00",
      "is_promoted": true,
      "is_business": false,
      "seller_name": null,
      "status": "active",
      "fetched_at": "2026-11-19T18:07:41.028470Z"
    }
  ],
  "next_cursor": null
}
```

What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with `… [truncated]`.

- Shortened: `description`: 1,172 characters, the first 240 shown.
- Shortened: `attributes`: 11 items, the first 3 shown.
- Shortened: `photos`: 7 items, the first 3 shown.

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the OLX scrapers](https://docs.enrichednow.com/results-and-statuses.md#olx) are in their own section there.
