OLX listing search
Classified listings on OLX in Poland, Ukraine, Romania, Bulgaria, Portugal, Kazakhstan, Uzbekistan and India, with the site's filters: sort, price range, category, region/city (India: location), condition, seller type, photos, delivery and category attributes. Category attribute filters (not India) are passed through as they appear in the site's search URLs, as extra query parameters, e.g. filter_float_year:from=2018, filter_enum_petrol[0]=diesel (up to 20; attribute keys are listed in each result's attributes). Each listing: id, title, link, description, price, currency and label, negotiable flag, condition and the other attributes, category, city, district, region, map position, creation/refresh/expiry dates, business flag, promotion and delivery flags, seller id and name, photos, and raw (the site's record). total is the site's count. Pass next_page back as page; null on the last page (the site serves at most 1,000 results per search outside India).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
q | string | Keywords, e.g. iphone. Example: iphone |
country | PL | UA | RO | BG | PT | KZ | UZ | IN | PL (default), UA, RO, BG, PT, KZ, UZ or IN. Example: PL |
sort | relevance | newest | price_asc | price_desc | relevance (default), newest, price_asc, price_desc. |
price_min | string | Lowest price (local currency). |
price_max | string | Highest price (local currency). |
category_id | string | The site's category id (category_id in results), e.g. 99 for phones on olx.pl. |
region_id | string | Region id (not India), e.g. 8. |
city_id | string | City id (not India). |
location_id | string | India only: location id (city or area), e.g. 4058526 for Hyderabad. |
condition | string | Not India: new, used or damaged (where the category has a condition). |
page | integer | Page number. Pass next_page from the previous response. |
owner_type | private | business | Not India: private or business sellers only. |
has_photo | boolean | Not India: true for listings with photos only. |
delivery | boolean | Not India: true for listings that offer delivery only. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/olx/v1/search?q=iphone" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/olx/v1/search",
params={"q": "iphone"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/olx/v1/search");
url.searchParams.set("q", "iphone");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).