olx.ba APIolx.ba ↗
Access OLX.ba listings via API. Search by keyword or category, filter apartments, and retrieve detailed attributes like area, floor, address, and condition.
curl -X GET 'https://api.parse.bot/scraper/c958fce0-a5f4-482f-8ab9-cc49cf848a74/search_listings?page=1&query=monitor' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for listings on olx.ba. Returns listing name, price, category_id, and URL with pagination metadata.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| query | string | Search keywords (e.g. 'monitor', 'laptop'). |
| category_id | integer | Category ID to filter results (e.g. 23 for apartments, 163 for monitors). |
{
"type": "object",
"fields": {
"meta": "object with pagination info: total, last_page, current_page, per_page, selected_category",
"listings": "array of listing objects with id, title, price, category_id, url"
},
"sample": {
"data": {
"meta": {
"total": 29960,
"per_page": 20,
"last_page": 1498,
"current_page": 1,
"selected_category": 0
},
"listings": [
{
"id": 68103279,
"url": "https://olx.ba/artikal/68103279",
"price": "289 KM",
"title": "Gaming monitor 25 240Hz 24.5'' AOC 25G3ZM/BK FHD 0.5ms",
"category_id": 163
}
]
},
"status": "success"
}
}About the olx.ba API
The OLX.ba API provides 3 endpoints for searching and retrieving listing data from Bosnia's OLX marketplace. The search_listings endpoint returns paginated results across all categories with ID, title, price, and URL fields. get_listing_details drills into a single listing to expose property-specific fields like area, floor number, address, and condition. A dedicated search_apartments endpoint returns pre-fetched detail objects for the first five results per page.
Endpoints and Data Coverage
The search_listings endpoint accepts an optional query string, a category_id integer, and a page number. Results include a meta object covering total, last_page, current_page, and per_page counts alongside a selected_category value. Each listing object in the listings array contains id, title, price, category_id, and url. Category IDs are consistent — for example, 23 targets apartments and 163 targets monitors — making it straightforward to scope searches programmatically.
Listing Details
get_listing_details takes a listing_id string and returns a single object with up to ten fields. Core fields (id, url, title, price, location, category_id) are always present. Property-specific fields — area (in m²), address, condition, and floor_number — are returned when the listing carries that data, and null otherwise. This makes the endpoint useful for both real estate and general merchandise listings, though the nullable fields are most relevant for apartment and property categories.
Apartment-Specific Search
search_apartments is scoped to category 23 and accepts query and page parameters. It combines the search and detail steps: for the first five results on the requested page, it returns complete apartment objects including area, floor_number, address, and condition alongside the standard id, title, price, location, url, and category_id fields. The meta object follows the same pagination shape as search_listings. This endpoint is suited for pipelines that need enriched data without making a separate detail call per listing.
- Aggregate apartment listings in Sarajevo by querying
search_apartmentswith a city-name keyword and extractingarea,price, andfloor_numberfor comparison. - Build a price tracker for electronics by polling
search_listingswith acategory_idand storing thepricefield from each result over time. - Populate a real estate database by iterating paginated
search_listingsresults and enriching each withget_listing_detailsfor address and condition data. - Filter listings by location by combining
querywith city names insearch_listingsand reading thelocationfield from detail responses. - Monitor new listings in a specific category by checking
meta.totalacross paginatedsearch_listingscalls and flagging increases. - Cross-reference apartment floor counts and areas from
search_apartmentsto estimate per-m² pricing across different neighborhoods.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does OLX.ba offer an official developer API?+
What does `search_apartments` return that `search_listings` does not?+
search_apartments returns fully detailed apartment objects — including area, floor_number, address, and condition — for the first five results on each page, without requiring a separate get_listing_details call. search_listings returns only id, title, price, category_id, and url per result, for all categories.How many apartment results per page does `search_apartments` enrich with full details?+
area, floor_number, address, and condition. The meta object still reflects the total count across all pages, but enriched detail objects are capped at five per page.