# Olx India Scraper (`natanielsantos/olx-india-scraper`) Actor

Scrape ads data from olx.in with this powerful tool. You can use it to extract title, price, images, description, and more. Download your data as HTML table, JSON, CSV, Excel, XML, and RSS feed.

- **URL**: https://apify.com/natanielsantos/olx-india-scraper.md
- **Developed by:** [Nataniel Santos](https://apify.com/natanielsantos) (community)
- **Categories:** Automation, Jobs, E-commerce
- **Stats:** 393 total users, 14 monthly users, 96.5% runs succeeded, 5 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## What does OLX India Scraper do?

**OLX India Scraper** is a tool that enables you to scrape ads from OLX India website. This is a ready-to-use scraping tool and doesn't require any programming knowledge to get started.

## How to use OLX India Scraper?

OLX India Scraper is easy to use. You need to provide the scraper with a URL on the Actor Input and it will return a list of ads. You can provide the scraper with the following types of URLs:

- **Category URL** (e.g: `https://www.olx.in/cars_c84`)
- **Location URL** (e.g: `https://www.olx.in/mgroad_g5462393`)
- **Search Query** (e.g: `https://www.olx.in/items/q-car`)
- **Search URL with filters** (e.g: `https://www.olx.in/thodupuzha_g4387975/motorcycles_c81?filter=make_eq_royal-enfield%2Cprice_max_152000`)
- **Ads URL** (e.g: `https://www.olx.in/item/led-tv-good-condition-iid-1753262460`)

## Get Started

1. [Sign up](https://console.apify.com/) for Apify or [log in](https://console.apify.com/) if you already have an account.
2. Open [OLX India Scraper](https://apify.com/natanielsantos/olx-india-scraper) and click **Try For Free**.
3. Add URLs to the field **Start URLs**. You can find examples of URLs in the section above.
4. Click on ▶️ **Start** and wait for the results.

## Output example

The output of the OLX India Scraper is stored in a dataset. Each item is an ad and looks like this:

```json
  {
    "mainImage": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image",
    "id": "1733271487",
    "url": "https://www.olx.in/item/bullet-350cc-excellent-condition-exchange-available-iid-1733271487",
    "title": "Bullet 350cc excellent condition / exchange available",
    "description": "Restored With all new parts, showroom condition",
    "createdAt": "2023-11-17T15:47:56+05:30",
    "score": 1,
    "categoryId": "81",
    "userType": "Regular",
    "userId": "76236133",
    "images": [
      {
        "id": "1582142916",
        "external_id": "48z6jxi9i76z2-IN",
        "width": 1080,
        "height": 810,
        "url": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image",
        "full": {
          "width": 1080,
          "height": 810,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image;s=1080x810"
        },
        "big": {
          "width": 505,
          "height": 378,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image;s=505x378"
        },
        "medium": {
          "width": 120,
          "height": 90,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image;s=120x90"
        },
        "small": {
          "width": 120,
          "height": 90,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/48z6jxi9i76z2-IN/image;s=120x90"
        }
      },
      {
        "id": "1582142917",
        "external_id": "5dtb7z3tivqt-IN",
        "width": 1080,
        "height": 810,
        "url": "https://apollo-singapore.akamaized.net:443/v1/files/5dtb7z3tivqt-IN/image",
        "full": {
          "width": 1080,
          "height": 810,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/5dtb7z3tivqt-IN/image;s=1080x810"
        },
        "big": {
          "width": 505,
          "height": 378,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/5dtb7z3tivqt-IN/image;s=505x378"
        },
        "medium": {
          "width": 120,
          "height": 90,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/5dtb7z3tivqt-IN/image;s=120x90"
        },
        "small": {
          "width": 120,
          "height": 90,
          "url": "https://apollo-singapore.akamaized.net:443/v1/files/5dtb7z3tivqt-IN/image;s=120x90"
        }
      }
    ],
    "mainInfo": "1991 - 2,000 km",
    "price": {
      "raw": 140000,
      "currency": {
        "iso_4217": "INR",
        "pre": "₹"
      },
      "display": "₹ 1,40,000"
    },
    "status": "active",
    "parameters": [
      {
        "type": "single",
        "key": "make",
        "value_name": "Royal Enfield",
        "value": "royal-enfield",
        "key_name": "Brand",
        "formatted_value": "Royal Enfield"
      },
      {
        "type": "single",
        "key": "model",
        "value_name": "Bullet",
        "value": "royal-enfield-bullet",
        "key_name": "Model",
        "formatted_value": "Bullet"
      },
      {
        "type": "single",
        "key": "year",
        "value_name": "1991",
        "value": "1991",
        "key_name": "Year",
        "formatted_value": "1991"
      },
      {
        "type": "single",
        "key": "mileage",
        "value_name": "2000",
        "value": "2000",
        "key_name": "KM driven",
        "formatted_value": "2,000 km"
      }
    ],
    "favoritesCount": 4,
    "createdAtFirst": "2023-06-04T00:37:52+05:30",
    "certifiedCar": false,
    "isKycVerifiedUser": false,
    "locations": [
      {
        "lat": 9.963,
        "lon": 76.242,
        "region_id": "2001160",
        "district_id": "5316645",
        "city_id": "4058873"
      }
    ],
    "locationsResolved": {
      "COUNTRY_id": "1000001",
      "COUNTRY_name": "India",
      "ADMIN_LEVEL_1_id": "2001160",
      "ADMIN_LEVEL_1_name": "Kerala",
      "ADMIN_LEVEL_3_id": "4058873",
      "ADMIN_LEVEL_3_name": "Kochi",
      "SUBLOCALITY_LEVEL_1_id": "5316645",
      "SUBLOCALITY_LEVEL_1_name": "Fort Kochi"
    },
    "hasPhoneParam": false
  }
```

## Integrations and OLX India Scraper

OLX India Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, [and more](https://docs.apify.com/integrations). Or you can use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, e.g. get a notification whenever OLX India Scraper successfully finishes a run.

## Using OLX India Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for full details or click on the [API tab](https://apify.com/natanielsantos/olx-india-scraper/api) for code examples.

## Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for OLX India scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://console.apify.com/actors/Q7GhqBvTkIMcXdfPc/issues) in Apify Console.

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with. It can be ads detail URLs, search results URLs or an ads listing URLs. You can see some examples on the [information page](https://apify.com/natanielsantos/olx-india-scraper#how-to-use-olx-india-scraper)

## `maxItemsPerUrl` (type: `integer`):

Maximum number of ads to scrape per URL added on Start URLs.

## `proxySettings` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.olx.in/kerala_g2001160/motorcycles_c81"
    },
    {
      "url": "https://www.olx.in/item/rc-390-bs3-iid-1752582650"
    }
  ],
  "maxItemsPerUrl": 300,
  "proxySettings": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `ads` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.olx.in/kerala_g2001160/motorcycles_c81"
        }
    ],
    "maxItemsPerUrl": 300,
    "proxySettings": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("natanielsantos/olx-india-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.olx.in/kerala_g2001160/motorcycles_c81" }],
    "maxItemsPerUrl": 300,
    "proxySettings": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("natanielsantos/olx-india-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.olx.in/kerala_g2001160/motorcycles_c81"
    }
  ],
  "maxItemsPerUrl": 300,
  "proxySettings": {
    "useApifyProxy": true
  }
}' |
apify call natanielsantos/olx-india-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=natanielsantos/olx-india-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Q7GhqBvTkIMcXdfPc/builds/4qsL3vwQdMzePj1Kf/openapi.json
