Skip to main content

A small Python package to request listings from marktplaats.nl

Project description

marktplaats-py

A small Python package to request listings from marktplaats.nl. It supports python 3.7+.

Installing

pip3 install marktplaats

Example

This is an example on how to use the library:

from marktplaats import SearchQuery

search = SearchQuery("fiets", # Search query
                     zip_code="1016LV", # Zip code to base distance from
                     distance=100000, # Max distance from the zip code for listings
                     price_from=0, # Lowest price to search for
                     price_to=100, # Highest price to search for
                     limit=5, # Max listings (page size, max 25)
                     offset=0) # Offset for listings (page * limit)

listings = search.get_listings()

for listing in listings:
    print(listing.title)
    print(listing.description)
    print(listing.price)
    print(listing.link)
    
    # the location object
    print(listing.location)
    
    # the seller object
    print(listing.seller)
    
    # the datetime object
    print(listing.date)
    
    # the full seller object (another request)
    print(listing.seller.get_seller())
    
    for image in listing.images:
        print(image.medium)
    
    
    print("-----------------------------")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marktplaats-0.1.4.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

marktplaats-0.1.4-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page