Collapse Drawer
Expand Drawer

RETS client libraries


libRETS is a RETS library that has bindings for many different languages, including C#, Java, Python, Ruby, and Perl. It was originally developed by NAR and now exists on Github New Window and Nuget New Window.

namespace trestle_librets
    internal class Program
        public static void Main(string[] args)
            var session = new librets.RetsSession("");
            var loginResult = session.Login("client_id", "client_secret");
            var searchRequest = session.CreateSearchRequest("Property", "Property", "(StandardStatus=|Active)");
            // libRETS defaults the limit to -1. You MUST set it to a value <=1000
            var results = session.Search(searchRequest);


PHRETS is one of the most popular native PHP RETS clients. It can be found on Github New Window or via Composer New Window.



$config = new \PHRETS\Configuration;
    // PHRETS defaults to digest. You MUST set it to use basic.

$rets = new \PHRETS\Session($config);
$connect = $rets->Login();
// PHRETS defaults the limit to 99999999. You MUST set it to a value <=1000
$results = $rets->Search('Property', 'Property', '(StandardStatus=|Active)', ['Limit' => 1000, 'Select' => 'ListingKey']);

estately RETS

estately RETS provides a RETS client written in Ruby. It can be found on Github New Window or via Gem New Window.

require 'rets'

client ={
    login_url: "",
    username: "client_id",
    password: "client_secret",
    version: "RETS/1.8"

property = client.find :all, {
    search_type: 'Property',
    class: 'Property',
    query: '(StandardStatus=|Active)',
    select: 'ListingKey',
    # estately does not set a default. You SHOULD set it to a value <=1000
    limit: 1000

Node.js RETS Client

Node.js RETS client is a RETS client written for node.js. It can be found on Github New Window or via npm New Window.

var rets = require('rets-client');

var clientSettings = {
    loginUrl: '',
    username: 'client_id',
    password: 'client_secret',
    version: 'RETS/1.8',

rets.getAutoLogoutClient(clientSettings, function(client) {
    // Node.js RETS Client defaults limit to NONE. You MUST set it to a value <=1000
    return'Property', 'Property', '(StandardStatus=|Active)', {limit: 1000, select: 'ListingKey'})
        .then(function(searchData) {