Shift8 TREB Real Estate Listings is a comprehensive WordPress plugin that automates the process of importing and managing real estate listings from the Toronto Real Estate Board (TREB) via the PropTx RESO Web API. This plugin eliminates manual listing management by automatically fetching property data and creating properly formatted WordPress posts.
Read our detailed blog post about this plugin for technical insights, implementation details, and the story behind migrating from RETS to RESO Web API.
This plugin connects to several external services to provide real estate listing functionality:
PropTx RESO Web API (Toronto Real Estate Board)
– Purpose: Retrieves real estate listing data from the Toronto Real Estate Board (TREB) MLS system
– Data Sent: API authentication token, search parameters, listing filters
– When: During scheduled syncs and manual data imports
– Service Provider: PropTx RESO Web API (query.ampre.ca)
– Terms of Service: https://www.ampre.ca/terms-of-service
– Privacy Policy: https://www.ampre.ca/privacy-policy
OpenStreetMap Nominatim API
– Purpose: Geocodes property addresses to obtain latitude/longitude coordinates for mapping
– Data Sent: Property addresses (street, city, province, postal code)
– When: When processing new listings or updating existing ones
– Service Provider: OpenStreetMap Foundation (nominatim.openstreetmap.org)
– Usage Policy: https://operations.osmfoundation.org/policies/nominatim/
– Privacy Policy: https://wiki.osmfoundation.org/wiki/Privacy_Policy
Google Maps API (Optional)
– Purpose: Displays interactive maps for property locations
– Data Sent: Property coordinates, API key
– When: When viewing individual listing pages (if Google Maps API key is configured)
– Service Provider: Google LLC
– Terms of Service: https://developers.google.com/maps/terms
– Privacy Policy: https://policies.google.com/privacy
WalkScore API (Optional)
– Purpose: Displays walkability scores and neighborhood information
– Data Sent: Property address, WalkScore ID
– When: When viewing individual listing pages (if WalkScore credentials are configured)
– Service Provider: WalkScore.com
– Terms of Service: https://www.walkscore.com/terms-of-use/
– Privacy Policy: https://www.walkscore.com/privacy/
All external service connections are made server-to-server and do not directly collect visitor data. Property addresses and coordinates are only sent to mapping services when explicitly configured by the site administrator.
All commands are registered under wp shift8-treb. WP-CLI must be installed on the server.
Run a manual sync of TREB listings from the PropTx RESO Web API.
Options:
--dry-run – Run without creating or updating any posts.--verbose – Show detailed output including settings, sample data, and progress.--limit=<number> – Limit the number of listings to process. Overrides admin settings.--force – Force sync even if the bearer token is not configured.--listing-age=<days> – Override listing age in days. Ignores incremental sync and uses age-based filtering.--mls=<numbers> – Import specific MLS number(s), comma-separated. Example: W12436591,C12380184--members-only – Sync only listings from configured member IDs. Applies filter at API level.--postal-prefix=<prefixes> – Override geographic filter with postal code prefixes (FSA). Comma-separated. Example: M5V,M6H. Mutually exclusive with --city.--city=<cities> – Override geographic filter with city names. Comma-separated. Example: "Toronto W08,Mississauga". Mutually exclusive with --postal-prefix.--skip-images – Skip image downloads for faster sync. Stores external URLs only.--sequential-images – Use sequential image processing instead of batch. Slower but more compatible.Examples:
wp shift8-treb sync
wp shift8-treb sync --dry-run --verbose
wp shift8-treb sync --listing-age=7 --limit=50
wp shift8-treb sync --mls=W12436591,C12380184
wp shift8-treb sync --members-only --skip-images
wp shift8-treb sync --postal-prefix=M5V,M6H
wp shift8-treb sync --city="Brampton,Oakville" --limit=20
Query the API and display a summary of matching listings without creating any posts. Output includes price range and median, city breakdown, property type breakdown, and top agents.
Options:
--limit=<number> – Limit number of listings to fetch.--listing-age=<days> – Override listing age in days.--members-only – Only show listings from configured member IDs.--postal-prefix=<prefixes> – Override geographic filter with postal code prefixes. Mutually exclusive with --city.--city=<cities> – Override geographic filter with city names. Mutually exclusive with --postal-prefix.--format=<format> – Output format: table (default) or json.Examples:
wp shift8-treb preview
wp shift8-treb preview --postal-prefix=M5V,M6H,M8X
wp shift8-treb preview --city="Toronto W08,Mississauga"
wp shift8-treb preview --limit=20 --members-only
wp shift8-treb preview --format=json
Fetch raw API data for diagnostic analysis. Supports searching for specific MLS numbers and showing agent breakdowns. No posts are created.
Options:
--limit=<number> – Maximum listings to analyze. Default: 50.--search=<mls> – Search for specific MLS number(s). Comma-separated.--show-agents – Show unique agent IDs and their listing counts.--days=<number> – Number of days to look back. Default: 90.--members-only – Only analyze listings from configured member IDs.--postal-prefix=<prefixes> – Override geographic filter. Mutually exclusive with --city.--city=<cities> – Override geographic filter. Mutually exclusive with --postal-prefix.Examples:
wp shift8-treb analyze --limit=100 --show-agents
wp shift8-treb analyze --search=W12436591,C12380184
wp shift8-treb analyze --days=30 --limit=200
wp shift8-treb analyze --city="Mississauga" --days=30
Display current plugin configuration. Sensitive values such as the bearer token are masked.
Options:
--format=<format> – Output format: table (default), json, or yaml.Examples:
wp shift8-treb settings
wp shift8-treb settings --format=json
Test the PropTx RESO Web API connection using the configured bearer token.
No options. Example:
wp shift8-treb test_api
Test the Media API for a specific listing. Shows available photos with URLs, types, order, and preferred photo status.
Arguments:
<listing_key> – The MLS listing key. Example: W12438713Options:
--raw – Show the full raw JSON API response.Examples:
wp shift8-treb test_media W12438713
wp shift8-treb test_media W12438713 --raw
Show current sync mode (incremental or age-based), last sync timestamp, and relevant settings.
No options. Example:
wp shift8-treb sync_status
Reset the incremental sync timestamp. Forces next sync to use age-based filtering, re-importing listings that may have been deleted locally.
Options:
--yes – Skip the confirmation prompt.Examples:
wp shift8-treb reset_sync
wp shift8-treb reset_sync --yes
Clear all plugin sync logs.
Options:
--yes – Skip the confirmation prompt.Examples:
wp shift8-treb clear_logs
wp shift8-treb clear_logs --yes
Retry downloading failed images for posts that have stored external image references. Draft posts are auto-published if the retry succeeds.
Options:
--limit=<number> – Limit number of posts to process. Default: unlimited.--dry-run – Show what would be processed without downloading.--status=<status> – Only process posts with a specific status: draft, publish, or any (default).Examples:
wp shift8-treb retry-images
wp shift8-treb retry-images --dry-run
wp shift8-treb retry-images --status=draft
wp shift8-treb retry-images --limit=10<h3>Technical Requirements</h3>
* WordPress 5.0 or higher
* PHP 7.4 or higher
* cURL extension for API communication
* Write permissions for wp-content/uploads directory
* Valid PropTx RESO Web API bearer token
For support, documentation, and updates, visit the plugin’s GitHub repository or contact Shift8 Web.
This plugin connects to the PropTx RESO Web API to retrieve real estate listing data. No personal data is transmitted to external services beyond what is necessary for API authentication and data retrieval. All API credentials are encrypted and stored securely in your WordPress database.
Developed by Shift8 Web for integration with the PropTx RESO Web API and Toronto Real Estate Board listing management.