Blog

TREB IDX WordPress Integration with Python : Integrate WordPress and TREB real estate listings!

treb-wordpress-integration

TREB WordPress Integration with our open source python solution

We know that some of you are definitely looking forward to the release of this integrated system that has been promised quite a while ago.

Well the time has come for us to release the open source Python code that seamlessly does the following :

  • Download TREB listing data straight from the source
  • Filters data based on a number of adjustable filtration parameters (i.e. Minimum listing price)
  • Download TREB listing photos straight from the source
  • Integrate and format data via a 100% adjustable listing template
  • Import listings straight into wordpress
  • Marks existing listings as sold if the data reflects it from TREB

Being able to utilize this script on your server assumes the following :

  • You have root access to your server
  • You are on a Unix or Linux based server (Should work in Windows, but untested)
  • You already have signed and completed the TREB authorization forms for TREB to formally delegate access to their listing data as an authorized agent

TREB WordPress Installation Instructions

Before we get started on the installation instructions, you should have a working and up-to-date wordpress blog. The listing template that the script uses to generate posts of real estate listings assumes that you have the following 3rd party wordpress plugins installed, however feel free to change the listing template as you see fit to utilize whatever plugins, shortcode or anything of the like that you need :

1. Get The Code

Head on over to the GitHub project page for the TREB WordPress python code, and clone the repository.

2. Set up your config file

The configuration file should be located in ~/.treb_wordpress. A sample of the configuration file can be viewed on the GitHub project page. All the configuration parameters are self explanatory.

3. Install the wordpress plugins

As mentioned earlier in this post, the default listing template depends on 3 wordpress plugins. Make sure they are installed. Specifically for the Lazyest Gallery plugin, you might want to change the default gallery path to /wp-content/uploads/treb/ which is where the script downloads the gallery images for each real estate listing by default.

4. Run the script

The script expects 2 options to be passed to it in order to run. The syntax for running the script is as follows :

Usage Syntax :
treb_fetch.py [option1] [option2]
Option 1 : "avail" "unavail" , processes available or unavailable listings
Option 2 : Number of days prior to gather listing data

Note that the “avail” and “unavail” options are currently not in use. This post will be updated as soon as the script has the ability to automatically remove listings that have been marked by TREB as unavailable.

Curious what a site looks like that uses this script? Take a look here

Update: 11/18/2016 , We created a beta WordPress plugin to integrate with TREB

For those who have arrived to this page looking for an easy WordPress TREB integration (for free), we started to create a beta version of a WordPress plugin that takes care of everything for you. It is currently being hosted at Github, however it will be submitted to the WordPress plugin directory once it is in a more stable state.

You can see the Github page of the plugin here : Treb WordPress Integration Plugin

You can see the preliminary blog post we wrote about background processes for pulling TREB data : WordPress plugin to connect to TREB and run as a background process