Skip to content

OLX Scraper API for Classifieds Price and Listing Data

Classifieds research usually stalls on the same two problems: the page is built with JavaScript, and the site does not welcome automated traffic.

OUTPUT FORMATSHTMLJSONMarkdown

This page describes an API that takes a public OLX listing URL, renders the page, and returns either structured JSON or rendered HTML. The reader task is narrow: decide whether the field coverage, credit cost and control set fit a price-tracking or listing-monitoring workflow, and know what to check before the first production run.

What a single OLX listing call returns

One request accepts an OLX listing URL. The response can be delivered as rendered HTML or as parsed JSON, depending on how the request is configured. The fields the page documents for every ad page are: title, asking price, location, posting date, condition, category, seller name and rating, and the image gallery. A separate extraction layer lets you target additional elements with CSS selectors or describe fields in natural language for AI-driven extraction. The API does not require an OLX account; it uses its own API key.

Field map: what each captured value is useful for

Treat the field list as a starting schema, not a finished data model. The table below maps each documented field to a typical analysis use and a check to run before trusting it.

Three workflows this fits

The page frames OLX scraping around three jobs. Each one maps to a different field emphasis.

Product detail gathering. Capture specifications and condition alongside the asking price so an inventory or sourcing decision has context. The condition field and the image gallery matter most here, because two listings with the same title can differ sharply in state.

Seller listing tracking. Follow a seller's activity over time to see how listings change. Seller name and rating, posting date and category are the useful signals. This is trend observation, not contact harvesting.

Asking-price comparison. Compare prices within the categories you follow. Posting date and listing duration help separate fresh listings from stale ones, and seller-rating signals help weight the comparison. The documented guidance is to surface pricing trends without collecting seller contact data.

How a request flows

The sequence is short. Create an account to receive an API key and the free starting credits. Install a client library for Python, Node, Go, PHP, Ruby or Java, or send a plain HTTP request. The request carries the API key and the OLX URL. The service rotates proxies, spoofs browser fingerprints and renders JavaScript before returning a response.

Optional parameters extend the request when a page needs more help: render_js for JavaScript rendering, stealth_proxy for CAPTCHA-heavy pages, country_code for geo-targeting, and ai_extract_rules for natural-language extraction. Selector-based extraction uses extract_rules with CSS selectors mapped to field names.

Credit cost per request: a decision table

Credit consumption depends on which options a request enables. The figures below are the documented per-request costs: a base request starts at 1 credit, JavaScript rendering costs 5, a premium proxy costs 10 without JS rendering or 25 with it, and a stealth proxy costs 75. Plan pricing is a separate commercial term and is not restated here as a current offer.

Telling failures apart

A failed OLX run is rarely one problem. Three distinct causes produce different symptoms and different fixes.

Blocked or challenged page. The response is a CAPTCHA, an interstitial or an empty shell. The page never rendered. Fix: enable stealth_proxy, confirm render_js is on, and check whether a geo-targeted country_code is needed for the market you are querying.

Rendered page, wrong fields. The page loaded but extract_rules returned nulls or the wrong values. This is a selector mismatch, not a blocking problem. Fix: inspect the rendered HTML, update the CSS selectors, and re-test in the dashboard request builder before changing production code.

Correct fields, missing rows. Some listings return fewer images or no seller rating. This is a data-completeness issue on the listing itself, not an API failure. Fix: treat those fields as optional in your schema and record nulls rather than dropping the record.

Keeping these three apart prevents the common mistake of escalating proxy strength when the real problem is a stale selector.

Checklist before the first production run

  1. Confirm the target pages are public and that the site's terms of service permit the collection you plan.
  2. Test one listing URL in the dashboard request builder and confirm the fields you need appear in the response.
  3. Decide between selector-based extract_rules and natural-language ai_extract_rules, and record which one your pipeline expects.
  4. Estimate credits per request from the options you enable, then multiply by expected volume before choosing a plan.
  5. Mark optional fields (seller rating, extra images) as nullable in your schema.
  6. Log the raw response alongside the parsed output so a selector regression can be diagnosed later.
  7. Avoid post-login content and seller contact data in the collection scope.

Worked example: one listing, two extraction modes

Suppose you want the title, asking price, location, condition and image gallery from a single OLX ad page.

With selector-based extraction, you map each field name to a CSS selector in extract_rules. The response returns parsed JSON keyed by your field names. This is deterministic and cheap to re-run, but it breaks when the page markup changes.

