Skip to content

A library that enables programmatic interaction with daft.ie. Daft.ie has nationwide coverage and contains about 80% of the total available properties in Ireland.

License

Notifications You must be signed in to change notification settings

AnthonyBloomer/daftlistings

Repository files navigation

Daftlistings

Build Status codecov

A library that enables programmatic interaction with Daft.ie. Daft.ie has nationwide coverage and contains about 80% of the total available properties in Ireland.

Installation

Daftlistings is available on the Python Package Index (PyPI). You can install daftlistings using pip.

virtualenv env
source env/bin/activate
pip install daftlistings

To install the development version, run:

pip install https://github.com/AnthonyBloomer/daftlistings/archive/dev.zip

Usage

from daftlistings import Daft

daft = Daft()
listings = daft.search()

for listing in listings:
    print(listing.title)
    print(listing.price)
    print(listing.daft_link)
    # ...

By default, the Daft search function iterates over each page of results and appends each Listing object to the array that is returned. If you wish to limit the number of results that are returned you can use the max_pages argument.

daft.search(max_pages=1)

Examples

Search for apartments for rent in Dublin.

from daftlistings import Daft, Location, SearchType, PropertyType

daft = Daft()
daft.set_location(Location.DUBLIN)
daft.set_search_type(SearchType.RESIDENTIAL_RENT)
daft.set_property_type(PropertyType.APARTMENT)

listings = daft.search()

for listing in listings:
    print(listing.title)
    print(listing.price)
    print(listing.daft_link)

Search for houses for sale in Dublin between 400 and 500k.