Skip to content

A small Python package to request listings from marktplaats.nl

License

Notifications You must be signed in to change notification settings

Call-Me-G-Now/marktplaats-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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("-----------------------------")

About

A small Python package to request listings from marktplaats.nl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%