# Olx (olx.ro) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search OLX Romania listings and access detailed ad information including seller contact details. Get real-time access to product listings, pricing, and phone numbers for sellers across the platform.

**Category:** Marketplaces | **Website:** [olx.ro/](https://olx.ro/) | **Docs:** [parse.bot/marketplace/3a98ba7c-7fcb-42dd-ae24-1ab75c709116/olx-ro-api](https://parse.bot/marketplace/3a98ba7c-7fcb-42dd-ae24-1ab75c709116/olx-ro-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-olx-ro-api-3a98ba7c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_ad_details

Get full details for a specific ad by its numeric ID. Returns the complete ad object including description, photos, seller info, location, parameters, delivery options, and contact availability. One round-trip per ad.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | The numeric ID of the ad (e.g., '304618239'). Obtainable from search_ads results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-ro-api-3a98ba7c/get_ad_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>"}'
```

### get_seller_phone

Retrieve the seller's phone number for a specific ad. Works for most private and business ads. Some ads with protect_phone enabled may return an empty phones array. Requires a single round-trip.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | The numeric ID of the ad (e.g., '264973596'). Obtainable from search_ads results. |
| `ad_url` | string | No | The full URL of the ad page, used as Referer header for session validation. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-ro-api-3a98ba7c/get_seller_phone \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>","ad_url":"<string>"}'
```

### search_ads

Search for ads on OLX.ro with optional filters for category and city. Returns up to `limit` ads per call. The response includes a metadata.total_elements count for the total number of matching ads.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | integer | No | Category ID for filtering (e.g., 1211 for goods, 2529 for electronics, 1657 for automotive). |
| `city_id` | integer | No | City ID for location filtering (e.g., 39939 for Iasi, 1 for Bucuresti). |
| `limit` | integer | No | Number of results to return per page. |
| `query` | string | No | Search keyword to filter ads by title and description. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-ro-api-3a98ba7c/search_ads \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<integer>","city_id":"<integer>","limit":"<integer>","query":"<string>"}'
```
