0% found this document useful (0 votes)
64 views

MLS Grid - Best Practices June 2019

The document provides best practices for using replication to obtain data from the MLS Grid API. It recommends using filters on the OriginatingSystemName and MlgCanView fields to get all active records in the initial import. Subsequent requests should filter on the ModificationTimestamp to get updated records, following the @odata.nextLink URLs to page through results. The document lists the replication requests needed to synchronize each resource type and avoid unnecessary practices that could risk access suspension.

Uploaded by

Isaias Dominguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

MLS Grid - Best Practices June 2019

The document provides best practices for using replication to obtain data from the MLS Grid API. It recommends using filters on the OriginatingSystemName and MlgCanView fields to get all active records in the initial import. Subsequent requests should filter on the ModificationTimestamp to get updated records, following the @odata.nextLink URLs to page through results. The document lists the replication requests needed to synchronize each resource type and avoid unnecessary practices that could risk access suspension.

Uploaded by

Isaias Dominguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BEST PRACTICES FOR OBTAINING DATA

FROM THE MLS GRID USING REPLICATION

DEVELOPER GUIDE
The MLS Grid Web API is currently built to accommodate replication access. Replication is the primary use case and
is needed to help vendors (especially large platforms) make the initial switch. To assist in using replication with the
MLS Grid we have created the following requests as the Best Practices to use when obtaining data from the MLS Grid

Requests for Your Initial Data Import


Initial Import:

https://api.mlsgrid.com/PropertyResi?$filter=OriginatingSystemName eq ‘realtrac’ and MlgCanView eq true

The reason that we add “MlgCanView eq true” to our initial request is we do not want any deleted records included
in our initial request. The MlgCanView is our deletion flag. If the MlgCanView is set to “true”, it means that the record
is active and should be saved to your database. If the MlgCanView is set to “false”, it means the recrod is not active
and should be removed from the database.

In the JSON object that is returned from this request there will be a field called “@odata.nextLink”. The value of this
field is the URL to the next page of results:

https://api.mlsgrid.com/PropertyResi?$filter=OriginatingSystemName eq ‘realtrac’ and MlgCanView eq true&$skip=500

Use this URL to request the next page of data. Repeat this process until the “@odata.nextLink” field is not returned as
part of the JSON object. This will mean that you will have successfully requested all of the records that match your
request. This is the easiest way to pull every page of data.

Follow the same process for Media and any other resources you wish to download.

https://api.mlsgrid.com/Media?$filter=OriginatingSystemName eq ‘realtrac’ and MlgCanView eq true

Again look for the “@odata.nextLink” field and use that URL to request each page of the results. Repeat this process
for each resource that you want to request data from.

Please do not pull Media or OpenHouse records one listing at a time! (ex. ResourceRecordId eq ‘RTC1234567’)

Please do not pull Media or OpenHouse records using “or” statements!


(ex. (ResourceRecordId eq 'RTC1993145') or (ResourceRecordId eq 'RTC2041309') or ...)

Due to the number of media records, pulling records one listing at a time is very resource intensive. This is an
unnecessary practice and may result in the MLS Grid placing a rate limit on your access or suspending access.

Please Note the Following:

1. The name of the MLS is highlighted in red in the requests above. To repeat the import process for another MLS,
simply replace the name of the MLS highlighted in red with the name of the MLS you wish to request data from.

A list of MLS names (OriginatingSystemName) is available online in our technical documentation.


https://docs.mlsgrid.com/#originatingsystemname

2. There is a prefix that precedes the ListingId or preceding local fields specific to an MLS. These prefixes are
used to eliminate duplicate ListingId numbers as well as identify fields that are unique to an MLS.

A list of Local Fields Prefix is available online in our technical documentation.


https://docs.mlsgrid.com/#local-fields-prefix

3. Please request that all responses from our API are compressed. To do this make sure your client sends a header
Accept-Encoding:gzip,deflate. The data from our API compresses over 90%. With compression enabled your client
will download less than 10% of the original size of the requested data. This will save on everyones bandwidth costs!

385.429.0606 | S PPORT MLSGRID.COM | WWW.MLSGRID.COM


BEST PRACTICES FOR OBTAINING DATA
FROM THE MLS GRID USING REPLICATION

