OLX APIolx.ba ↗
Search and retrieve listings from OLX.ba, Bosnia's largest classifieds marketplace. Get prices, locations, and apartment details across all categories.
What is the OLX API?
The OLX.ba API exposes 3 endpoints for searching and retrieving classified listings from Bosnia's largest online marketplace. Use search_listings to run keyword and category-filtered queries across all listing types, get_listing_details to pull full attributes for a single listing by ID, or search_apartments to get enriched real-estate results including area, floor number, address, and condition alongside standard listing fields.
curl -X GET 'https://api.parse.bot/scraper/c958fce0-a5f4-482f-8ab9-cc49cf848a74/search_listings?page=1&query=monitor&category_id=23' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace olx-ba-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""OLX.ba SDK walkthrough — search listings, drill into details, search apartments."""
from parse_apis.olx_ba_api import OLX, ListingSummary, Listing, Apartment, ListingNotFound
client = OLX()
# Search for monitors across all categories
for listing in client.listingsummaries.search(query="monitor", limit=5):
print(listing.title, listing.price)
# Drill into the first result's full details
summary = client.listingsummaries.search(query="laptop", limit=1).first()
if summary:
detail = summary.details()
print(detail.title, detail.price, detail.location, detail.category_id)
# Direct lookup by ID with typed error handling
try:
full = client.listings.get(listing_id="76608394")
print(full.title, full.price, full.location)
except ListingNotFound as exc:
print(f"Listing gone: {exc}")
# Search apartments in Sarajevo
for apt in client.apartments.search(query="Sarajevo", limit=3):
print(apt.title, apt.price, apt.area, apt.condition)
print("exercised: listingsummaries.search / summary.details / listings.get / apartments.search")
Full-text search across all OLX.ba listings. Supports keyword queries, category filtering, and pagination. Returns lightweight listing summaries (title, price, category) without detail attributes. Paginated server-side at 20 results per page.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| query | string | Search keywords (e.g. 'monitor', 'laptop', 'stan'). |
| category_id | integer | Category ID to filter results (e.g. 23 for apartments, 163 for monitors, 818 for baby equipment). |
{
"type": "object",
"fields": {
"total": "integer total number of matching listings",
"listings": "array of listing summary objects with id, title, price, category_id, url",
"per_page": "integer results per page",
"last_page": "integer last page number",
"current_page": "integer current page number"
},
"sample": {
"data": {
"total": 30953,
"listings": [
{
"id": 76608394,
"url": "https://olx.ba/artikal/76608394",
"price": "349 KM",
"title": "Samsung gaming monitor Odyssey G4 27'' FHD FAST IPS 300Hz 1ms",
"category_id": 163
}
],
"per_page": 20,
"last_page": 1548,
"current_page": 1
},
"status": "success"
}
}About the OLX API
Endpoints and Data Coverage
The search_listings endpoint accepts a query string, an optional category_id filter, and a page parameter for navigating paginated results. Each page returns up to 20 listing summaries containing id, title, price, category_id, and url, plus pagination metadata (total, per_page, last_page, current_page). Category IDs map to specific verticals — for example, 23 for apartments, 163 for monitors, and 818 for baby equipment — giving you targeted control over which segment of the marketplace you query.
Listing Details and Real Estate Attributes
get_listing_details takes a single listing_id (obtained from search_listings or search_apartments results) and returns the full record for that listing. Real-estate listings populate area (in m²), floor_number, address, location, and condition; non-real-estate listings return those fields as null. This makes it straightforward to build a detail page or data pipeline that handles mixed category results without branching logic.
Apartment-Specific Search
search_apartments is scoped to category 23 and returns enriched objects for every result — the same real-estate fields (area, floor_number, address, condition) that get_listing_details returns are included directly in the listing array, so you do not need a second request for basic apartment attributes. The endpoint accepts a query parameter (useful for filtering by city, such as 'Sarajevo' or 'Mostar') and a page parameter. Note that detailed attributes are fetched individually for the first 5 results on each page; remaining results on that page include only summary fields.
The OLX API is a managed, monitored endpoint for olx.ba — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when olx.ba changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official olx.ba API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor apartment prices in Sarajevo by querying
search_apartmentswith city name and trackingpricechanges over time. - Build a property comparison tool using
area,floor_number, andaddressfields fromget_listing_detailsfor real-estate listings. - Aggregate category-specific inventory (e.g., electronics, baby equipment) by combining
category_idfiltering insearch_listingswith detail lookups. - Track listing availability for a specific product type by polling
search_listingswith a keyword query and comparingtotalcounts across runs. - Geocode and map apartment listings by extracting
locationandaddressfields fromsearch_apartmentsresults. - Feed a price-alert service by storing
listing_idandpricefrom search results and flagging changes against a baseline. - Populate a real-estate analytics dashboard with
condition,area, andfloor_numberdata sourced from apartment searches.
| 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 | 100 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 have an official public developer API?+
What does `search_listings` return compared to `search_apartments`?+
search_listings returns lightweight summaries — id, title, price, category_id, and url — for any category. It does not include real-estate attributes like area or floor_number. search_apartments targets category 23 specifically and includes those enriched fields directly in each result object, so you get area, floor, address, and condition without a separate detail call for the first 5 results per page.What are the pagination constraints across the endpoints?+
current_page, last_page, per_page, and total fields are returned with every response so you can iterate programmatically. There is no option to request more than 20 results per call or change the page size.Does the API expose seller contact information or phone numbers for listings?+
title, price, location, address, area, condition, and floor_number, but seller identity and contact details are not included in any response. You can fork this API on Parse and revise it to add a seller-detail endpoint if that data is available on the listing page.Can I filter apartment searches by price range or area size?+
search_apartments and search_listings endpoints currently accept only query, category_id, and page as inputs — numeric filters like minimum/maximum price or area are not supported parameters. You can fork this API on Parse and revise the endpoint to add those filter parameters if the underlying source supports them.