With AI-driven extraction, you describe the same five fields in natural language inside ai_extract_rules. The response also returns parsed JSON, but the mapping is inferred rather than declared. This tolerates markup changes better, at the cost of less predictable field boundaries.

A practical pattern is to start with selectors for the stable fields (title, price, location) and use AI extraction only for fields that resist stable selectors, such as condition wording or gallery ordering. Either way, the same single HTTP call carries the API key and the OLX URL.

OLX listing field map
FieldTypical useCheck before trusting
TitleIdentify the item or categoryWatch for duplicate titles across conditions
Asking pricePrice comparison and trend linesConfirm currency and whether price is negotiable
LocationRegional filteringCheck whether the value is a city, region or both
Posting dateFreshness and listing durationConfirm the date format before sorting
ConditionSourcing and resale decisionsFree-text values may vary in wording
CategoryGrouping and filteringCategory labels can differ across OLX markets
Seller name and ratingWeighting comparisonsRating may be absent for new sellers
Image galleryVisual verificationImage count varies by listing

Fields are documented for public OLX ad pages. Availability of individual values depends on the listing itself.

Per-request credit cost by enabled option
Option combinationCredits per successful request
Base request (no JS rendering, no premium proxy)1 (requests start at 1 credit each)
JavaScript rendering enabled5
Premium proxy, JS rendering disabled10 (premium proxy, JS rendering disabled)
Premium proxy with JS rendering enabled25 (premium proxy with JS rendering)
Stealth proxy75

Per-request credit costs as documented. The 1-credit base comes from the API-credits tooltip (requests start at 1 credit each). The 10-credit premium-without-JS and 25-credit premium-with-JS figures come from the proxy tooltip, which states premium proxies cost 10 or 25 credits depending on whether JS rendering is disabled or not. The 5-credit JS-rendering figure comes from the JS-rendering tooltip, and the 75-credit stealth figure comes from the FAQ. Plan prices and included credit volumes are commercial terms that must be confirmed by the account owner before publication.

Plan feature comparison (captured reference)
FeatureHobbyFreelanceStartupBusinessBusiness +Enterprise tiers
JavaScript renderingIncludedIncludedIncludedIncludedIncludedIncluded
Rotating & Premium ProxiesIncludedIncludedIncludedIncludedIncludedIncluded
GeotargetingIncludedIncludedIncludedIncludedIncludedIncluded
Screenshots & Extraction RulesIncludedIncludedIncludedIncludedIncludedIncluded
Priority Email SupportNot includedNot includedNot includedIncludedIncludedIncluded
Dedicated Account ManagerNot includedNot includedNot includedIncludedIncludedIncluded
Team ManagementNot includedNot includedNot includedIncludedIncludedIncluded

Feature availability as captured in the plan comparison. Prices, credit volumes and concurrency figures are commercial terms that require owner confirmation before publication.

Frequently asked questions

Do I need an OLX account to use the scraper?

No OLX account is needed. You sign up for an API key, receive the free starting credits, and send the listing URL. The service handles rendering and proxy rotation on its side.

Is scraping OLX allowed?

Public-facing pages are commonly collected, but the target site's terms of service should be reviewed before any deployment, and post-login content should be avoided. This is a general caution, not legal advice.

Which fields can I extract from an OLX listing?

Anything visible on the public page. The documented core set is title, asking price, location, posting date, condition, category, seller name and rating, and the image gallery. Additional elements can be targeted with extract_rules (CSS selectors) or ai_extract_rules (natural-language spec).

How do I get structured JSON back?

Pass extract_rules with CSS selectors mapped to your field names, or pass ai_extract_rules with a natural-language description of the fields. Either way the response is parsed JSON.

Which languages and clients are supported?

Client libraries are published for Python, Node.js, Go, PHP, Ruby and Java. Plain cURL also works, so any stack that can make an HTTP request can use the API.

How are credits consumed per OLX request?

Requests start at 1 credit each. Enabling JavaScript rendering raises the cost to 5 credits. A premium proxy costs 10 credits without JS rendering or 25 with it. A stealth proxy costs 75 credits. The free starting allowance and plan pricing are commercial terms that need owner confirmation before publication.

Why did my OLX request return empty fields?

Separate the causes. If the page never rendered, it was likely blocked or challenged — enable stealth_proxy and confirm render_js. If the page rendered but fields are null, the CSS selectors in extract_rules no longer match the markup; update them in the dashboard request builder. If only some listings lack a value, the field is simply absent on that listing and should be treated as nullable.