DEVELOPER GUIDE
The MLS Grid Web API is currently built to accommodate replication access. Replication is the primary use case and
is needed to help vendors (especially large platforms) make the initial switch. To assist in using replication with the
MLS Grid we have created the following requests as the Best Practices to use when obtaining data from the MLS Grid

Keeping Your Database in Sync with the MLS Grid


Once you have the initial data, all you need to do to keep your database in sync with the MLS Grid is to send a
replication request for each resource.

https://api.mlsgrid.com/PropertyResi?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

Again look for the “@odata.nextLink” field and use that URL to request each page of the search results.

Please note the name of the MLS highlighted in red in the requests. To repeat the import process for another
MLS, simply replace the name of the MLS highlighted in red with the name of the MLS you wish to request data from.
Please remember to encode spaces as %20 in your requests.

Here are all of the replication requests that you will need to keep all of the PropertyTypes in sync with your
database. Performing these requests once every 15 minutes will be sufficient to keep your database fresh and in
sync.

Property
https://api.mlsgrid.com/PropertyResi?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt
[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyRlse?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyRinc?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyMobi?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyBuso?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyFarm?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyLand?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyComs?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

https://api.mlsgrid.com/PropertyComl?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt


[GREATEST ModificationTimestamp FROM YOUR DATABASE]

385.429.0606 | S PPORT MLSGRID.COM | WWW.MLSGRID.COM


BEST PRACTICES FOR OBTAINING DATA
FROM THE MLS GRID USING REPLICATION

DEVELOPER GUIDE
The MLS Grid Web API is currently built to accommodate replication access. Replication is the primary use case and
is needed to help vendors (especially large platforms) make the initial switch. To assist in using replication with the
MLS Grid we have created the following requests as the Best Practices to use when obtaining data from the MLS Grid

Keeping Your Database in Sync with the MLS Grid


Here are replication requests that you will need to keep all of the remaining resources in sync with your database.
Performing these requests once every 15 minutes will be sufficient to keep your database fresh and in sync.

Please note the name of the MLS highlighted in red in the requests. To repeat the import process for another MLS,
simply replace the name of the MLS highlighted in red with the name of the MLS you wish to request data from.
Please remember to encode spaces as %20 in your requests.

Media
https://api.mlsgrid.com/Media?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt [GREATEST
ModificationTimestamp FROM YOUR DATABASE]

OpenHouse
https://api.mlsgrid.com/OpenHouse?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt [GREATEST
ModificationTimestamp FROM YOUR DATABASE]

Office
https://api.mlsgrid.com/Office?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt [GREATEST
ModificationTimestamp FROM YOUR DATABASE]

Member
https://api.mlsgrid.com/Member?$filter=OriginatingSystemName eq ‘realtrac’ and ModificationTimestamp gt [GREATEST
ModificationTimestamp FROM YOUR DATABASE]
Things To Avoid
1. Do not pull Media or OpenHouse records one listing at a time (ex. ResourceRecordID eq ‘RTC1234567’). This is an
unnecessary practice and may result in a rate limit on your access or suspending access.

2. Do not pull Media or OpenHouse records using “or” statements (ex. (ListingId eq ‘RTC1234567’) or
(ListingId eq ‘RTC2345678’)). This is an unnecessary practice and may result in a rate limit on your access or
suspending access.

3. Do not send more than one replication request at a time. If you have multi-threaded or multi-process client do not split
replication requests. Replication requests must be in sequential order. If you split requests you will either send the same
request for the same page of results multiple times or you will request pages out of order.

4. Do not send a request with $top=0 as this will return no results becasuse you are requesting “0” records.

5. Do not perform range queries on ModificationTimestamp. To keep your database in sync use a normal
ModificationTimestamp gt [GREATEST ModificationTimestamp FROM YOUR DATABASE].

6. Do not send the same request mulitple times. Each time you make a replication request include the greatest
ModificationTimestamp from your database. If you are following this process the greatest ModificationTimestamp will
change each time you receive records so the replication request will change each time.

7. Do not send more than 2 requests per second as this can degrade service for other vendors.

385.429.0606 | S PPORT MLSGRID.COM | WWW.MLSGRID.COM

You might also like