TREB IDX WordPress Integration with Python

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 :

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

Suzanne

  • Radomir Wojcik

    so my agent id is the 7 digit number that I use to login to treb, what about the treb user name and password? Where do I find that? Thx

    • shift8web

      Your agent ID is the 7 digit number. The treb username and password is obtained after submitting the approval form to TREB. You can contact TREB directly for this – they will ask you and your Broker Manager to sign the form requesting access. Then TREB will provide a username / password to access their site.

      • Radek

        Cool thanks, I do believe you have to pay for that username/password monthly. I think its $5/ month?Cool thanks, I do believe you have to pay for that username/password monthly. I think its $5/ month?

        • shift8web

          You’ll have to talk to TREB and your brokerage manager. I dont believe there is a monthly fee for the username/password, but I could be wrong

  • johnatan

    Do you have any other examples?

    • shift8web

      No – not at this time.