Skip to content

fdciabdul/OLX-SCRAPER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OLX Unofficial Client API

License: GPL-3.0 license npm versionOpen Source Love svg2

Unofficial Scraper API for OLX.CO.ID

Installation

You can install the package using npm or Yarn:

npm install olx-scraper

or

yarn add olx-scraper

Usage

Logging in

To log in to OLX:

const { OLXClient } = require("olx-scraper");
const client = new OLXClient('[email protected]', 'your-password');

client.loginOLX().then(response => {
    console.log(response);
}).catch(error => {
    console.error(error);
});

Fetching User Data

Retrieve user data from OLX by user ID:

client.getUserData(userId, cookie).then(userData => {
    console.log(userData);
}).catch(error => {
    console.error(error);
});

Getting Categories

Get a list of categories available on OLX:

client.getCategory().then(categories => {
    console.log(categories);
}).catch(error => {
    console.error(error);
});

Searching by Category

Search for listings in a specific category:

client.searchbyCategory(categoryId, locationId).then(searchResults => {
    console.log(searchResults);
}).catch(error => {
    console.error(error);
});

Searching for Locations

Search for locations on OLX:

client.searchLocation('location-query').then(locations => {
    console.log(locations);
}).catch(error => {
    console.error(error);
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published