GithubHelp home page GithubHelp logo

d4zedc0der / zoopla Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anthonybloomer/zoopla

0.0 2.0 0.0 73 KB

An API to allow developers to create applications using hyper local data on 27m homes, over 1m sale and rental listings, and 15 years of sold price data in the UK.

Home Page: https://anthonybloomer.github.io/zoopla/

Python 100.00%

zoopla's Introduction

zoopla

Build Status codecov

A python wrapper for the Zoopla API.

Zoopla has launched an open API to allow developers to create applications using hyper local data on 27m homes, over 1m sale and rental listings, and 15 years of sold price data.

Register for a user account and apply for an instant API key.

Browse the documentation to understand how to use the API and the specifications for the individual APIs.

Installation

$ pip install zoopla

Tests

Install the dev requirements:

$ pip install -r requirements.txt
Run py.test with your developer key (otherwise you won’t be able to hit the live
API upon which these tests depend).
$ py.test --api_key=<your-api-key> tests/ # pytest under Python 3+

Examples

Retrieve property listings for a given area.

from zoopla import Zoopla

zoopla = Zoopla(api_key='your_api_key')

search = zoopla.property_listings({
    'maximum_beds': 2,
    'page_size': 100,
    'listing_status': 'sale',
    'area': 'Blackley, Greater Manchester'
})

for result in search.listing:
    print(result.price)
    print(result.description)
    print(result.image_url)

Retrieve a list of house price estimates for the requested area.

zed_indices = zoopla.area_zed_indices({
    'area': 'Blackley, Greater Manchester',
    'output_type': 'area',
    'area_type': 'streets',
    'order': 'ascending',
    'page_number': 1,
    'page_size': 10
})

print(zed_indices.town)
print(zed_indices.results_url)

Generate a graph of values for an outcode over the previous 3 months and return the URL to the generated image.

area_graphs = zoopla.area_value_graphs({'area': 'SW11'})

print(area_graphs.average_values_graph_url)
print(area_graphs.value_trend_graph_url)

Retrieve the average sale price for houses in a particular area.

average = zoopla.average_area_sold_price({'area': 'SW11'})

print(average.average_sold_price_7year)
print(average.average_sold_price_5year)

Submit a viewing request to an agent regarding a particular listing.

session_id = zoopla.get_session_id()

arrange_viewing = zoopla.arrange_viewing({
    'session_id': session_id,
    'listing_id': 44863256,
    'name': 'Tester',
    'email': "[email protected]",
    'phone': '01010101',
    'phone_type': 'work',
    'best_time_to_call': 'anytime',
    'message': 'Hi, I seen your listing on zoopla.co.uk and I would love to arrange a viewing!'

})

Contributing

  • Fork the project and clone locally.
  • Create a new branch for what you're going to work on.
  • Push to your origin repository.
  • Include tests and update documentation if necessary.
  • Create a new pull request in GitHub.

zoopla's People

Contributors

d4zedc0der avatar gabalese avatar scottclay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.