Skip to content

DanericNetwork/Marktplaats.js

Repository files navigation

Marktplaats.js

Installation

npm install @danericc/marktplaats.js

Example usage

import { Offers, SortOrder } from '@danericc/marktplaats.js';

async function main() {
  const offers = new Offers('Ford Ka 2014')
    .setLimit(3) // the amount
    .setDistance(10000) // the distance is in meters
    .setOffset(30) // the offset to start from
    .setSearchInTitleAndDescription(true) // search in title and description
    .setPostcode('3311BH'); // the postcode to search from
    .setSort(SortOrder.Newest) // sort by newest
    .setMinPrice(100) // the minimum price in euros
    .setMaxPrice(1000); // the maximum price in euros

  const result = await offers.fetch();
  console.log(result);
}

main();

About

A node package to get listings from marktplaats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published